refactor(ocl): remove redundant check
Remove redundant check for graphicsAllocations.size() in set kernel arg svm method. Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
parent
93a30f002b
commit
5ffb93cf2a
|
@ -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<ClGfxCoreHelper>();
|
||||
|
||||
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue