DML_CAST_OPERATOR_DESC structure (directml.h)
Casts each element in the input to the data type of the output tensor, and stores the result in the corresponding element of the output.
Syntax
struct DML_CAST_OPERATOR_DESC {
const DML_TENSOR_DESC *InputTensor;
const DML_TENSOR_DESC *OutputTensor;
};
Members
InputTensor
Type: const DML_TENSOR_DESC*
The tensor to write the results to. This tensor's Sizes should match InputTensor.
OutputTensor
Type: const DML_TENSOR_DESC*
A pointer to a constant DML_TENSOR_DESC containing the description of the tensor to write the results to.
Remarks
Some data types might not be supported on certain hardware. To determine whether a data type is supported, use IDMLDevice::CheckFeatureSupport with DML_FEATURE_TENSOR_DATA_TYPE_SUPPORT.
Availability
This operator was introduced in DML_FEATURE_LEVEL_1_0
.
Tensor constraints
InputTensor and OutputTensor must have the same DimensionCount and Sizes.
Tensor support
DML_FEATURE_LEVEL_4_1 and above
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
InputTensor | Input | 1 to 8 | FLOAT64, FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
OutputTensor | Output | 1 to 8 | FLOAT64, FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
DML_FEATURE_LEVEL_3_1 and above
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
InputTensor | Input | 1 to 8 | FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
OutputTensor | Output | 1 to 8 | FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
DML_FEATURE_LEVEL_3_0 and above
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
InputTensor | Input | 4 | FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
OutputTensor | Output | 4 | FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
DML_FEATURE_LEVEL_1_0 and above
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
InputTensor | Input | 4 | FLOAT32, FLOAT16, INT16, INT8, UINT16, UINT8 |
OutputTensor | Output | 4 | FLOAT32, FLOAT16, INT16, INT8, UINT16, UINT8 |
Requirements
Requirement | Value |
---|---|
Header | directml.h |