SWDEV-313722 - Fix for segfault while using rocprof
Change-Id: Ia00868e058069ee73ce4a852ab2529d8f785a4b7
[ROCm/clr commit: 9a3cb1608b]
This commit is contained in:
committed by
Sarbojit Sarkar
szülő
68c75c9fb7
commit
cf01ea2dae
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user