DML_ELEMENT_WISE_MODULUS_FLOOR_OPERATOR_DESC structure (directml.h)
Computes the modulus, with the same results as the Python modulus, for each pair of corresponding elements from the input tensors, placing the result into the corresponding element of OutputTensor.
Because the quotient is rounded towards -inf, the result will have the same sign as the divisor.
f(a, b) = a - (b * floor(a / b))
This operator supports in-place execution, meaning that OutputTensor is permitted to alias one of the input tensors during binding.
Syntax
struct DML_ELEMENT_WISE_MODULUS_FLOOR_OPERATOR_DESC {
const DML_TENSOR_DESC *ATensor;
const DML_TENSOR_DESC *BTensor;
const DML_TENSOR_DESC *OutputTensor;
};
Members
ATensor
Type: const DML_TENSOR_DESC*
A tensor containing the left-hand side inputs.
BTensor
Type: const DML_TENSOR_DESC*
A tensor containing the right-hand side inputs.
OutputTensor
Type: const DML_TENSOR_DESC*
The output tensor to write the results to.
Availability
This operator was introduced in DML_FEATURE_LEVEL_2_1
.
Tensor constraints
ATensor, BTensor, and OutputTensor must have the same DataType, DimensionCount, and Sizes.
Tensor support
DML_FEATURE_LEVEL_6_0 and above
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
ATensor | Input | 1 to 8 | FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8 |
BTensor | 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 |
---|---|---|---|
ATensor | Input | 1 to 8 | FLOAT32, FLOAT16, INT32, INT16, INT8, UINT32, UINT16, UINT8 |
BTensor | Input | 1 to 8 | FLOAT32, FLOAT16, INT32, INT16, INT8, UINT32, UINT16, UINT8 |
OutputTensor | Output | 1 to 8 | FLOAT32, FLOAT16, INT32, INT16, INT8, UINT32, UINT16, UINT8 |
DML_FEATURE_LEVEL_2_1 and above
Tensor | Kind | Supported dimension counts | Supported data types |
---|---|---|---|
ATensor | Input | 4 | FLOAT32, FLOAT16, INT32, INT16, INT8, UINT32, UINT16, UINT8 |
BTensor | Input | 4 | FLOAT32, FLOAT16, INT32, INT16, INT8, UINT32, UINT16, UINT8 |
OutputTensor | Output | 4 | FLOAT32, FLOAT16, INT32, INT16, INT8, UINT32, UINT16, UINT8 |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 Build 20348 |
Minimum supported server | Windows 10 Build 20348 |
Header | directml.h |