Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions paddle/platform/device_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ Place CUDADeviceContext::GetPlace() const { return place_; }

void CUDADeviceContext::Wait() const {
PADDLE_ENFORCE(cudaStreamSynchronize(stream_));
}

void CUDADeviceContext::Finish() const {
Wait();
PADDLE_ENFORCE(cudaGetLastError());
}

Expand Down
5 changes: 0 additions & 5 deletions paddle/platform/device_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class DeviceContext {
DeviceType* GetEigenDevice() const;

virtual void Wait() const {}

virtual void Finish() const {}
};

class CPUDeviceContext : public DeviceContext {
Expand Down Expand Up @@ -79,9 +77,6 @@ class CUDADeviceContext : public DeviceContext {
/*! \brief Wait for all operations completion in the stream. */
void Wait() const override;

/*! \brief Check potential errors for the cuda kernel calls. */
void Finish() const override;

/*! \brief Return place in the device context. */
Place GetPlace() const override;

Expand Down