Adding checks for function, size and params in ihipModuleLaunchKernel to have common message for hipModuleLaunch and hipExtModuleLaunch
Change-Id: I11921ad753930872572571dbfd1c12daba83a725
This commit is contained in:
zatwierdzone przez
Jatin Chaudhary
rodzic
da6de84535
commit
dfe6f1ef27
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user