File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,6 @@ class MemEvent {
120120
121121class CudaEvent {
122122#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
123-
124123 public:
125124 CudaEvent () {
126125#ifdef PADDLE_WITH_HIP
@@ -130,23 +129,15 @@ class CudaEvent {
130129#endif
131130 }
132131
133- explicit CudaEvent (unsigned int flags) : flags_(flags) {
132+ CudaEvent (unsigned int flags) : flags_(flags) {
134133#ifdef PADDLE_WITH_HIP
135134 hipEventCreateWithFlags (&event_, flags_);
136135#else
137136 cudaEventCreateWithFlags (&event_, flags_);
138137#endif
139138 }
140139
141- ~CudaEvent () {
142- #ifdef PADDLE_WITH_HIP
143- PADDLE_ENFORCE_CUDA_SUCCESS (hipEventDestroy (event_));
144- #else
145- PADDLE_ENFORCE_CUDA_SUCCESS (cudaEventDestroy (event_));
146- #endif
147- }
148-
149- void Record (const paddle::platform::stream::CUDAStream& stream) {
140+ void Record (paddle::platform::stream::CUDAStream& stream) {
150141#ifdef PADDLE_WITH_HIP
151142 PADDLE_ENFORCE_CUDA_SUCCESS (hipEventRecord (event_, stream.raw_stream ()));
152143#else
You can’t perform that action at this time.
0 commit comments