mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Create a new class for handling multi device SVM arguments in kernel
set arg SVM for devices in Kernel Related-To: NEO-5001 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5cd071f7d2
commit
00b2a28818
@@ -4790,7 +4790,7 @@ cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,
|
||||
}
|
||||
}
|
||||
|
||||
GraphicsAllocation *pSvmAlloc = nullptr;
|
||||
MultiGraphicsAllocation *pSvmAllocs = nullptr;
|
||||
if (argValue != nullptr) {
|
||||
auto svmManager = pKernel->getContext().getSVMAllocsManager();
|
||||
auto svmData = svmManager->getSVMAlloc(argValue);
|
||||
@@ -4803,11 +4803,11 @@ cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pSvmAlloc = svmData->gpuAllocations.getGraphicsAllocation(pKernel->getDevices()[0]->getRootDeviceIndex());
|
||||
pSvmAllocs = &svmData->gpuAllocations;
|
||||
}
|
||||
}
|
||||
|
||||
retVal = pKernel->setArgSvmAlloc(argIndex, const_cast<void *>(argValue), pSvmAlloc);
|
||||
retVal = pKernel->setArgMultiDeviceSvmAlloc(argIndex, const_cast<void *>(argValue), pSvmAllocs);
|
||||
TRACING_EXIT(clSetKernelArgSVMPointer, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user