SWDEV-380703 - sync all streams individually
Avoid syncing blocking streams with the default stream,
since that introduces extra command dependencies and
doesn't allow to destroy memory after last submission
Change-Id: I618e9bd2091c4cf9157125612d8c4759030c5a80
[ROCm/clr commit: 1e88d2c52f]
This commit is contained in:
@@ -513,23 +513,9 @@ hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) {
|
||||
HIP_RETURN(hipErrorNotSupported);
|
||||
}
|
||||
|
||||
hipError_t hipDeviceSynchronize ( void ) {
|
||||
hipError_t hipDeviceSynchronize() {
|
||||
HIP_INIT_API(hipDeviceSynchronize);
|
||||
|
||||
hip::Stream* stream = hip::getNullStream();
|
||||
|
||||
if (!stream) {
|
||||
HIP_RETURN(hipErrorOutOfMemory);
|
||||
}
|
||||
|
||||
if (hip::Stream::StreamCaptureOngoing(reinterpret_cast<hipStream_t>(stream)) == true) {
|
||||
HIP_RETURN(hipErrorStreamCaptureUnsupported);
|
||||
}
|
||||
|
||||
stream->finish();
|
||||
|
||||
hip::Stream::syncNonBlockingStreams(hip::getCurrentDevice()->deviceId());
|
||||
|
||||
hip::Stream::SyncAllStreams(hip::getCurrentDevice()->deviceId());
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user