|
|
@ -46,6 +46,8 @@ class DeviceContext {
|
|
|
|
DeviceType* GetEigenDevice() const;
|
|
|
|
DeviceType* GetEigenDevice() const;
|
|
|
|
|
|
|
|
|
|
|
|
virtual void Wait() const {}
|
|
|
|
virtual void Wait() const {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void Finish() const {}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CPUDeviceContext : public DeviceContext {
|
|
|
|
class CPUDeviceContext : public DeviceContext {
|
|
|
@ -77,6 +79,9 @@ class CUDADeviceContext : public DeviceContext {
|
|
|
|
/*! \brief Wait for all operations completion in the stream. */
|
|
|
|
/*! \brief Wait for all operations completion in the stream. */
|
|
|
|
void Wait() const override;
|
|
|
|
void Wait() const override;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief Check potential errors for the cuda kernel calls. */
|
|
|
|
|
|
|
|
void Finish() const override;
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief Return place in the device context. */
|
|
|
|
/*! \brief Return place in the device context. */
|
|
|
|
Place GetPlace() const override;
|
|
|
|
Place GetPlace() const override;
|
|
|
|
|
|
|
|
|
|
|
|