SWDEV-368280 - Fix crash in graph stream capture

Fix crash in graph stream capture for hipExtModuleLaunchKernel.

Change-Id: Ieaaed1d15b4d268193d8341d4b1609f83a9e4789


[ROCm/clr commit: 530ec02aae]
This commit is contained in:
Tao Sang authored and Tao Sang committed 2022-11-28 09:33:39 -05:00
1 parent 65d01b5347
commit 9d1ce7a68f
1 file changed
+7 -2
@@ -679,9 +679,14 @@ class hipGraphKernelNode : public hipGraphNode {
unsigned int device) {
hipFunction_t func = nullptr;
hipError_t status = PlatformState::instance().getStatFunc(&func, params.func, device);
if (status != hipSuccess) {
ClPrint(amd::LOG_ERROR, amd::LOG_CODE,"[hipGraph] getStatFunc() Failed with err %d",
if (status == hipErrorInvalidSymbol) {
// capturehipExtModuleLaunchKernel() mixes host function with hipFunction_t, so we convert
// here. If it's wrong, later functions will fail
func = static_cast<hipFunction_t>(params.func);
ClPrint(amd::LOG_INFO, amd::LOG_CODE,"[hipGraph] capturehipExtModuleLaunchKernel() should be called",
status);
} else if (status != hipSuccess) {
ClPrint(amd::LOG_ERROR, amd::LOG_CODE,"[hipGraph] getStatFunc() failed with err %d", status);
}
return func;
}