SWDEV-325799 - Fix segfault with hipStreamPerThread

Change-Id: Ie6d4bf55131d65590234796443373b968a21b3d2
This commit is contained in:
Sarbojit Sarkar
2022-03-03 10:03:45 +00:00
committed by Sarbojit Sarkar
parent c58ba64a0b
commit 53b4888113
+6
View File
@@ -553,6 +553,12 @@ hipError_t ihipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsL
if ((numDevices > numActiveGPUs) || (launchParamsList == nullptr)) {
return hipErrorInvalidValue;
}
// Validate all streams passed by user
for (int i = 0; i < numDevices; ++i) {
if (!hip::isValid(launchParamsList[i].stream)) {
return hipErrorInvalidValue;
}
}
uint64_t allGridSize = 0;
std::vector<const amd::Device*> mgpu_list(numDevices);