Skip to content

Commit dcda866

Browse files
authored
fix cuda stream destru bug (#74011)
1 parent 1107fe4 commit dcda866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/phi/core/cuda_stream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ class CUDAStream {
141141

142142
~CUDAStream() {
143143
VLOG(10) << "~CUDAStream " << raw_stream();
144-
Synchronize();
145144
if (owned_ && stream_.id() != 0) {
145+
Synchronize();
146146
backends::gpu::GPUDeviceGuard guard(place_.device);
147147
#ifdef PADDLE_WITH_HIP
148148
hipStreamDestroy(raw_stream());

0 commit comments

Comments
 (0)