Class Device::DeviceType¶
Defined in File torch_tensorrt.h
Nested Relationships¶
This class is a nested type of Struct Device.
Class Documentation¶
-
class DeviceType¶
Supported Device Types that can be used with TensorRT engines
This class is compatable with c10::DeviceTypes (but will check for TRT support) but the only applicable value is at::kCUDA, which maps to DeviceType::kGPU
To use the DataType class itself, interface using the enum vs. normal instatination
ex. torch_tensorrt::DeviceType type = DeviceType::kGPU;
Public Types
-
enum Value¶
Underlying enum class to support the DeviceType Class
In the case that you need to use the DeviceType class itself, interface using this enum vs. normal instatination
ex. torch_tensorrt::DeviceType type = DeviceType::kGPU;
Values:
-
enumerator kGPU¶
Target GPU to run engine.
-
enumerator kDLA¶
Target DLA to run engine.
-
enumerator kGPU¶
Public Functions
-
DeviceType(c10::DeviceType t)¶
Construct a new Device Type object from torch device enums Note: The only valid value is torch::kCUDA (torch::kCPU is not supported)
- Parameters
t –
-
explicit operator bool() = delete¶
-
inline constexpr bool operator==(DeviceType other) const¶
Comparison operator for DeviceType.
- Parameters
other –
- Returns
true
false
-
inline constexpr bool operator!=(DeviceType other) const¶
Comparison operator for DeviceType.
- Parameters
other –
- Returns
true
false
-
enum Value¶