Store device specific kernel members per root device

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-12-10 13:22:10 +00:00
committed by Compute-Runtime-Automation
parent 8d2cfd87ae
commit aa1fc85257
30 changed files with 446 additions and 306 deletions

View File

@@ -133,8 +133,9 @@ WorkSizeInfo::WorkSizeInfo(uint32_t maxWorkGroupSize, bool hasBarriers, uint32_t
}
WorkSizeInfo::WorkSizeInfo(const DispatchInfo &dispatchInfo) {
auto &device = dispatchInfo.getClDevice();
const auto &kernelInfo = dispatchInfo.getKernel()->getKernelInfo(device.getRootDeviceIndex());
this->maxWorkGroupSize = dispatchInfo.getKernel()->maxKernelWorkGroupSize;
auto rootDeviceIndex = device.getRootDeviceIndex();
const auto &kernelInfo = dispatchInfo.getKernel()->getKernelInfo(rootDeviceIndex);
this->maxWorkGroupSize = dispatchInfo.getKernel()->getMaxKernelWorkGroupSize(rootDeviceIndex);
auto pExecutionEnvironment = kernelInfo.patchInfo.executionEnvironment;
this->hasBarriers = (pExecutionEnvironment != nullptr) && (pExecutionEnvironment->HasBarriers);
this->simdSize = static_cast<uint32_t>(kernelInfo.getMaxSimdSize());