SWDEV-313722 - Fix for segfault while using rocprof
Change-Id: Ia00868e058069ee73ce4a852ab2529d8f785a4b7
[ROCm/clr commit: 9a3cb1608b]
Цей коміт міститься в:
зафіксовано
Sarbojit Sarkar
джерело
68c75c9fb7
коміт
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(); }
|
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();
|
||||||
}
|
}
|
||||||
|
|||||||
Посилання в новій задачі
Заблокувати користувача