Operators#
2023-06-14
21 min read time
operation#
-
struct operation#
The operation interface represents an action an instruction will perform. All operation classes must be CopyConstructible.
operators#
-
namespace op#
Enums
Functions
-
std::ostream &operator<<(std::ostream &os, pooling_mode v)#
-
std::ostream &operator<<(std::ostream &os, rnn_direction v)#
-
struct allocate#
- #include <migraphx/op/allocate.hpp>
-
struct argmax#
- #include <migraphx/op/argmax.hpp>
-
struct argmin#
- #include <migraphx/op/argmin.hpp>
-
struct as_shape#
- #include <migraphx/op/as_shape.hpp>
-
template<class Derived>
struct binary : public migraphx::internal::op::op_name<Derived># - #include <migraphx/op/binary.hpp>
-
struct broadcast#
- #include <migraphx/op/broadcast.hpp>
1 input version: Broadcasts a tensor from the original shape to the broadcast_lens by setting the stride of broadcasted dimensions to zero.
axis
attribute for a 1D input shape is the output dimension that stays the same. ex: broadcasting shape [1024] -> [4, 1024, 3] has axis = 1 For higher rank input shapes, axis is an offset parameter for the broadcasting. Such that this operator would work in the opposite direction of NumPy broadcasting. ex: broadcasting shape [2, 2] -> [2, 2, 3] with axis = 02 input version: Broadcast the first input 1D shape into the second input shape based on the axis parameter. Handles broadcasting a 1D static shape into a higher rank dynamic shape. broadcast_lens is not used
-
struct capture#
- #include <migraphx/op/capture.hpp>
-
struct clip#
- #include <migraphx/op/clip.hpp>
-
struct concat#
- #include <migraphx/op/concat.hpp>
-
struct contiguous#
- #include <migraphx/op/contiguous.hpp>
The contiguous operator takes a non-standard input tensor and returns the same tensor but in standard form. For example, if input tensor A which has lens = (4,5) is first transposed, i.e. lens = (5,4), this tensor’s data layout remained the same during the transpose operation; only it’s shape lengths and strides were changed. This leaves the tensor in a non-standard form. The contiguous operator copies the underlying data such that resulting tensor is returned to a standard form.
-
struct convolution#
- #include <migraphx/op/convolution.hpp>
-
struct deconvolution#
- #include <migraphx/op/deconvolution.hpp>
-
struct dequantizelinear#
- #include <migraphx/op/dequantizelinear.hpp>
-
struct dot#
- #include <migraphx/op/dot.hpp>
-
struct flatten#
- #include <migraphx/op/flatten.hpp>
-
struct gather#
- #include <migraphx/op/gather.hpp>
-
struct gathernd#
- #include <migraphx/op/gathernd.hpp>
-
struct get_tuple_elem#
- #include <migraphx/op/get_tuple_elem.hpp>
-
struct gru#
- #include <migraphx/op/gru.hpp>
-
struct highest#
- #include <migraphx/op/reduce_op.hpp>
-
struct identity#
- #include <migraphx/op/identity.hpp>
-
struct if_op#
- #include <migraphx/op/if_op.hpp>
-
struct im2col#
- #include <migraphx/op/im2col.hpp>
-
struct leaky_relu : public migraphx::internal::op::unary<leaky_relu>#
- #include <migraphx/op/leaky_relu.hpp>
-
struct load#
- #include <migraphx/op/load.hpp>
-
struct logical_and : public migraphx::internal::op::binary<logical_and>#
- #include <migraphx/op/logical_and.hpp>
-
struct logical_or : public migraphx::internal::op::binary<logical_or>#
- #include <migraphx/op/logical_or.hpp>
-
struct logical_xor : public migraphx::internal::op::binary<logical_xor>#
- #include <migraphx/op/logical_xor.hpp>
-
struct logsoftmax#
- #include <migraphx/op/logsoftmax.hpp>
-
struct loop#
- #include <migraphx/op/loop.hpp>
-
struct lowest#
- #include <migraphx/op/reduce_op.hpp>
-
struct lrn#
- #include <migraphx/op/lrn.hpp>
-
struct lstm#
- #include <migraphx/op/lstm.hpp>
-
struct multibroadcast#
- #include <migraphx/op/multibroadcast.hpp>
Broadcast multiple dimensions between two tensors. Two versions of this operator: one input and two inputs. One input version uses output_lens attribute and broadcasts to it. Two inputs version broadcasts both inputs to the common shape at evaluation time.
-
struct multinomial#
- #include <migraphx/op/multinomial.hpp>
-
struct nonmaxsuppression#
- #include <migraphx/op/nonmaxsuppression.hpp>
-
struct nonzero#
- #include <migraphx/op/nonzero.hpp>
-
struct one#
- #include <migraphx/op/reduce_op.hpp>
-
template<class Derived>
struct op_name# - #include <migraphx/op/name.hpp>
Create name from class.
Subclassed by migraphx::internal::op::binary< add >, migraphx::internal::op::binary< div >, migraphx::internal::op::binary< equal >, migraphx::internal::op::binary< fmod >, migraphx::internal::op::binary< greater >, migraphx::internal::op::binary< less >, migraphx::internal::op::binary< logical_and >, migraphx::internal::op::binary< logical_or >, migraphx::internal::op::binary< logical_xor >, migraphx::internal::op::binary< max >, migraphx::internal::op::binary< min >, migraphx::internal::op::binary< mod >, migraphx::internal::op::binary< mul >, migraphx::internal::op::binary< pow >, migraphx::internal::op::binary< prelu >, migraphx::internal::op::binary< sqdiff >, migraphx::internal::op::binary< sub >, migraphx::internal::op::prefix_scan_op< prefix_scan_sum >, migraphx::internal::op::reduce_op< reduce_max >, migraphx::internal::op::reduce_op< reduce_mean >, migraphx::internal::op::reduce_op< reduce_min >, migraphx::internal::op::reduce_op< reduce_prod >, migraphx::internal::op::reduce_op< reduce_sum >, migraphx::internal::op::scatter< scatter_add >, migraphx::internal::op::scatter< scatter_mul >, migraphx::internal::op::scatter< scatter_none >, migraphx::internal::op::scatternd_op< scatternd_add >, migraphx::internal::op::scatternd_op< scatternd_mul >, migraphx::internal::op::scatternd_op< scatternd_none >, migraphx::internal::op::unary< abs >, migraphx::internal::op::unary< acos >, migraphx::internal::op::unary< acosh >, migraphx::internal::op::unary< asin >, migraphx::internal::op::unary< asinh >, migraphx::internal::op::unary< atan >, migraphx::internal::op::unary< atanh >, migraphx::internal::op::unary< ceil >, migraphx::internal::op::unary< convert >, migraphx::internal::op::unary< cos >, migraphx::internal::op::unary< cosh >, migraphx::internal::op::unary< elu >, migraphx::internal::op::unary< erf >, migraphx::internal::op::unary< exp >, migraphx::internal::op::unary< floor >, migraphx::internal::op::unary< isnan >, migraphx::internal::op::unary< layout >, migraphx::internal::op::unary< leaky_relu >, migraphx::internal::op::unary< log >, migraphx::internal::op::unary< neg >, migraphx::internal::op::unary< recip >, migraphx::internal::op::unary< relu >, migraphx::internal::op::unary< round >, migraphx::internal::op::unary< rsqrt >, migraphx::internal::op::unary< sigmoid >, migraphx::internal::op::unary< sign >, migraphx::internal::op::unary< sin >, migraphx::internal::op::unary< sinh >, migraphx::internal::op::unary< sqrt >, migraphx::internal::op::unary< tan >, migraphx::internal::op::unary< tanh >, migraphx::internal::op::unary< unary_not >, migraphx::internal::op::binary< Derived >, migraphx::internal::op::prefix_scan_op< Derived >, migraphx::internal::op::reduce_op< Derived >, migraphx::internal::op::scatter< Derived >, migraphx::internal::op::scatternd_op< Derived >, migraphx::internal::op::unary< Derived >
-
struct outline#
- #include <migraphx/op/outline.hpp>
-
struct pad#
- #include <migraphx/op/pad.hpp>
-
struct pointwise#
- #include <migraphx/op/pointwise.hpp>
-
struct pooling#
- #include <migraphx/op/pooling.hpp>
-
template<class Derived>
struct prefix_scan_op : public migraphx::internal::op::op_name<Derived># - #include <migraphx/op/prefix_scan_op.hpp>
-
struct prefix_scan_sum : public migraphx::internal::op::prefix_scan_op<prefix_scan_sum>#
- #include <migraphx/op/prefix_scan_sum.hpp>
-
struct quant_convolution#
- #include <migraphx/op/quant_convolution.hpp>
-
struct quant_dot#
- #include <migraphx/op/quant_dot.hpp>
-
struct quantizelinear#
- #include <migraphx/op/quantizelinear.hpp>
-
struct reduce_max : public migraphx::internal::op::reduce_op<reduce_max>#
- #include <migraphx/op/reduce_max.hpp>
-
struct reduce_mean : public migraphx::internal::op::reduce_op<reduce_mean>#
- #include <migraphx/op/reduce_mean.hpp>
-
struct reduce_min : public migraphx::internal::op::reduce_op<reduce_min>#
- #include <migraphx/op/reduce_min.hpp>
-
template<class Derived>
struct reduce_op : public migraphx::internal::op::op_name<Derived># - #include <migraphx/op/reduce_op.hpp>
-
struct reduce_prod : public migraphx::internal::op::reduce_op<reduce_prod>#
- #include <migraphx/op/reduce_prod.hpp>
-
struct reduce_sum : public migraphx::internal::op::reduce_op<reduce_sum>#
- #include <migraphx/op/reduce_sum.hpp>
-
struct reshape#
- #include <migraphx/op/reshape.hpp>
-
struct reverse#
- #include <migraphx/op/reverse.hpp>
-
struct rnn#
- #include <migraphx/op/rnn.hpp>
-
struct rnn_last_cell_output#
- #include <migraphx/op/rnn_last_cell_output.hpp>
-
struct rnn_last_hs_output#
- #include <migraphx/op/rnn_last_hs_output.hpp>
-
struct rnn_var_sl_last_output#
- #include <migraphx/op/rnn_var_sl_last_output.hpp>
-
struct rnn_var_sl_shift_output#
- #include <migraphx/op/rnn_variable_seq_lens.hpp>
-
struct rnn_var_sl_shift_sequence#
- #include <migraphx/op/rnn_variable_seq_lens.hpp>
-
struct roialign#
- #include <migraphx/op/roialign.hpp>
-
struct scalar#
- #include <migraphx/op/scalar.hpp>
-
template<class Derived>
struct scatter : public migraphx::internal::op::op_name<Derived># - #include <migraphx/op/scatter.hpp>
-
struct scatter_add : public migraphx::internal::op::scatter<scatter_add>#
- #include <migraphx/op/scatter_add.hpp>
-
struct scatter_mul : public migraphx::internal::op::scatter<scatter_mul>#
- #include <migraphx/op/scatter_mul.hpp>
-
struct scatter_none : public migraphx::internal::op::scatter<scatter_none>#
- #include <migraphx/op/scatter_none.hpp>
-
struct scatternd_add : public migraphx::internal::op::scatternd_op<scatternd_add>#
- #include <migraphx/op/scatternd_add.hpp>
-
struct scatternd_mul : public migraphx::internal::op::scatternd_op<scatternd_mul>#
- #include <migraphx/op/scatternd_mul.hpp>
-
struct scatternd_none : public migraphx::internal::op::scatternd_op<scatternd_none>#
- #include <migraphx/op/scatternd_none.hpp>
-
template<class Derived>
struct scatternd_op : public migraphx::internal::op::op_name<Derived># - #include <migraphx/op/scatternd_op.hpp>
-
struct slice#
- #include <migraphx/op/slice.hpp>
-
struct softmax#
- #include <migraphx/op/softmax.hpp>
-
struct squeeze#
- #include <migraphx/op/squeeze.hpp>
-
struct step#
- #include <migraphx/op/step.hpp>
-
struct topk#
- #include <migraphx/op/topk.hpp>
-
struct transpose#
- #include <migraphx/op/transpose.hpp>
-
template<class Derived>
struct unary : public migraphx::internal::op::op_name<Derived># - #include <migraphx/op/unary.hpp>
-
struct unary_not : public migraphx::internal::op::unary<unary_not>#
- #include <migraphx/op/unary_not.hpp>
-
struct undefined#
- #include <migraphx/op/undefined.hpp>
-
struct unknown#
- #include <migraphx/op/unknown.hpp>
-
struct unsqueeze#
- #include <migraphx/op/unsqueeze.hpp>
Adds dimensions to a tensor based on the axes attribute.
axes
are based on the number of output shape dimensions and should not contain duplicates.steps
are for modifying dimensions added to the middle of the original shape. Each step must be a factor of the original dimension. ex: unsqueeze(shape = [3, 4, 10], axes = [2, 4, 5], steps = [2]) -> shape = [3, 4, 2, 5, 1, 1] Dynamic shape version does not handlesteps
.
-
struct where#
- #include <migraphx/op/where.hpp>
-
struct zero#
- #include <migraphx/op/reduce_op.hpp>
-
std::ostream &operator<<(std::ostream &os, pooling_mode v)#