mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Improve error handling in clCreateKernel
return nullptr when kernel initialization fails Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
84a0813dfa
commit
d2ac316e47
@@ -38,6 +38,9 @@ class MultiDeviceKernel : public BaseObject<_cl_kernel> {
|
||||
continue;
|
||||
}
|
||||
kernels[rootDeviceIndex] = Kernel::create<kernel_t, program_t>(program, *kernelInfos[rootDeviceIndex], *pDevice, errcodeRet);
|
||||
if (!kernels[rootDeviceIndex]) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
auto pMultiDeviceKernel = new multi_device_kernel_t(std::move(kernels), kernelInfos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user