SWDEV-313722 - Fix for segfault while using rocprof

Change-Id: Ia00868e058069ee73ce4a852ab2529d8f785a4b7


[ROCm/clr commit: 9a3cb1608b]
Bu işleme şunda yer alıyor:
Sarbojit Sarkar authored and Sarbojit Sarkar committed 2021-12-05 23:14:26 -05:00
1 ebeveyn 68c75c9fb7
işleme cf01ea2dae
1 file changed
+3
+3
Dosyayı Görüntüle
@@ -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(); } const char* hipKernelNameRef(const hipFunction_t f) { return FunctionName(f).c_str(); }
int hipGetStreamDeviceId(hipStream_t stream) { int hipGetStreamDeviceId(hipStream_t stream) {
if (!hip::isValid(stream)) {
return -1;
}
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream); hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
return (s != nullptr)? s->DeviceId() : ihipGetDevice(); return (s != nullptr)? s->DeviceId() : ihipGetDevice();
} }