Skip to content

Commit 5ba231d

Browse files
authored
Merge pull request #6374 from reyoung/feature/remove_device_context_finish
Remove DeviceContext::Finish
2 parents 3df78ed + 6b9567e commit 5ba231d

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

paddle/platform/device_context.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ Place CUDADeviceContext::GetPlace() const { return place_; }
122122

123123
void CUDADeviceContext::Wait() const {
124124
PADDLE_ENFORCE(cudaStreamSynchronize(stream_));
125-
}
126-
127-
void CUDADeviceContext::Finish() const {
128-
Wait();
129125
PADDLE_ENFORCE(cudaGetLastError());
130126
}
131127

paddle/platform/device_context.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ class DeviceContext {
4646
DeviceType* GetEigenDevice() const;
4747

4848
virtual void Wait() const {}
49-
50-
virtual void Finish() const {}
5149
};
5250

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

82-
/*! \brief Check potential errors for the cuda kernel calls. */
83-
void Finish() const override;
84-
8580
/*! \brief Return place in the device context. */
8681
Place GetPlace() const override;
8782

0 commit comments

Comments
 (0)