Public Member Functions | |
HIPGuardImplMasqueradingAsCUDA (DeviceType t) | |
DeviceType | type () const override |
Return the type of device managed by this guard implementation. | |
Device | exchangeDevice (Device d) const override |
Set the current device to Device, and return the previous Device. | |
Device | getDevice () const override |
Get the current device. | |
void | setDevice (Device d) const override |
Set the current device to Device. | |
void | uncheckedSetDevice (Device d) const noexceptoverride |
Set the current device to Device, without checking for errors (so, e.g., this can be called from a destructor). | |
Stream | getStream (Device d) const noexceptoverride |
Get the current stream for a given device. | |
Stream | exchangeStream (Stream s) const noexceptoverride |
Set a stream to be the thread local current stream for its device. More... | |
DeviceIndex | deviceCount () const override |
Get the number of devices. | |
![]() | |
virtual | ~DeviceGuardImplInterface ()=default |
Intended use of this class is to leak the DeviceGuardImpl at program end. More... | |
Static Public Attributes | |
static constexpr DeviceType | static_type = DeviceType::CUDA |
Definition at line 54 of file HIPGuardImplMasqueradingAsCUDA.h.
|
inlineoverridevirtualnoexcept |
Set a stream to be the thread local current stream for its device.
Return the previous stream for that device. You are NOT required to set the current device to match the device of this stream.
Implements c10::impl::DeviceGuardImplInterface.
Definition at line 86 of file HIPGuardImplMasqueradingAsCUDA.h.