mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Fix partition count after command list reset
Related-To: NEO-6262 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
5a2a19fa1a
commit
c7693650de
@ -114,7 +114,11 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::reset() {
|
||||
device->getNEODevice()->getMemoryManager()->freeGraphicsMemory(alloc);
|
||||
}
|
||||
this->ownedPrivateAllocations.clear();
|
||||
partitionCount = 1;
|
||||
if (device->isImplicitScalingCapable() && !this->internalUsage) {
|
||||
this->partitionCount = static_cast<uint32_t>(this->device->getNEODevice()->getDeviceBitfield().count());
|
||||
} else {
|
||||
this->partitionCount = 1;
|
||||
}
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -834,7 +834,7 @@ HWTEST2_F(CommandListCreate, whenContainsCooperativeKernelsIsCalledThenCorrectVa
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListCreate, whenCommandListIsResetThenPartitionCountIsReversedToOne) {
|
||||
HWTEST_F(CommandListCreate, GivenSingleTileDeviceWhenCommandListIsResetThenPartitionCountIsReversedToOne) {
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily,
|
||||
device,
|
||||
@ -842,12 +842,10 @@ HWTEST_F(CommandListCreate, whenCommandListIsResetThenPartitionCountIsReversedTo
|
||||
0u,
|
||||
returnValue));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
|
||||
commandList->partitionCount = 2;
|
||||
EXPECT_EQ(1u, commandList->partitionCount);
|
||||
|
||||
returnValue = commandList->reset();
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
|
||||
EXPECT_EQ(1u, commandList->partitionCount);
|
||||
}
|
||||
|
||||
@ -856,6 +854,10 @@ using MultiTileImmediateCommandListTest = Test<MultiTileCommandListFixture<true,
|
||||
HWTEST2_F(MultiTileImmediateCommandListTest, GivenMultiTileDeviceWhenCreatingImmediateCommandListThenExpectPartitionCountMatchTileCount, IsWithinXeGfxFamily) {
|
||||
EXPECT_EQ(2u, device->getNEODevice()->getDeviceBitfield().count());
|
||||
EXPECT_EQ(2u, commandList->partitionCount);
|
||||
|
||||
auto returnValue = commandList->reset();
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
EXPECT_EQ(2u, commandList->partitionCount);
|
||||
}
|
||||
|
||||
using MultiTileImmediateInternalCommandListTest = Test<MultiTileCommandListFixture<true, true>>;
|
||||
@ -863,6 +865,10 @@ using MultiTileImmediateInternalCommandListTest = Test<MultiTileCommandListFixtu
|
||||
HWTEST2_F(MultiTileImmediateInternalCommandListTest, GivenMultiTileDeviceWhenCreatingInternalImmediateCommandListThenExpectPartitionCountEqualOne, IsWithinXeGfxFamily) {
|
||||
EXPECT_EQ(2u, device->getNEODevice()->getDeviceBitfield().count());
|
||||
EXPECT_EQ(1u, commandList->partitionCount);
|
||||
|
||||
auto returnValue = commandList->reset();
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||
EXPECT_EQ(1u, commandList->partitionCount);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListCreate, WhenReservingSpaceThenCommandsAddedToBatchBuffer) {
|
||||
|
Reference in New Issue
Block a user