refactor: don't use global ProductHelper getter 16

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-27 16:02:13 +00:00
committed by Compute-Runtime-Automation
parent e970af3657
commit 5e059d4b30
11 changed files with 26 additions and 20 deletions

View File

@@ -27,11 +27,11 @@ Vec3<size_t> computeWorkgroupSize(const DispatchInfo &dispatchInfo) {
if (kernel != nullptr) {
auto &device = dispatchInfo.getClDevice();
const auto &hwInfo = device.getHardwareInfo();
const auto &rootDeviceEnvironment = device.getRootDeviceEnvironment();
auto &gfxCoreHelper = device.getGfxCoreHelper();
if (DebugManager.flags.EnableComputeWorkSizeND.get()) {
WorkSizeInfo wsInfo = createWorkSizeInfoFromDispatchInfo(dispatchInfo);
if (wsInfo.slmTotalSize == 0 && !wsInfo.hasBarriers && !wsInfo.imgUsed && gfxCoreHelper.preferSmallWorkgroupSizeForKernel(kernel->getKernelInfo().heapInfo.KernelUnpaddedSize, hwInfo) &&
if (wsInfo.slmTotalSize == 0 && !wsInfo.hasBarriers && !wsInfo.imgUsed && gfxCoreHelper.preferSmallWorkgroupSizeForKernel(kernel->getKernelInfo().heapInfo.KernelUnpaddedSize, rootDeviceEnvironment) &&
((dispatchInfo.getDim() == 1) && (dispatchInfo.getGWS().x % wsInfo.simdSize * 2 == 0))) {
wsInfo.maxWorkGroupSize = wsInfo.simdSize * 2;
}