SWDEV-376995 - Added if statement so that when AQL dispatch failed it returns corresponding hip error instead of hipSuccess

Change-Id: I0724fbcf0833c5dd8b2e4d6e443b3e226046dddf
This commit is contained in:
victzhan authored and Victor Zhang committed 2023-02-14 14:30:50 -05:00
1 parent e34be4fbee
commit 4e324a9c63
1 file changed
+7 -1
+7 -1
View File
@@ -336,10 +336,16 @@ hipError_t ihipLaunchKernelCommand(amd::Command*& command, hipFunction_t f,
// Capture the kernel arguments
if (CL_SUCCESS != kernelCommand->captureAndValidate()) {
delete kernelCommand;
kernelCommand->release();
return hipErrorOutOfMemory;
}
if (kernelCommand->status() == CL_INVALID_OPERATION) {
kernelCommand->release();
return hipErrorIllegalState;
}
command = kernelCommand;
return hipSuccess;
}