[DOCS] Update supported ops by PT FE (#21962)
This commit is contained in:
parent
2249513aa5
commit
16acb8d75e
|
|
@ -18,239 +18,372 @@ This page lists operations supported by OpenVINO Framework Frontend.
|
|||
========================================== ==========================================================================================
|
||||
PyTorch Supported Operations Limitations
|
||||
========================================== ==========================================================================================
|
||||
aten::__and__ Only for boolean inputs
|
||||
aten::__getitem__ Supported in limitted set of patterns
|
||||
aten::__not__
|
||||
aten::__or__
|
||||
aten::_convolution
|
||||
aten::_convolution_mode
|
||||
aten::_set_item
|
||||
aten::abs
|
||||
aten::acos
|
||||
aten::acos_
|
||||
aten::acosh
|
||||
aten::acosh_
|
||||
aten::adaptive_avg_pool2d
|
||||
aten::adaptive_avg_pool3d
|
||||
aten::adaptive_max_pool2d
|
||||
aten::add
|
||||
aten::add_
|
||||
aten::addcmul
|
||||
aten::addmm
|
||||
aten::append Supported in limitted set of patterns
|
||||
aten::arange
|
||||
aten::argsort
|
||||
aten::as_tensor
|
||||
aten::asin
|
||||
aten::asin_
|
||||
aten::asinh
|
||||
aten::asinh_
|
||||
aten::atan
|
||||
aten::atan_
|
||||
aten::atanh
|
||||
aten::atanh_
|
||||
aten::avg_pool1d
|
||||
aten::avg_pool2d
|
||||
aten::avg_pool3d
|
||||
aten::baddbmm
|
||||
aten::batch_norm
|
||||
aten::bitwise_not
|
||||
aten::bmm
|
||||
aten::Bool
|
||||
aten::cat
|
||||
aten::ceil
|
||||
aten::ceil_
|
||||
aten::chunk Supported in limitted set of patterns
|
||||
aten::clamp
|
||||
aten::clamp_max
|
||||
aten::clamp_min
|
||||
aten::clone
|
||||
aten::contiguous
|
||||
aten::conv_transpose1d
|
||||
aten::conv_transpose2d
|
||||
aten::conv_transpose3d
|
||||
aten::conv1d
|
||||
aten::conv2d
|
||||
aten::conv3d
|
||||
aten::convolution
|
||||
aten::copy
|
||||
aten::cos
|
||||
aten::cos_
|
||||
aten::cosh
|
||||
aten::cosh_
|
||||
aten::cumsum
|
||||
aten::detach
|
||||
aten::dim
|
||||
aten::div
|
||||
aten::div_
|
||||
aten::dropout
|
||||
aten::dropout_
|
||||
aten::einsum Supported in limitted set of patterns
|
||||
aten::elu
|
||||
aten::embedding
|
||||
aten::empty
|
||||
aten::eq
|
||||
aten::exp
|
||||
aten::expand Supported in limitted set of patterns
|
||||
aten::expand_as
|
||||
aten::eye
|
||||
aten::fill_
|
||||
aten::flatten
|
||||
aten::floor
|
||||
aten::floor_
|
||||
aten::floor_divide
|
||||
aten::floordiv
|
||||
aten::full
|
||||
aten::full_like
|
||||
aten::gather
|
||||
aten::ge
|
||||
aten::gelu
|
||||
aten::glu
|
||||
aten::grid_sampler
|
||||
aten::group_norm
|
||||
aten::gt
|
||||
aten::hardsigmoid
|
||||
aten::hardswish
|
||||
aten::hardswish_
|
||||
aten::hardtanh
|
||||
aten::hardtanh_
|
||||
aten::im2col
|
||||
aten::index Supported in limitted set of patterns
|
||||
aten::index_put_ Supported in limitted set of patterns
|
||||
aten::index_select
|
||||
aten::instance_norm
|
||||
aten::Int
|
||||
aten::IntImplicit
|
||||
aten::is_grad_enabled
|
||||
aten::layer_norm
|
||||
aten::le
|
||||
aten::leaky_relu
|
||||
aten::leaky_relu_
|
||||
aten::len
|
||||
aten::linalg_matrix_norm
|
||||
aten::linalg_norm
|
||||
aten::linalg_vector_norm
|
||||
aten::linear
|
||||
aten::log
|
||||
aten::log_
|
||||
aten::log2
|
||||
aten::log2_
|
||||
aten::lt
|
||||
aten::masked_fill
|
||||
aten::masked_fill_
|
||||
aten::matmul
|
||||
aten::max
|
||||
aten::max_pool1d
|
||||
aten::max_pool2d
|
||||
aten::max_pool3d
|
||||
aten::mean
|
||||
aten::meshgrid Supported in limitted set of patterns
|
||||
aten::min
|
||||
aten::mm
|
||||
aten::mul
|
||||
aten::mul_
|
||||
aten::narrow
|
||||
aten::ne
|
||||
aten::neg
|
||||
aten::new_empty
|
||||
aten::new_full
|
||||
aten::new_ones
|
||||
aten::new_zeros
|
||||
aten::nonzero
|
||||
aten::nonzero_numpy Supported in limitted set of patterns
|
||||
aten::norm
|
||||
aten::numel
|
||||
aten::ones
|
||||
aten::ones_like
|
||||
aten::pad Supported in limitted set of patterns
|
||||
aten::permute
|
||||
aten::pow
|
||||
aten::reciprocal
|
||||
aten::relu
|
||||
aten::relu_
|
||||
aten::relu6
|
||||
aten::remainder
|
||||
aten::repeat
|
||||
aten::repeat_interleave
|
||||
aten::reshape
|
||||
aten::reshape_as
|
||||
aten::roll
|
||||
aten::rsqrt
|
||||
aten::rsub
|
||||
aten::ScalarImplicit
|
||||
aten::scaled_dot_product_attention
|
||||
aten::select
|
||||
aten::selu
|
||||
aten::selu_
|
||||
aten::sigmoid
|
||||
aten::sigmoid_
|
||||
aten::sign
|
||||
aten::silu
|
||||
aten::silu_
|
||||
aten::sin
|
||||
aten::sin_
|
||||
aten::sinh
|
||||
aten::sinh_
|
||||
aten::size
|
||||
aten::slice
|
||||
aten::softmax
|
||||
aten::sort
|
||||
aten::split Supported in limitted set of patterns
|
||||
aten::split_with_sizes Supported in limitted set of patterns
|
||||
aten::sqrt
|
||||
aten::square
|
||||
aten::squeeze
|
||||
aten::stack Supported in limitted set of patterns
|
||||
aten::sub
|
||||
aten::sum
|
||||
aten::tan
|
||||
aten::tan_
|
||||
aten::tanh
|
||||
aten::tanh_
|
||||
aten::tensor
|
||||
aten::to
|
||||
aten::topk
|
||||
aten::transpose
|
||||
aten::tril
|
||||
aten::triu
|
||||
aten::type_as
|
||||
aten::unbind Supported in limitted set of patterns
|
||||
aten::unfold
|
||||
aten::unsqueeze
|
||||
aten::unsqueeze_
|
||||
aten::upsample_bicubic2d
|
||||
aten::upsample_bilinear2d
|
||||
aten::upsample_linear1d
|
||||
aten::upsample_nearest1d
|
||||
aten::upsample_nearest2d
|
||||
aten::upsample_nearest3d
|
||||
aten::upsample_trilinear3d
|
||||
aten::var
|
||||
aten::var_mean
|
||||
aten::view
|
||||
aten::where Supported in limitted set of patterns
|
||||
aten::zeros
|
||||
aten::zeros_like
|
||||
prim::Constant String and None constant is only supported when used by supported operation
|
||||
prim::device
|
||||
prim::DictConstruct Supported in limitted set of patterns
|
||||
prim::dtype Supported in limitted set of patterns
|
||||
prim::GetAttr
|
||||
prim::If
|
||||
prim::is_cuda
|
||||
prim::ListConstruct Supported in limitted set of patterns
|
||||
prim::ListUnpack Supported in limitted set of patterns
|
||||
prim::Loop
|
||||
prim::max Supported in limitted set of patterns
|
||||
prim::min Supported in limitted set of patterns
|
||||
prim::NumToTensor
|
||||
prim::PythonOp Supported only in tracing
|
||||
prim::requires_grad
|
||||
prim::TupleConstruct Supported in limitted set of patterns
|
||||
prim::type
|
||||
torchvision::deform_conv2d
|
||||
torchvision::nms
|
||||
torchvision::roi_align
|
||||
aten::__and__
|
||||
aten::__derive_index
|
||||
aten::__getitem__
|
||||
aten::__not__
|
||||
aten::__or__
|
||||
aten::__range_length
|
||||
aten::__xor__
|
||||
aten::_convolution
|
||||
aten::_convolution_mode
|
||||
aten::_native_multi_head_attention
|
||||
aten::_set_item
|
||||
aten::_shape_as_tensor
|
||||
aten::_upsample_bicubic2d_aa
|
||||
aten::_upsample_bilinear2d_aa
|
||||
aten::_weight_norm
|
||||
aten::abs
|
||||
aten::acos
|
||||
aten::acos_
|
||||
aten::acosh
|
||||
aten::acosh_
|
||||
aten::adaptive_avg_pool1d
|
||||
aten::adaptive_avg_pool2d
|
||||
aten::adaptive_avg_pool3d
|
||||
aten::adaptive_max_pool1d
|
||||
aten::adaptive_max_pool2d
|
||||
aten::adaptive_max_pool3d
|
||||
aten::add
|
||||
aten::add_
|
||||
aten::addcmul
|
||||
aten::addmm
|
||||
aten::alias
|
||||
aten::alias_copy
|
||||
aten::all
|
||||
aten::amax
|
||||
aten::amin
|
||||
aten::append Supported in limited set of patterns
|
||||
aten::arange
|
||||
aten::argmax
|
||||
aten::argmin
|
||||
aten::argsort
|
||||
aten::as_strided
|
||||
aten::as_tensor
|
||||
aten::asin
|
||||
aten::asin_
|
||||
aten::asinh
|
||||
aten::asinh_
|
||||
aten::atan
|
||||
aten::atan_
|
||||
aten::atanh
|
||||
aten::atanh_
|
||||
aten::avg_pool1d
|
||||
aten::avg_pool2d
|
||||
aten::avg_pool3d
|
||||
aten::baddbmm
|
||||
aten::batch_norm
|
||||
aten::bitwise_and
|
||||
aten::bitwise_not
|
||||
aten::bitwise_or
|
||||
aten::bitwise_xor
|
||||
aten::bmm
|
||||
aten::Bool
|
||||
aten::broadcast_tensors Supported in limited set of patterns
|
||||
aten::broadcast_to
|
||||
aten::cat
|
||||
aten::cdist
|
||||
aten::ceil
|
||||
aten::ceil_
|
||||
aten::channel_shuffle
|
||||
aten::chunk Supported in limited set of patterns
|
||||
aten::clamp
|
||||
aten::clamp_
|
||||
aten::clamp_max
|
||||
aten::clamp_min
|
||||
aten::clip
|
||||
aten::clip_
|
||||
aten::clone
|
||||
aten::complex Supported in limited set of patterns
|
||||
aten::concat
|
||||
aten::contiguous
|
||||
aten::conv1d
|
||||
aten::conv2d
|
||||
aten::conv3d
|
||||
aten::conv_transpose1d
|
||||
aten::conv_transpose2d
|
||||
aten::conv_transpose3d
|
||||
aten::convolution
|
||||
aten::copy
|
||||
aten::copy_
|
||||
aten::cos
|
||||
aten::cos_
|
||||
aten::cosh
|
||||
aten::cosh_
|
||||
aten::cross
|
||||
aten::cumsum
|
||||
aten::dequantize
|
||||
aten::detach
|
||||
aten::dim
|
||||
aten::div
|
||||
aten::div_
|
||||
aten::dropout
|
||||
aten::dropout_
|
||||
aten::einsum Supported in limited set of patterns
|
||||
aten::elu
|
||||
aten::embedding
|
||||
aten::embedding_bag
|
||||
aten::empty
|
||||
aten::empty_like
|
||||
aten::eq
|
||||
aten::erf
|
||||
aten::erf_
|
||||
aten::erfc
|
||||
aten::erfc_
|
||||
aten::exp
|
||||
aten::exp_
|
||||
aten::expand
|
||||
aten::expand_as
|
||||
aten::eye
|
||||
aten::fake_quantize_per_channel_affine
|
||||
aten::fake_quantize_per_tensor_affine
|
||||
aten::feature_dropout
|
||||
aten::fft_irfftn Supported in limited set of patterns
|
||||
aten::fft_rfftn Supported in limited set of patterns
|
||||
aten::fill
|
||||
aten::fill_
|
||||
aten::fill_diagonal_
|
||||
aten::flatten
|
||||
aten::flip
|
||||
aten::floor
|
||||
aten::floor_
|
||||
aten::floor_divide
|
||||
aten::floordiv
|
||||
aten::fmod
|
||||
aten::frobenius_norm
|
||||
aten::full
|
||||
aten::full_like
|
||||
aten::gather
|
||||
aten::ge
|
||||
aten::gelu
|
||||
aten::glu
|
||||
aten::grid_sampler
|
||||
aten::group_norm
|
||||
aten::gru
|
||||
aten::gt
|
||||
aten::hardsigmoid
|
||||
aten::hardswish
|
||||
aten::hardswish_
|
||||
aten::hardtanh
|
||||
aten::hardtanh_
|
||||
aten::im2col
|
||||
aten::imag Supported in limited set of patterns
|
||||
aten::index Supported in limited set of patterns
|
||||
aten::index_put_
|
||||
aten::index_select
|
||||
aten::instance_norm
|
||||
aten::Int
|
||||
aten::IntImplicit
|
||||
aten::is_grad_enabled
|
||||
aten::is_nonzero
|
||||
aten::item
|
||||
aten::layer_norm
|
||||
aten::le
|
||||
aten::leaky_relu
|
||||
aten::leaky_relu_
|
||||
aten::len
|
||||
aten::lift
|
||||
aten::lift_fresh
|
||||
aten::lift_fresh_copy
|
||||
aten::linalg_cross
|
||||
aten::linalg_matrix_norm
|
||||
aten::linalg_norm
|
||||
aten::linalg_vector_norm
|
||||
aten::linear
|
||||
aten::linspace
|
||||
aten::log
|
||||
aten::log10
|
||||
aten::log10_
|
||||
aten::log1p
|
||||
aten::log1p_
|
||||
aten::log2
|
||||
aten::log2_
|
||||
aten::log_
|
||||
aten::log_softmax
|
||||
aten::logical_and
|
||||
aten::logical_not
|
||||
aten::logical_or
|
||||
aten::logical_xor
|
||||
aten::lstm
|
||||
aten::lt
|
||||
aten::masked_fill
|
||||
aten::masked_fill_
|
||||
aten::masked_scatter
|
||||
aten::masked_scatter_
|
||||
aten::matmul
|
||||
aten::max
|
||||
aten::max_pool1d
|
||||
aten::max_pool1d_with_indices
|
||||
aten::max_pool2d
|
||||
aten::max_pool2d_with_indices
|
||||
aten::max_pool3d
|
||||
aten::max_pool3d_with_indices
|
||||
aten::maximum
|
||||
aten::mean
|
||||
aten::meshgrid
|
||||
aten::min
|
||||
aten::minimum
|
||||
aten::mm
|
||||
aten::mul
|
||||
aten::mul_
|
||||
aten::multinomial
|
||||
aten::multiply
|
||||
aten::multiply_
|
||||
aten::narrow
|
||||
aten::ne
|
||||
aten::neg
|
||||
aten::new_empty
|
||||
aten::new_full
|
||||
aten::new_ones
|
||||
aten::new_zeros
|
||||
aten::nonzero
|
||||
aten::nonzero_numpy Supported in limited set of patterns
|
||||
aten::norm
|
||||
aten::normal
|
||||
aten::normal_
|
||||
aten::numel
|
||||
aten::numpy_T
|
||||
aten::one_hot
|
||||
aten::ones
|
||||
aten::ones_like
|
||||
aten::outer
|
||||
aten::pad
|
||||
aten::pairwise_distance
|
||||
aten::permute
|
||||
aten::pixel_shuffle
|
||||
aten::pixel_unshuffle
|
||||
aten::pow
|
||||
aten::pow_
|
||||
aten::prelu
|
||||
aten::prod
|
||||
aten::quantize_per_channel
|
||||
aten::quantize_per_tensor
|
||||
aten::rand
|
||||
aten::rand_like
|
||||
aten::randint
|
||||
aten::randn
|
||||
aten::randn_like
|
||||
aten::real Supported in limited set of patterns
|
||||
aten::reciprocal
|
||||
aten::reflection_pad2d Supported in limited set of patterns
|
||||
aten::relu
|
||||
aten::relu6
|
||||
aten::relu_
|
||||
aten::remainder
|
||||
aten::repeat
|
||||
aten::repeat_interleave
|
||||
aten::reshape
|
||||
aten::reshape_as
|
||||
aten::resolve_conj
|
||||
aten::resolve_neg
|
||||
aten::rnn_relu
|
||||
aten::rnn_tanh
|
||||
aten::roll
|
||||
aten::round
|
||||
aten::rsqrt
|
||||
aten::rsub
|
||||
aten::ScalarImplicit
|
||||
aten::scaled_dot_product_attention
|
||||
aten::scatter
|
||||
aten::scatter_
|
||||
aten::scatter_add
|
||||
aten::scatter_add_
|
||||
aten::scatter_reduce
|
||||
aten::scatter_reduce_
|
||||
aten::select
|
||||
aten::selu
|
||||
aten::selu_
|
||||
aten::sigmoid
|
||||
aten::sigmoid_
|
||||
aten::sign
|
||||
aten::silu
|
||||
aten::silu_
|
||||
aten::sin
|
||||
aten::sin_
|
||||
aten::sinh
|
||||
aten::sinh_
|
||||
aten::size
|
||||
aten::slice
|
||||
aten::softmax
|
||||
aten::softplus
|
||||
aten::sort
|
||||
aten::split Supported in limited set of patterns
|
||||
aten::split_with_sizes Supported in limited set of patterns
|
||||
aten::sqrt
|
||||
aten::square
|
||||
aten::squeeze
|
||||
aten::stack Supported in limited set of patterns
|
||||
aten::std
|
||||
aten::std_mean
|
||||
aten::sub
|
||||
aten::sub_
|
||||
aten::sum
|
||||
aten::swapaxes
|
||||
aten::t
|
||||
aten::t_
|
||||
aten::take_along_dim
|
||||
aten::tan
|
||||
aten::tan_
|
||||
aten::tanh
|
||||
aten::tanh_
|
||||
aten::tensor
|
||||
aten::tensor_split Supported in limited set of patterns
|
||||
aten::tile
|
||||
aten::to
|
||||
aten::topk
|
||||
aten::transpose
|
||||
aten::tril
|
||||
aten::tril_
|
||||
aten::triu
|
||||
aten::triu_
|
||||
aten::type_as
|
||||
aten::unbind Supported in limited set of patterns
|
||||
aten::unflatten
|
||||
aten::unfold
|
||||
aten::unsqueeze
|
||||
aten::unsqueeze_
|
||||
aten::upsample_bicubic2d
|
||||
aten::upsample_bilinear2d
|
||||
aten::upsample_linear1d
|
||||
aten::upsample_nearest1d
|
||||
aten::upsample_nearest2d
|
||||
aten::upsample_nearest3d
|
||||
aten::upsample_trilinear3d
|
||||
aten::var
|
||||
aten::var_mean
|
||||
aten::view
|
||||
aten::view_as
|
||||
aten::where
|
||||
aten::zero_
|
||||
aten::zeros
|
||||
aten::zeros_like
|
||||
prim::Constant
|
||||
prim::device
|
||||
prim::DictConstruct Supported in limited set of patterns
|
||||
prim::GetAttr
|
||||
prim::If
|
||||
prim::is_cuda
|
||||
prim::ListConstruct
|
||||
prim::ListUnpack
|
||||
prim::Loop
|
||||
prim::NumToTensor
|
||||
prim::PythonOp
|
||||
prim::requires_grad
|
||||
prim::TupleConstruct Supported in limited set of patterns
|
||||
prim::TupleIndex
|
||||
prim::TupleUnpack Supported in limited set of patterns
|
||||
prim::type
|
||||
quantized::add
|
||||
quantized::add_relu
|
||||
quantized::cat
|
||||
quantized::conv2d
|
||||
quantized::conv2d_relu
|
||||
quantized::hardswish
|
||||
quantized::linear
|
||||
quantized::mul
|
||||
torchvision::deform_conv2d
|
||||
torchvision::nms
|
||||
torchvision::roi_align
|
||||
========================================== ==========================================================================================
|
||||
|
||||
.. tab-item:: ONNX
|
||||
|
|
|
|||
|
|
@ -253,13 +253,15 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::__getitem__", op::translate_getitem},
|
||||
{"aten::__not__", op::translate_1to1_match_1_inputs<opset10::LogicalNot>},
|
||||
{"aten::__or__", op::translate_bitwise_or},
|
||||
{"aten::__xor__", op::translate_bitwise_xor},
|
||||
{"aten::__range_length", op::translate_range_length},
|
||||
{"aten::__xor__", op::translate_bitwise_xor},
|
||||
{"aten::_convolution", op::translate_convolution},
|
||||
{"aten::_convolution_mode", op::translate_convolution_mode},
|
||||
{"aten::_native_multi_head_attention", op::translate_native_multi_head_attention},
|
||||
{"aten::_set_item", op::translate_set_item},
|
||||
{"aten::_shape_as_tensor", op::translate_shape_as_tensor},
|
||||
{"aten::_upsample_bicubic2d_aa", op::translate_upsample_bicubic2d_aa},
|
||||
{"aten::_upsample_bilinear2d_aa", op::translate_upsample_bilinear2d_aa},
|
||||
{"aten::_weight_norm", op::translate_weight_norm},
|
||||
{"aten::abs", op::translate_1to1_match_1_inputs<opset10::Abs>},
|
||||
{"aten::acos", op::translate_1to1_match_1_inputs_with_fp32_type_alignment<opset10::Acos>},
|
||||
|
|
@ -281,6 +283,7 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::all", op::translate_all},
|
||||
{"aten::amax", op::translate_amax},
|
||||
{"aten::amin", op::translate_amin},
|
||||
// aten::append - Supported in limited set of patterns
|
||||
{"aten::arange", op::translate_arange},
|
||||
{"aten::argmax", op::translate_argmax},
|
||||
{"aten::argmin", op::translate_argmin},
|
||||
|
|
@ -298,7 +301,6 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::avg_pool1d", op::quantizable_op<op::translate_avg_poolnd>},
|
||||
{"aten::avg_pool2d", op::quantizable_op<op::translate_avg_poolnd>},
|
||||
{"aten::avg_pool3d", op::quantizable_op<op::translate_avg_poolnd>},
|
||||
{"aten::broadcast_to", op::translate_expand},
|
||||
{"aten::baddbmm", op::translate_addmm},
|
||||
{"aten::batch_norm", op::translate_batch_norm},
|
||||
{"aten::bitwise_and", op::translate_bitwise_and},
|
||||
|
|
@ -307,19 +309,23 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::bitwise_xor", op::translate_bitwise_xor},
|
||||
{"aten::bmm", op::translate_1to1_match_2_inputs<opset10::MatMul>},
|
||||
{"aten::Bool", op::translate_bool},
|
||||
// aten::broadcast_tensors - Supported in limited set of patterns
|
||||
{"aten::broadcast_to", op::translate_expand},
|
||||
{"aten::cat", op::translate_cat},
|
||||
{"aten::concat", op::translate_cat},
|
||||
{"aten::cdist", op::translate_cdist},
|
||||
{"aten::ceil", op::translate_1to1_match_1_inputs<opset10::Ceiling>},
|
||||
{"aten::ceil_", op::inplace_op<op::translate_1to1_match_1_inputs<opset10::Ceiling>>},
|
||||
{"aten::channel_shuffle", op::translate_channel_shuffle},
|
||||
// aten::chunk - Supported in limited set of patterns
|
||||
{"aten::clamp", op::translate_clamp},
|
||||
{"aten::clamp_", op::inplace_op<op::translate_clamp>},
|
||||
{"aten::clamp_max", op::translate_1to1_match_2_inputs_align_types<opset10::Minimum>},
|
||||
{"aten::clamp_min", op::translate_1to1_match_2_inputs_align_types<opset10::Maximum>},
|
||||
{"aten::clip", op::translate_clamp},
|
||||
{"aten::clip_", op::inplace_op<op::translate_clamp>},
|
||||
{"aten::clone", op::skip_node}, // ignore clone operators that are inserted by PyTorch autograd
|
||||
{"aten::clone", op::skip_node}, // ignore clone operators that are inserted by PyTorch autograd
|
||||
// aten::complex - Supported in limited set of patterns
|
||||
{"aten::concat", op::translate_cat},
|
||||
{"aten::contiguous", op::skip_node}, // In openvino how tensors are stored in memory is internal plugin detail,
|
||||
// we assume all tensors are contiguous
|
||||
{"aten::conv_transpose1d", op::translate_conv_transposend},
|
||||
|
|
@ -344,6 +350,7 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::div_", op::translate_div_},
|
||||
{"aten::dropout", op::skip_node},
|
||||
{"aten::dropout_", op::skip_node},
|
||||
// aten::einsum - Supported in limited set of patterns
|
||||
{"aten::elu", op::translate_elu},
|
||||
{"aten::embedding", op::translate_embedding},
|
||||
{"aten::embedding_bag", op::translate_embedding_bag},
|
||||
|
|
@ -362,6 +369,8 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::fake_quantize_per_channel_affine", op::translate_fake_quantize_per_channel_affine},
|
||||
{"aten::fake_quantize_per_tensor_affine", op::translate_fake_quantize_per_tensor_affine},
|
||||
{"aten::feature_dropout", op::skip_node},
|
||||
// aten::fft_irfftn - Supported in limited set of patterns
|
||||
// aten::fft_rfftn - Supported in limited set of patterns
|
||||
{"aten::fill", op::translate_fill},
|
||||
{"aten::fill_", op::inplace_op<op::translate_fill>},
|
||||
{"aten::fill_diagonal_", op::inplace_op<op::translate_fill_diagonal>},
|
||||
|
|
@ -389,6 +398,8 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::hardtanh", op::quantizable_op<op::translate_hardtanh>},
|
||||
{"aten::hardtanh_", op::inplace_op<op::quantizable_op<op::translate_hardtanh>>},
|
||||
{"aten::im2col", op::translate_im2col},
|
||||
// aten::imag - Supported in limited set of patterns
|
||||
// aten::index - Supported in limited set of patterns
|
||||
{"aten::index_put_", op::inplace_op<op::translate_index_put_>},
|
||||
{"aten::index_select", op::translate_index_select},
|
||||
{"aten::instance_norm", op::translate_instance_norm},
|
||||
|
|
@ -458,6 +469,7 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::new_ones", op::translate_new_ones},
|
||||
{"aten::new_zeros", op::translate_new_zeros},
|
||||
{"aten::nonzero", op::translate_nonzero},
|
||||
// aten::nonzero_numpy - Supported in limited set of patterns
|
||||
{"aten::norm", op::translate_norm},
|
||||
{"aten::normal", op::translate_normal},
|
||||
{"aten::normal_", op::translate_normal_},
|
||||
|
|
@ -479,14 +491,16 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::quantize_per_channel", op::translate_quantize_per_channel},
|
||||
{"aten::quantize_per_tensor", op::translate_quantize_per_tensor},
|
||||
{"aten::rand", op::translate_rand},
|
||||
{"aten::randn", op::translate_randn},
|
||||
{"aten::randint", op::translate_randint},
|
||||
{"aten::rand_like", op::translate_rand_like},
|
||||
{"aten::randint", op::translate_randint},
|
||||
{"aten::randn", op::translate_randn},
|
||||
{"aten::randn_like", op::translate_randn_like},
|
||||
// aten::real - Supported in limited set of patterns
|
||||
{"aten::reciprocal", op::translate_reciprocal},
|
||||
// aten::reflection_pad2d - Supported in limited set of patterns
|
||||
{"aten::relu", op::translate_1to1_match_1_inputs<opset10::Relu>},
|
||||
{"aten::relu_", op::inplace_op<op::translate_1to1_match_1_inputs<opset10::Relu>>},
|
||||
{"aten::relu6", op::translate_relu6},
|
||||
{"aten::relu_", op::inplace_op<op::translate_1to1_match_1_inputs<opset10::Relu>>},
|
||||
{"aten::remainder", op::translate_remainder},
|
||||
{"aten::repeat", op::translate_1to1_match_2_inputs<opset10::Tile>},
|
||||
{"aten::repeat_interleave", op::translate_repeat_interleave},
|
||||
|
|
@ -528,9 +542,12 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::softmax", op::translate_softmax},
|
||||
{"aten::softplus", op::translate_1to1_match_1_inputs<opset10::SoftPlus>},
|
||||
{"aten::sort", op::translate_sort},
|
||||
// aten::split - Supported in limited set of patterns
|
||||
// aten::split_with_sizes - Supported in limited set of patterns
|
||||
{"aten::sqrt", op::translate_1to1_match_1_inputs_with_fp32_type_alignment<opset10::Sqrt>},
|
||||
{"aten::square", op::translate_square},
|
||||
{"aten::squeeze", op::quantizable_op<op::translate_squeeze>},
|
||||
// aten::stack - Supported in limited set of patterns
|
||||
{"aten::std", op::translate_std},
|
||||
{"aten::std_mean", op::translate_std_mean},
|
||||
{"aten::sub", op::translate_sub},
|
||||
|
|
@ -545,6 +562,7 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::tanh", op::translate_1to1_match_1_inputs_with_fp32_type_alignment<opset10::Tanh>},
|
||||
{"aten::tanh_", op::inplace_op<op::translate_1to1_match_1_inputs<opset10::Tanh>>},
|
||||
{"aten::tensor", op::translate_as_tensor},
|
||||
// aten::tensor_split - Supported in limited set of patterns
|
||||
{"aten::tile", op::translate_1to1_match_2_inputs<opset10::Tile>},
|
||||
{"aten::to", op::translate_to},
|
||||
{"aten::topk", op::translate_topk},
|
||||
|
|
@ -555,14 +573,13 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::triu_", op::inplace_op<op::translate_triu>},
|
||||
{"aten::type_as",
|
||||
op::translate_1to1_match_2_inputs<opset10::ConvertLike>}, // TODO: overflow semantics is different
|
||||
// aten::unbind - Supported in limited set of patterns
|
||||
{"aten::unflatten", op::translate_unflatten},
|
||||
{"aten::unfold", op::translate_unfold},
|
||||
{"aten::unsqueeze", op::quantizable_op<op::translate_1to1_match_2_inputs<opset10::Unsqueeze>>},
|
||||
{"aten::unsqueeze_", op::quantizable_op<op::inplace_op<op::translate_1to1_match_2_inputs<opset10::Unsqueeze>>>},
|
||||
{"aten::upsample_bicubic2d", op::translate_upsample_bicubic2d},
|
||||
{"aten::upsample_bilinear2d", op::translate_upsample_bilinear2d},
|
||||
{"aten::_upsample_bicubic2d_aa", op::translate_upsample_bicubic2d_aa},
|
||||
{"aten::_upsample_bilinear2d_aa", op::translate_upsample_bilinear2d_aa},
|
||||
{"aten::upsample_linear1d", op::translate_upsample_linear1d},
|
||||
{"aten::upsample_nearest1d", op::translate_upsample_nearest1d},
|
||||
{"aten::upsample_nearest2d", op::translate_upsample_nearest2d},
|
||||
|
|
@ -578,6 +595,7 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"aten::zeros_like", op::translate_zeros_like},
|
||||
{"prim::Constant", op::translate_constant},
|
||||
{"prim::device", op::translate_constant},
|
||||
// prim::DictConstruct - Supported in limited set of patterns
|
||||
{"prim::GetAttr", op::translate_get_attr},
|
||||
{"prim::If", op::translate_if},
|
||||
{"prim::is_cuda", op::return_false_scalar},
|
||||
|
|
@ -585,18 +603,20 @@ const std::map<std::string, CreatorFunction> get_supported_ops_ts() {
|
|||
{"prim::ListUnpack", op::translate_list_unpack},
|
||||
{"prim::Loop", op::translate_loop},
|
||||
{"prim::NumToTensor", op::skip_node}, // In openvino we already store number as tensor with shape []
|
||||
{"prim::requires_grad", op::return_false_scalar},
|
||||
{"prim::PythonOp", op::translate_pythonop},
|
||||
{"prim::type", op::skip_node}, // Used with prim::device, pass PtFrameworkNode.
|
||||
{"prim::requires_grad", op::return_false_scalar},
|
||||
// prim::TupleConstruct - Supported in limited set of patterns
|
||||
{"prim::TupleIndex", op::translate_tuple_index},
|
||||
// prim::TupleUnpack - Supported in limited set of patterns
|
||||
{"prim::type", op::skip_node}, // Used with prim::device, pass PtFrameworkNode.
|
||||
{"quantized::add", op::translate_quantized_add},
|
||||
{"quantized::add_relu", op::translate_quantized_add_relu},
|
||||
{"quantized::cat", op::translate_quantized_cat},
|
||||
{"quantized::conv2d", op::translate_quantized_convnd},
|
||||
{"quantized::conv2d_relu", op::translate_quantized_convnd_relu},
|
||||
{"quantized::hardswish", op::translate_quantized_hardswish},
|
||||
{"quantized::mul", op::translate_quantized_mul},
|
||||
{"quantized::linear", op::translate_quantized_linear},
|
||||
{"quantized::mul", op::translate_quantized_mul},
|
||||
{"torchvision::deform_conv2d", op::translate_deform_conv},
|
||||
{"torchvision::nms", op::translate_nms},
|
||||
{"torchvision::roi_align", op::translate_roi_align},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
# Copyright (C) 2018-2023 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
def get_ops_in_specific_map(map_name: str, lines: list) -> list:
|
||||
ops = []
|
||||
start_found = False
|
||||
for line in lines:
|
||||
if start_found:
|
||||
if "};" in line:
|
||||
break
|
||||
res = re.findall(r"\s*\{\"(\w*::\w*)\".*", line)
|
||||
if len(res) > 0:
|
||||
ops.append((res[0], ""))
|
||||
else:
|
||||
res = re.findall(r"\s*\/\/\s(\w*::\w*)\s\-\s(.*)", line)
|
||||
if len(res) > 0:
|
||||
ops.append(res[0])
|
||||
if map_name in line:
|
||||
start_found = True
|
||||
return sorted(ops, key=lambda s: s[0].casefold())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
filepath = os.path.join(os.path.dirname(
|
||||
os.path.realpath(__file__)), "..", "op_table.cpp")
|
||||
with open(filepath, "r") as f:
|
||||
ops = get_ops_in_specific_map("get_supported_ops_ts", f.readlines())
|
||||
for op in ops:
|
||||
print(f" {op[0]:<44} {op[1]}")
|
||||
Loading…
Reference in New Issue