Move grf size to HwInfo

Change-Id: I65ee879644573586d63092b487f8b5ea0cedf1e3
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2019-12-17 08:55:09 +01:00
committed by sys_ocldev
parent 2b0db66c52
commit 8803b4cd4e
31 changed files with 181 additions and 102 deletions

View File

@ -85,11 +85,13 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelWhenEnqueu
ASSERT_NE(nullptr, pBlockInfo->patchInfo.executionEnvironment);
ASSERT_NE(nullptr, pBlockInfo->patchInfo.threadPayload);
const uint32_t sizeCrossThreadData = pBlockInfo->patchInfo.dataParameterStream->DataParameterStreamSize / sizeof(GRF);
auto grfSize = pPlatform->getDevice(0)->getDeviceInfo().grfSize;
const uint32_t sizeCrossThreadData = pBlockInfo->patchInfo.dataParameterStream->DataParameterStreamSize / grfSize;
auto numChannels = PerThreadDataHelper::getNumLocalIdChannels(*pBlockInfo->patchInfo.threadPayload);
auto sizePerThreadData = getPerThreadSizeLocalIDs(pBlockInfo->patchInfo.executionEnvironment->LargestCompiledSIMDSize, numChannels);
uint32_t numGrfPerThreadData = static_cast<uint32_t>(sizePerThreadData / sizeof(GRF));
uint32_t numGrfPerThreadData = static_cast<uint32_t>(sizePerThreadData / grfSize);
numGrfPerThreadData = std::max(numGrfPerThreadData, 1u);
EXPECT_EQ(numGrfPerThreadData, idData[blockFirstIndex + i].getConstantIndirectUrbEntryReadLength());