SWDEV-283515 - Fix crashing in kernel launch on MGPUS
Fix wrong mixing of current device and stream device in
ihipModuleLaunchKernel() and hipLaunchCooperativeKernel().
Fix missing hipSetDevice() in hipMemcpyWithStream* tests.
Change-Id: I09333bb40d239bb42c832df5ea16d17eeaeff5e7
[ROCm/hip commit: a95ff95bf7]
This commit is contained in:
@@ -114,6 +114,13 @@ int Stream::DeviceId() const {
|
||||
return device_->deviceId();
|
||||
}
|
||||
|
||||
int Stream::DeviceId(const hipStream_t hStream) {
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(hStream);
|
||||
int deviceId = (s != nullptr)? s->DeviceId() : ihipGetDevice();
|
||||
assert(deviceId >= 0 && deviceId < static_cast<int>(g_devices.size()));
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
void Stream::syncNonBlockingStreams() {
|
||||
amd::ScopedLock lock(streamSetLock);
|
||||
for (auto& it : streamSet) {
|
||||
|
||||
Reference in New Issue
Block a user