SWDEV-313722 - Fix for segfault while using rocprof

Change-Id: Ia00868e058069ee73ce4a852ab2529d8f785a4b7


[ROCm/clr commit: 9a3cb1608b]
Cette révision appartient à :
Sarbojit Sarkar a créé et Sarbojit Sarkar a révisé 2021-12-05 23:14:26 -05:00
1 Parent 68c75c9fb7
révision cf01ea2dae
1 fichier modifié
+3
+3
Voir le fichier
@@ -32,6 +32,9 @@ extern const std::string& FunctionName(const hipFunction_t f);
const char* hipKernelNameRef(const hipFunction_t f) { return FunctionName(f).c_str(); }
int hipGetStreamDeviceId(hipStream_t stream) {
if (!hip::isValid(stream)) {
return -1;
}
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
return (s != nullptr)? s->DeviceId() : ihipGetDevice();
}