Don't use device from kernel if possible [1/n]

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-11-13 11:41:45 +01:00
committed by Compute-Runtime-Automation
parent a2d2bd629a
commit bd432fa94c
11 changed files with 67 additions and 42 deletions

View File

@@ -68,7 +68,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueKernel(
for (auto i = 0u; i < workDim; i++) {
region[i] = globalWorkSizeIn ? globalWorkSizeIn[i] : 0;
if (region[i] == 0 && (kernel.getDevice().areOcl21FeaturesEnabled() == false)) {
if (region[i] == 0 && (kernel.getDevices()[0]->areOcl21FeaturesEnabled() == false)) {
return CL_INVALID_GLOBAL_WORK_SIZE;
}
globalWorkOffset[i] = globalWorkOffsetIn