SWDEV-368280 - Fix crash in graph stream capture

Fix crash in graph stream capture for hipExtModuleLaunchKernel.

Change-Id: Ieaaed1d15b4d268193d8341d4b1609f83a9e4789
This commit is contained in:
Tao Sang
2022-11-24 19:40:19 -05:00
zatwierdzone przez Tao Sang
rodzic f7ca4b8fb9
commit 530ec02aae
+7 -2
Wyświetl plik
@@ -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;
}