Datatypes#
MIOpen contains several datatypes at different levels of support. The enumerated datatypes are:
typedef enum {
miopenHalf = 0,
miopenFloat = 1,
miopenInt32 = 2,
miopenInt8 = 3,
/* Value 4 is reserved. */
miopenBFloat16 = 5,
miopenDouble = 6,
miopenFloat8 = 7,
miopenBFloat8 = 8
} miopenDataType_t;
Of these types only miopenFloat
and miopenHalf
are fully supported across all layers in MIOpen.
Refer to the individual Modules in the API library for specific
datatype support and limitations.
Type descriptions:
miopenHalf
: 16-bit floating pointmiopenFloat
: 32-bit floating pointmiopenInt32
: 32-bit integer, used primarily forint8
convolution outputsmiopenInt8
: 8-bit integer; supported byint8
convolution forward path, tensor set, tensor copy, tensor cast, tensor transform, tensor transpose, and im2colmiopenBFloat16
: brain float fp-16 (8-bit exponent, 7-bit fraction); supported by convolutions, tensor set, and tensor copymiopenDouble
: 64-bit floating point; supported by reduction, layerNorm, and batchNormmiopenFloat8
: 8-bit floating point (layout 1.4.3, exponent bias 7); supported by convolutionsmiopenBFloat8
: 8-bit floating point (layout 1.5.2, exponent bias 15); supported by convolutions
In addition to these standard datatypes, pooling also contains its own indexing datatypes:
typedef enum {
miopenIndexUint8 = 0,
miopenIndexUint16 = 1,
miopenIndexUint32 = 2,
miopenIndexUint64 = 3,
} miopenIndexType_t;