Match hipLaunchCooperativeKernelMultiDevice behavior with nvidia (#385)
Co-authored-by: Anusha GodavarthySurya <Anusha.GodavarthySurya@amd.com>
This commit is contained in:
committed by
GitHub
orang tua
2ddfe40de0
melakukan
63c4020e49
@@ -859,6 +859,20 @@ hipError_t ihipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsL
|
||||
if (!hip::isValid(launch.stream)) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
if (launch.stream == nullptr || launch.stream == hipStreamLegacy) {
|
||||
return hipErrorInvalidResourceHandle;
|
||||
}
|
||||
|
||||
// Not supported while stream is capturing
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(launch.stream);
|
||||
if (s->GetCaptureStatus() == hipStreamCaptureStatusActive) {
|
||||
s->SetCaptureStatus(hipStreamCaptureStatusInvalidated);
|
||||
return hipErrorStreamCaptureUnsupported;
|
||||
}
|
||||
if (s->GetCaptureStatus() == hipStreamCaptureStatusInvalidated) {
|
||||
return hipErrorStreamCaptureInvalidated;
|
||||
}
|
||||
|
||||
hip::Stream* hip_stream = hip::getStream(launch.stream);
|
||||
hipFunction_t func = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user