The data type the tensor can hold.
More...
#include <dlpack.h>
|
uint8_t | code |
| Type code of base types. We keep it uint8_t instead of DLDataTypeCode for minimal memory footprint, but the value should be one of DLDataTypeCode enum values. More...
|
|
uint8_t | bits |
| Number of bits, common choices are 8, 16, 32. More...
|
|
uint16_t | lanes |
| Number of lanes in the type, used for vector types. More...
|
|
The data type the tensor can hold.
Examples
- float: type_code = 2, bits = 32, lanes=1
- float4(vectorized 4 float): type_code = 2, bits = 32, lanes=4
- int8: type_code = 0, bits = 8, lanes=1
Definition at line 93 of file dlpack.h.
◆ bits
Number of bits, common choices are 8, 16, 32.
Definition at line 103 of file dlpack.h.
◆ code
Type code of base types. We keep it uint8_t instead of DLDataTypeCode for minimal memory footprint, but the value should be one of DLDataTypeCode enum values.
Definition at line 99 of file dlpack.h.
◆ lanes
uint16_t DLDataType::lanes |
Number of lanes in the type, used for vector types.
Definition at line 105 of file dlpack.h.
The documentation for this struct was generated from the following file:
- /workspace/examples/onnx/common/dlpack/dlpack.h