Adding checks for function, size and params in ihipModuleLaunchKernel to have common message for hipModuleLaunch and hipExtModuleLaunch
Change-Id: I11921ad753930872572571dbfd1c12daba83a725
[ROCm/clr commit: dfe6f1ef27]
Tento commit je obsažen v:
odevzdal
Jatin Chaudhary
rodič
6fd533b393
revize
8aa2ebb4de
@@ -222,6 +222,16 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
||||
blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra, startEvent,
|
||||
stopEvent, flags, params);
|
||||
|
||||
if (f == nullptr) {
|
||||
DevLogPrintfError("%s", "Function passed is null");
|
||||
return hipErrorInvalidImage;
|
||||
}
|
||||
if ((kernelParams != nullptr) && (extra != nullptr)) {
|
||||
DevLogPrintfError(
|
||||
"%s", "Both, kernelParams and extra Params are provided, only one should be provided");
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
hip::DeviceFunc* function = hip::DeviceFunc::asFunction(f);
|
||||
amd::Kernel* kernel = function->kernel();
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele