diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index 93799fb9d8..eebbe9fff7 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -949,7 +949,7 @@ cl_int Kernel::setArgSvmAlloc(uint32_t argIndex, void *svmPtr, GraphicsAllocatio bool disableL3 = false; bool forceNonAuxMode = false; - bool isAuxTranslationKernel = (AuxTranslationDirection::None != auxTranslationDirection); + const bool isAuxTranslationKernel = (AuxTranslationDirection::None != auxTranslationDirection); auto &rootDeviceEnvironment = getDevice().getRootDeviceEnvironment(); auto &clGfxCoreHelper = rootDeviceEnvironment.getHelper(); @@ -963,8 +963,8 @@ cl_int Kernel::setArgSvmAlloc(uint32_t argIndex, void *svmPtr, GraphicsAllocatio forceNonAuxMode = true; } - bool argWasUncacheable = kernelArgInfo.isStatelessUncacheable; - bool argIsUncacheable = svmAlloc ? svmAlloc->isUncacheable() : false; + const bool argWasUncacheable = kernelArgInfo.isStatelessUncacheable; + const bool argIsUncacheable = svmAlloc ? svmAlloc->isUncacheable() : false; statelessUncacheableArgsCount += (argIsUncacheable ? 1 : 0) - (argWasUncacheable ? 1 : 0); void *ptrToPatch = patchBufferOffset(argAsPtr, svmPtr, svmAlloc); diff --git a/opencl/source/kernel/multi_device_kernel.cpp b/opencl/source/kernel/multi_device_kernel.cpp index 0edb8cb86d..50ad6117be 100644 --- a/opencl/source/kernel/multi_device_kernel.cpp +++ b/opencl/source/kernel/multi_device_kernel.cpp @@ -82,7 +82,7 @@ cl_int MultiDeviceKernel::setArgSvmAlloc(uint32_t argIndex, void *svmPtr, MultiG for (auto rootDeviceIndex = 0u; rootDeviceIndex < kernels.size(); rootDeviceIndex++) { auto pKernel = getKernel(rootDeviceIndex); if (pKernel) { - if (svmAllocs && (svmAllocs->getGraphicsAllocations().size() <= rootDeviceIndex || !svmAllocs->getGraphicsAllocation(rootDeviceIndex))) { + if (svmAllocs && !svmAllocs->getGraphicsAllocation(rootDeviceIndex)) { continue; } auto svmAlloc = svmAllocs ? svmAllocs->getGraphicsAllocation(rootDeviceIndex) : nullptr;