Merge pull request #6374 from reyoung/feature/remove_device_context_finish

Remove DeviceContext::Finish
del_some_in_makelist
qingqing01 8 years ago committed by GitHub
commit 5ba231d80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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());
}

@ -46,8 +46,6 @@ class DeviceContext {
DeviceType* GetEigenDevice() const;
virtual void Wait() const {}
virtual void Finish() const {}
};
class CPUDeviceContext : public DeviceContext {
@ -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;

Loading…
Cancel
Save