diff --git a/paddle/fluid/platform/device_context.cc b/paddle/fluid/platform/device_context.cc index f006b490167a6..e28ace521674b 100644 --- a/paddle/fluid/platform/device_context.cc +++ b/paddle/fluid/platform/device_context.cc @@ -254,9 +254,8 @@ NPUDeviceContext::~NPUDeviceContext() { void NPUDeviceContext::Wait() const { platform::RecordEvent record_event("NPUDeviceContext/wait"); - NPUDeviceGuard guard(place_.device); VLOG(4) << "NPU context Wait"; - PADDLE_ENFORCE_NPU_SUCCESS(aclrtSynchronizeDevice()); + stream_->Wait(); } aclrtStream NPUDeviceContext::stream() const { return stream_->raw_stream(); }