mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Enable OpenCL 3.0 by default on all devices
Change-Id: Ic5e46177c957896c499b7aa6727af48105b664ac Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
595f374634
commit
7d0f23bfc9
@@ -1057,37 +1057,37 @@ typedef ExecutionModelKernelFixture ParentKernelCommandsFromBinaryTest;
|
||||
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelCommandsFromBinaryTest, WhenGettingSizeRequiredForExecutionModelForSurfaceStatesThenReturnSizeOfBlocksPlusMaxBindingTableSizeForAllIdtEntriesAndSchedulerSshSize) {
|
||||
using BINDING_TABLE_STATE = typename FamilyType::BINDING_TABLE_STATE;
|
||||
|
||||
if (std::string(pPlatform->getClDevice(0)->getDeviceInfo().clVersion).find("OpenCL 2.") != std::string::npos) {
|
||||
EXPECT_TRUE(pKernel->isParentKernel);
|
||||
REQUIRE_DEVICE_ENQUEUE_OR_SKIP(defaultHwInfo);
|
||||
|
||||
size_t totalSize = 0;
|
||||
EXPECT_TRUE(pKernel->isParentKernel);
|
||||
|
||||
BlockKernelManager *blockManager = pKernel->getProgram()->getBlockKernelManager();
|
||||
uint32_t blockCount = static_cast<uint32_t>(blockManager->getCount());
|
||||
size_t totalSize = 0;
|
||||
|
||||
totalSize = BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE - 1; // for initial alignment
|
||||
BlockKernelManager *blockManager = pKernel->getProgram()->getBlockKernelManager();
|
||||
uint32_t blockCount = static_cast<uint32_t>(blockManager->getCount());
|
||||
|
||||
uint32_t maxBindingTableCount = 0;
|
||||
totalSize = BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE - 1; // for initial alignment
|
||||
|
||||
for (uint32_t i = 0; i < blockCount; i++) {
|
||||
const KernelInfo *pBlockInfo = blockManager->getBlockKernelInfo(i);
|
||||
uint32_t maxBindingTableCount = 0;
|
||||
|
||||
totalSize += pBlockInfo->heapInfo.SurfaceStateHeapSize;
|
||||
totalSize = alignUp(totalSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
||||
|
||||
maxBindingTableCount = std::max(maxBindingTableCount, pBlockInfo->patchInfo.bindingTableState ? pBlockInfo->patchInfo.bindingTableState->Count : 0);
|
||||
}
|
||||
|
||||
totalSize += maxBindingTableCount * sizeof(BINDING_TABLE_STATE) * DeviceQueue::interfaceDescriptorEntries;
|
||||
|
||||
auto &scheduler = pContext->getSchedulerKernel();
|
||||
auto schedulerSshSize = scheduler.getSurfaceStateHeapSize();
|
||||
totalSize += schedulerSshSize + ((schedulerSshSize != 0) ? BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE : 0);
|
||||
for (uint32_t i = 0; i < blockCount; i++) {
|
||||
const KernelInfo *pBlockInfo = blockManager->getBlockKernelInfo(i);
|
||||
|
||||
totalSize += pBlockInfo->heapInfo.SurfaceStateHeapSize;
|
||||
totalSize = alignUp(totalSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
||||
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::getSshSizeForExecutionModel(*pKernel));
|
||||
maxBindingTableCount = std::max(maxBindingTableCount, pBlockInfo->patchInfo.bindingTableState ? pBlockInfo->patchInfo.bindingTableState->Count : 0);
|
||||
}
|
||||
|
||||
totalSize += maxBindingTableCount * sizeof(BINDING_TABLE_STATE) * DeviceQueue::interfaceDescriptorEntries;
|
||||
|
||||
auto &scheduler = pContext->getSchedulerKernel();
|
||||
auto schedulerSshSize = scheduler.getSurfaceStateHeapSize();
|
||||
totalSize += schedulerSshSize + ((schedulerSshSize != 0) ? BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE : 0);
|
||||
|
||||
totalSize = alignUp(totalSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
||||
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::getSshSizeForExecutionModel(*pKernel));
|
||||
}
|
||||
|
||||
static const char *binaryFile = "simple_block_kernel";
|
||||
|
||||
Reference in New Issue
Block a user