Class DataType ¶
-
Defined in File torch_tensorrt.h
Class Documentation ¶
-
class
torch_tensorrt
::
DataType
¶
-
Supported Data Types that can be used with TensorRT engines
This class is compatable with c10::DataTypes (but will check for TRT support) so there should not be a reason that you need to use this type explictly.
Public Types
-
enum
Value
¶
-
Underlying enum class to support the DataType Class
In the case that you need to use the DataType class itself, interface using this enum vs. normal instatination
ex. torch_tensorrt::DataType type = DataType::kFloat ;
Values:
-
enumerator
kFloat
¶
-
FP32.
-
enumerator
kHalf
¶
-
FP16.
-
enumerator
kChar
¶
-
INT8.
-
enumerator
kInt
¶
-
INT.
-
enumerator
kBool
¶
-
Bool.
-
enumerator
kUnknown
¶
-
Sentinel value.
-
enumerator
kFloat
¶
Public Functions
-
DataType
(
)
=
default
¶
-
Construct a new Data Type object.
-
DataType
(
c10
::
ScalarType
t
)
¶
-
Construct a new Data Type object from torch type enums.
- Parameters
-
t –
-
explicit
operator
bool
(
)
=
delete
¶
-
inline
constexpr
bool
operator
==
(
DataType
other
)
const
¶
-
Comparision operator for DataType .
- Parameters
-
other –
- Returns
-
true
- Returns
-
false
-
inline
constexpr
bool
operator
==
(
DataType
::
Value
other
)
const
¶
-
Comparision operator for DataType .
- Parameters
-
other –
- Returns
-
true
- Returns
-
false
-
enum
Value
¶