mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
On windows always request even number of EUs.
Resolves: NEO-3787 Change-Id: I45e8fdca563b3e6bebcd94b9c16202aff61a2357 Signed-off-by: Piotr Zdunowski <piotr.zdunowski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
6f09eef35f
commit
68ec2d9cf7
@ -316,6 +316,27 @@ TEST(WddmPreemptionHeaderTests, givenDevicenotSupportingPreemptionWhenCommandStr
|
||||
EXPECT_FALSE(header->NeedsMidBatchPreEmptionSupport);
|
||||
}
|
||||
|
||||
TEST_F(WddmCommandStreamTest, givenWdmmWhenSubmitIsCalledWhenEUCountWouldBeOddThenRequestEvenEuCount) {
|
||||
GraphicsAllocation *commandBuffer = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
ASSERT_NE(nullptr, commandBuffer);
|
||||
LinearStream cs(commandBuffer);
|
||||
|
||||
wddm->getGtSysInfo()->EUCount = 9;
|
||||
wddm->getGtSysInfo()->SubSliceCount = 3;
|
||||
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::LOW, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr};
|
||||
csr->flush(batchBuffer, csr->getResidencyAllocations());
|
||||
auto commandHeader = wddm->submitResult.commandHeaderSubmitted;
|
||||
|
||||
COMMAND_BUFFER_HEADER *pHeader = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandHeader);
|
||||
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSliceState);
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSubsliceCount);
|
||||
EXPECT_EQ((wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount) & (~1u), pHeader->UmdRequestedEUCount);
|
||||
|
||||
memoryManager->freeGraphicsMemory(commandBuffer);
|
||||
}
|
||||
|
||||
TEST_F(WddmCommandStreamTest, givenWdmmWhenSubmitIsCalledAndThrottleIsToLowThenSetHeaderFieldsProperly) {
|
||||
GraphicsAllocation *commandBuffer = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
ASSERT_NE(nullptr, commandBuffer);
|
||||
@ -329,7 +350,7 @@ TEST_F(WddmCommandStreamTest, givenWdmmWhenSubmitIsCalledAndThrottleIsToLowThenS
|
||||
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSliceState);
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSubsliceCount);
|
||||
EXPECT_EQ(wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount, pHeader->UmdRequestedEUCount);
|
||||
EXPECT_EQ((wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount) & (~1u), pHeader->UmdRequestedEUCount);
|
||||
|
||||
memoryManager->freeGraphicsMemory(commandBuffer);
|
||||
}
|
||||
@ -347,7 +368,7 @@ TEST_F(WddmCommandStreamTest, givenWdmmWhenSubmitIsCalledAndThrottleIsToMediumTh
|
||||
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSliceState);
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSubsliceCount);
|
||||
EXPECT_EQ(wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount, pHeader->UmdRequestedEUCount);
|
||||
EXPECT_EQ((wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount) & (~1u), pHeader->UmdRequestedEUCount);
|
||||
|
||||
memoryManager->freeGraphicsMemory(commandBuffer);
|
||||
}
|
||||
@ -365,7 +386,7 @@ TEST_F(WddmCommandStreamTest, givenWdmmWhenSubmitIsCalledAndThrottleIsToHighThen
|
||||
const uint32_t maxRequestedSubsliceCount = 7;
|
||||
EXPECT_EQ(0, pHeader->UmdRequestedSliceState);
|
||||
EXPECT_EQ((wddm->getGtSysInfo()->SubSliceCount <= maxRequestedSubsliceCount) ? wddm->getGtSysInfo()->SubSliceCount : 0, pHeader->UmdRequestedSubsliceCount);
|
||||
EXPECT_EQ(wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount, pHeader->UmdRequestedEUCount);
|
||||
EXPECT_EQ((wddm->getGtSysInfo()->EUCount / wddm->getGtSysInfo()->SubSliceCount) & (~1u), pHeader->UmdRequestedEUCount);
|
||||
|
||||
memoryManager->freeGraphicsMemory(commandBuffer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user