Public Member Functions | |
| MSNPUGuardImpl (DeviceType t) | |
| DeviceType | type () const override |
| Return the type of device managed by this guard implementation. | |
| Device | exchangeDevice (Device d) const override |
| Device | getDevice () const override |
| Get the current device. | |
| void | setDevice (Device d) const override |
| void | uncheckedSetDevice (Device d) const noexceptoverride |
| Stream | getStream (Device d) const noexceptoverride |
| Stream | exchangeStream (Stream s) const noexceptoverride |
| DeviceIndex | deviceCount () const override |
| Get the number of devices. | |
Public Member Functions inherited from c10::impl::DeviceGuardImplInterface | |
| virtual Device | exchangeDevice (Device) const =0 |
| Set the current device to Device, and return the previous Device. | |
| virtual void | setDevice (Device) const =0 |
| Set the current device to Device. | |
| virtual void | uncheckedSetDevice (Device) const noexcept=0 |
| Set the current device to Device, without checking for errors (so, e.g., this can be called from a destructor). | |
| virtual Stream | getStream (Device) const noexcept=0 |
| Get the current stream for a given device. | |
| virtual Stream | exchangeStream (Stream) const noexcept=0 |
| Set a stream to be the thread local current stream for its device. More... | |
| 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::MSNPU |
Definition at line 96 of file msnpu_extension.cpp.
1.8.11