rml_op_type

Operations supported by Radeon ML.

API

Graph Manipulation

Items

Name

Value

Brief Explanation

RML_OP_UNSPECIFIED

0

Unspecified operation type.

RML_OP_ABS

1010

Calculates absolute of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::abs, rml_op_unary_params

RML_OP_ACOS

1020

Calculates arccosine of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::acos, rml_op_unary_params

RML_OP_ADD

1030

Sums input tensors up, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::add, rml_op_binary_params

RML_OP_ASIN

1050

Calculates arcsine of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::asin, rml_op_unary_params

RML_OP_ATAN

1070

Calculates arctangent of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::atan, rml_op_unary_params

RML_OP_AVG

1080

Calculates average between input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::avg, rml_op_binary_params

RML_OP_BATCH_NORM

1090

Performs batch normalization of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::batch_norm, rml_op_batch_norm_params

RML_OP_BIAS_ADD

1100

Adds bias to an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::bias_add, rml_op_bias_add_params

RML_OP_CAST

1110

Casts elements of an input tensor to a specified type.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::cast, rml_op_cast_params

RML_OP_CEIL

1120

Ceils elements of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::ceil, rml_op_unary_params

RML_OP_CELU

1130

Applies CeLU activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::celu, rml_op_celu_params

RML_OP_CLIP

1140

Limits input tensor values within a specified range.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::clip, rml_op_clip_params

RML_OP_CONCAT

1150

Concatenates input tensors into a single tensor along a specified axis.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::concat, rml_op_concat_params

RML_OP_CONST

1160

Stores specified tensor data.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::constant, rml_op_const_params

RML_OP_CONV_2D

1190

Performs 2D convolution of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::conv_2d, rml_op_conv_2d_params

RML_OP_CONV_2D_DEPTHWISE

1200

Performs depthwise 2D convolution of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::conv2d_depthwise, rml_op_conv_2d_params

RML_OP_CONV_2D_TRANSPOSE

1210

Performs transposed 2D convolution of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::conv2d_transpose, rml_op_conv_2d_params

RML_OP_COS

1240

Calculates cosine of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::cos, rml_op_unary_params

RML_OP_DEPTH_TO_SPACE

1250

Rearranges input tensor data from channels into blocks of spatial data.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::depth_to_space, rml_op_depth_to_space_params

RML_OP_DIV

1270

Divides input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::div, rml_op_binary_params

RML_OP_ELU

1300

Applies ELU activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::elu, rml_op_elu_params

RML_OP_EXP

1310

Calculates exponent of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::exp, rml_op_unary_params

RML_OP_FLATTEN

1330

Flattens an input tensor into a 2D matrix.
Backend support:

  • DirectML: Patial. Cannot handle some cases.

  • MIOpen: Partial. Cannot handle some cases.

  • Apple MPS: No.

See also: rml_op_desc::flatten, rml_op_unary_params

RML_OP_FLOOR

1340

Floors elements of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::floor, rml_op_unary_params

RML_OP_GEMM

1360

Calculates gemm of input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::gemm, rml_op_gemm_params

RML_OP_IDENTITY

1380

Identity operator.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::identity, rml_op_unary_params

RML_OP_LEAKY_RELU

1390

Applies Leaky ReLU activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::leaky_relu, rml_op_leaky_relu_params

RML_OP_LOCAL_RESPONSE_NORM

1410

Performs local response normalization of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::local_response_norm, rml_op_local_response_norm_params

RML_OP_LOG_SOFTMAX

1420

Calculates LogSoftMax of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::log_softmax, rml_op_unary_params

RML_OP_LOGN

1430

Calculates natural logarithm of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::logn, rml_op_unary_params

RML_OP_MAX

1440

Calculates maximum of input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::max, rml_op_binary_params

RML_OP_MIN

1450

Calculates minimum of input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::min, rml_op_binary_params

RML_OP_MUL

1460

Multiplies input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::mul, rml_op_binary_params

RML_OP_NEG

1470

Calculates neg of the input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::neg, rml_op_unary_params

RML_OP_PAD

1490

Describes a data reorganization operator that inflates the input tensor with zeroes (or some other value) on the edges
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::pad, rml_op_pad_params

RML_OP_PARAMETRIC_RELU

1510

Performs Parametric ReLU activation of an input tensor, elsement-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::parametric_relu, rml_op_binary_params

RML_OP_PLACEHOLDER

1520

Special operation that holds information about input data.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::placeholder, rml_op_placeholder_params

RML_OP_POOL_2D_AVG

1560

Performs 2D average pooling of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: No.

See also: rml_op_desc::pool_2d_avg, rml_op_pool_2d_params

RML_OP_POOL_2D_GLOBAL_AVG

1570

Performs 2D global average pooling of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: No.

See also: rml_op_desc::pool_2d_global_avg, rml_op_pool_2d_global_params

RML_OP_POOL_2D_MAX

1580

Performs 2D max pooling of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::pool_2d_max, rml_op_pool_2d_params

RML_OP_PORT

1625

Returns a specified output tensor of an input operation.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::port, rml_op_port_params

RML_OP_POW

1630

Calculates power of an input tensor, element-wise.
Backend support:

  • DirectML: Partial. Wrong results for negative base values.

  • MIOpen: Yes.

  • Apple MPS: Partial. Wrong results for negative base values.

See also: rml_op_desc::pow, rml_op_pow_params

RML_OP_QUANTIZE_LINEAR

1640

Transforms a hig-precision input tensor into a low-precision output tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::quantize_linear, rml_op_quantize_linear_params

RML_OP_RECIP

1650

Calculates reciprocal of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::recip, rml_op_unary_params

RML_OP_REDUCE_ADD

1660

Calculates sum of the input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_add, rml_op_reduce_params

RML_OP_REDUCE_ADD_SQUARE

1670

Calculates sum square of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_add_square, rml_op_reduce_params

RML_OP_REDUCE_ARGMAX

1680

Calculates maximum elements indices of input tensor elements along provided axis.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_argmax, rml_op_reduce_params

RML_OP_REDUCE_ARGMIN

1690

Calculates minimum elements indices of input tensor elements along provided axis.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_argmin, rml_op_reduce_params

RML_OP_REDUCE_AVG

1700

Calculates average of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_avg, rml_op_reduce_params

RML_OP_REDUCE_L1

1710

Calculates L1 norm of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_l1, rml_op_reduce_params

RML_OP_REDUCE_L2

1720

Calculates L2 norm of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_l2, rml_op_reduce_params

RML_OP_REDUCE_LOGN_ADD

1730

Calculates log sum of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_logn_add, rml_op_reduce_params

RML_OP_REDUCE_LOGN_ADD_EXP

1740

Calculates log sum exponent of input tensor element along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_logn_add_exp, rml_op_reduce_params

RML_OP_REDUCE_MAX

1750

Calculates maximum of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_max, rml_op_reduce_params

RML_OP_REDUCE_MIN

1760

Calculates minimum of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_min, rml_op_reduce_params

RML_OP_REDUCE_MUL

1770

Calculates product of input tensor elements along provided axes.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::reduce_mul, rml_op_reduce_params

RML_OP_RELU

1780

Applies ReLU activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::relu, rml_op_unary_params

RML_OP_RELU6

1790

Applies ReLU6 activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::relu6, rml_op_unary_params

RML_OP_RESHAPE

1800

Changes the shape of an input tensor without changing tensor data.
Backend support:

  • DirectML: Partial. Cannot handle some cases.

  • MIOpen: Partial. Cannot handle some cases.

  • Apple MPS: No.

See also: rml_op_desc::reshape, rml_op_reshape_params

RML_OP_RESIZE_2D_NEAREST

1810

Resizes an input tensor along spatial dims using the nearest neighbor algorithm.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::resize_2d, rml_op_resize_2d_params

RML_OP_RESIZE_2D_BICUBIC

1820

Resizes an input tensor along spatial dims using the bicubic algorithm.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::resize_2d_bicubic, rml_op_resize_2d_params

RML_OP_RSQRT

1870

Calculates reciprocal of square root of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::rsqrt, rml_op_unary_params

RML_OP_SELU

1880

Applies Scaled ELU activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::selu, rml_op_selu_params

RML_OP_SHAPE

1890

Outputs the shape of an input tensor.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::shape, rml_op_unary_params

RML_OP_SIGMOID

1900

Applies Sigmoid activation of the input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Partial. Invalid result in case of fp16.

See also: rml_op_desc::sigmoid, rml_op_unary_params

RML_OP_SIN

1910

Calculates sine of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::sin, rml_op_unary_params

RML_OP_SLICE

1920

Produces a strided slice of an input tensor along multiple axes.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: No.

See also: rml_op_desc::slice, rml_op_slice_params

RML_OP_SOFTMAX

1930

Applies Softmax activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::softmax, rml_op_unary_params

RML_OP_SOFTPLUS

1950

Applies Softplus activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::softplus, rml_op_unary_params

RML_OP_SOFTSIGN

1960

Applies Softsign activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::softsign, rml_op_unary_params

RML_OP_SPACE_TO_DEPTH

1970

Rearranges blocks of spatial tensor data into channels.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::space_to_depth, rml_op_space_to_depth_params

RML_OP_SQRT

1990

Calculates square root of an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::sqrt, rml_op_unary_params

RML_OP_SQUEEZE

2000

Removes single-dimensional entries from the shape of a tensor.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::squeeze, rml_op_squeeze_params

RML_OP_STACK

2010

Stacks a list of tensors with rank R into single tensor with rank R+1.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: No.

See also: rml_op_desc::stack, rml_op_stack_params

RML_OP_SUB

2020

Subtracts input tensors, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::sub, rml_op_binary_params

RML_OP_TAN

2030

Calculate tangent of the input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::tan, rml_op_unary_params

RML_OP_TANH

2040

Applies hyperbolic tangent activation to an input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Partial. Invalid result in case of fp16.

See also: rml_op_desc::tanh, rml_op_unary_params

RML_OP_THRESHOLDED_RELU

2050

Applies Thresholded ReLU activation of the input tensor, element-wise.
Backend support:

  • DirectML: Yes.

  • MIOpen: Yes.

  • Apple MPS: Yes.

See also: rml_op_desc::thresholded_relu, rml_op_thresholded_relu_params

RML_OP_TOP_K

2060

Retrieve the top-K largest or smallest elements along a specified axis.
Backend support:

  • DirectML: Yes.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::top_k, rml_op_top_k_params

RML_OP_TRANSPOSE

2070

Transposes an input tensor.
Backend support:

  • DirectML: Partial.

  • MIOpen: Partial.

  • Apple MPS: Partial.

See also: rml_op_desc::transpose, rml_op_transpose_params

RML_OP_UNSQUEEZE

2080

Inserts dimensions of size 1 at specified axis indices.
Backend support:

  • DirectML: Yes. Some layout transitions are unsupported.

  • MIOpen: No.

  • Apple MPS: No.

See also: rml_op_desc::unsqueeze, rml_op_unsqueeze_params