SWDEV-313905 - Fix segfault

Change-Id: I7b7bbe80a169014b5d4a8de134351b9f8bf11735


[ROCm/clr commit: 017603703b]
This commit is contained in:
Sarbojit Sarkar
2022-01-07 09:41:24 +00:00
committed by Sarbojit Sarkar
parent 641d0b9d6f
commit 8f0c0822ad
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ int Stream::DeviceId(const hipStream_t hStream) {
//return invalid device id
return -1;
}
hip::Stream* s = reinterpret_cast<hip::Stream*>(hStream);
hip::Stream* s = reinterpret_cast<hip::Stream*>(inputStream);
int deviceId = (s != nullptr)? s->DeviceId() : ihipGetDevice();
assert(deviceId >= 0 && deviceId < static_cast<int>(g_devices.size()));
return deviceId;