ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / src / ggml-openvino / openvino / op_table.cpp
| 1 | #include "op_table.h" |
| 2 | |
| 3 | #include "utils.h" |
| 4 | |
| 5 | #include <openvino/op/abs.hpp> |
| 6 | #include <openvino/op/add.hpp> |
| 7 | #include <openvino/op/ceiling.hpp> |
| 8 | #include <openvino/op/cos.hpp> |
| 9 | #include <openvino/op/divide.hpp> |
| 10 | #include <openvino/op/exp.hpp> |
| 11 | #include <openvino/op/floor.hpp> |
| 12 | #include <openvino/op/gather.hpp> |
| 13 | #include <openvino/op/gelu.hpp> |
| 14 | #include <openvino/op/hswish.hpp> |
| 15 | #include <openvino/op/log.hpp> |
| 16 | #include <openvino/op/matmul.hpp> |
| 17 | #include <openvino/op/multiply.hpp> |
| 18 | #include <openvino/op/negative.hpp> |
| 19 | #include <openvino/op/relu.hpp> |
| 20 | #include <openvino/op/sigmoid.hpp> |
| 21 | #include <openvino/op/sign.hpp> |
| 22 | #include <openvino/op/sin.hpp> |
| 23 | #include <openvino/op/softplus.hpp> |
| 24 | #include <openvino/op/subtract.hpp> |
| 25 | #include <openvino/op/swish.hpp> |
| 26 | #include <openvino/op/tanh.hpp> |
| 27 | |
| 28 | namespace ov { |
| 29 | namespace frontend { |
| 30 | namespace ggml { |
| 31 | |
| 32 | std::unordered_map<std::string, CreatorFunction> get_supported_ops() { |
| 33 | using namespace ov::op; |
| 34 | return { |
| 35 | {"GGML_OP_ADD", op::translate_add }, |
| 36 | {"GGML_OP_ADD1", op::translate_1to1_match_2_inputs<v1::Add> }, |
| 37 | {"GGML_OP_ADD_ID", op::translate_add_id }, |
| 38 | {"GGML_OP_CONCAT", op::translate_concat }, |
| 39 | {"GGML_OP_CONT", op::translate_cont }, |
| 40 | {"GGML_OP_DUP", op::translate_cont }, |
| 41 | {"GGML_OP_DIV", op::translate_div }, |
| 42 | {"GGML_OP_FILL", op::translate_fill }, |
| 43 | {"GGML_OP_GET_ROWS", op::translate_get_rows }, |
| 44 | {"GGML_OP_IM2COL", op::translate_im2col }, |
| 45 | {"GGML_OP_IM2COL_3D", op::translate_im2col_3d }, |
| 46 | {"GGML_OP_MUL", op::translate_1to1_match_2_inputs<v1::Multiply>}, |
| 47 | {"GGML_OP_MUL_MAT", op::translate_mulmat }, |
| 48 | {"GGML_OP_MUL_MAT_ID", op::translate_mul_mat_id }, |
| 49 | {"GGML_OP_PERMUTE", op::translate_permute }, |
| 50 | {"GGML_OP_RESHAPE", op::translate_reshape }, |
| 51 | {"GGML_OP_RMS_NORM", op::translate_rms_norm }, |
| 52 | {"GGML_OP_NORM", op::translate_norm }, |
| 53 | {"GGML_OP_L2_NORM", op::translate_l2_norm }, |
| 54 | {"GGML_OP_SUM_ROWS", op::translate_sum_rows }, |
| 55 | {"GGML_OP_ROPE", op::translate_rope }, |
| 56 | {"GGML_OP_SCALE", op::translate_scale }, |
| 57 | {"GGML_OP_SQR", op::translate_sqr }, |
| 58 | {"GGML_OP_SQRT", op::translate_sqrt }, |
| 59 | {"GGML_OP_SOFT_MAX", op::translate_soft_max }, |
| 60 | {"GGML_OP_ARGSORT", op::translate_argsort }, |
| 61 | {"GGML_OP_SUB", op::translate_1to1_match_2_inputs<v1::Subtract>}, |
| 62 | {"GGML_OP_TRANSPOSE", op::translate_transpose }, |
| 63 | {"GGML_OP_SIN", op::translate_1to1_match_1_input<v0::Sin> }, |
| 64 | {"GGML_OP_COS", op::translate_1to1_match_1_input<v0::Cos> }, |
| 65 | {"GGML_OP_LOG", op::translate_1to1_match_1_input<v0::Log> }, |
| 66 | {"GGML_OP_MEAN", op::translate_mean }, |
| 67 | {"GGML_OP_SUM", op::translate_sum }, |
| 68 | {"GGML_UNARY_OP_GELU", op::translate_unary_gelu }, |
| 69 | {"GGML_UNARY_OP_GELU_ERF", op::translate_unary_gelu_erf }, |
| 70 | {"GGML_UNARY_OP_GELU_QUICK", op::translate_unary_gelu_quick }, |
| 71 | {"GGML_UNARY_OP_ELU", op::translate_unary_elu }, |
| 72 | {"GGML_UNARY_OP_HARDSWISH", op::translate_1to1_match_1_input<v4::HSwish> }, |
| 73 | {"GGML_UNARY_OP_HARDSIGMOID", op::translate_unary_hardsigmoid }, |
| 74 | {"GGML_UNARY_OP_STEP", op::translate_unary_step }, |
| 75 | {"GGML_UNARY_OP_ABS", op::translate_1to1_match_1_input<v0::Abs> }, |
| 76 | {"GGML_UNARY_OP_SGN", op::translate_1to1_match_1_input<v0::Sign> }, |
| 77 | {"GGML_UNARY_OP_FLOOR", op::translate_1to1_match_1_input<v0::Floor> }, |
| 78 | {"GGML_UNARY_OP_CEIL", op::translate_1to1_match_1_input<v0::Ceiling> }, |
| 79 | {"GGML_UNARY_OP_ROUND", op::translate_unary_round }, |
| 80 | {"GGML_UNARY_OP_EXPM1", op::translate_unary_expm1 }, |
| 81 | {"GGML_UNARY_OP_SIGMOID", op::translate_1to1_match_1_input<v0::Sigmoid> }, |
| 82 | {"GGML_UNARY_OP_SILU", op::translate_1to1_match_1_input<v4::Swish> }, |
| 83 | {"GGML_UNARY_OP_SOFTPLUS", op::translate_unary_softplus }, |
| 84 | {"GGML_UNARY_OP_TANH", op::translate_1to1_match_1_input<v0::Tanh> }, |
| 85 | {"GGML_UNARY_OP_EXP", op::translate_1to1_match_1_input<v0::Exp> }, |
| 86 | {"GGML_UNARY_OP_NEG", op::translate_1to1_match_1_input<v0::Negative> }, |
| 87 | {"GGML_UNARY_OP_RELU", op::translate_1to1_match_1_input<v0::Relu> }, |
| 88 | {"GGML_OP_VIEW", op::translate_view }, |
| 89 | {"GGML_GLU_OP_SWIGLU", op::translate_glu_swiglu }, |
| 90 | {"GGML_GLU_OP_SWIGLU_OAI", op::translate_glu_swiglu_oai }, |
| 91 | {"GGML_GLU_OP_SWIGLU_CLAMP", op::translate_glu_swiglu_clamp }, |
| 92 | {"GGML_GLU_OP_GEGLU", op::translate_glu_geglu }, |
| 93 | {"GGML_GLU_OP_GEGLU_QUICK", op::translate_glu_geglu_quick }, |
| 94 | {"GGML_OP_SET_ROWS", op::translate_set_rows }, |
| 95 | {"GGML_OP_CPY", op::translate_cpy }, |
| 96 | {"GGML_OP_FLASH_ATTN_EXT", op::translate_flash_attn_ext }, |
| 97 | {"GGML_OP_CLAMP", op::translate_clamp }, |
| 98 | {"GGML_OP_PAD", op::translate_pad }, |
| 99 | {"GGML_OP_SSM_CONV", op::translate_ssm_conv }, |
| 100 | {"GGML_OP_GATED_DELTA_NET", op::translate_gated_delta_net }, |
| 101 | {"GGML_OP_REPEAT", op::translate_repeat }, |
| 102 | {"GGML_OP_CUMSUM", op::translate_cumsum }, |
| 103 | {"GGML_OP_FILL", op::translate_fill }, |
| 104 | {"GGML_OP_DIAG", op::translate_diag }, |
| 105 | {"GGML_OP_TRI", op::translate_tri }, |
| 106 | {"GGML_OP_SET", op::translate_set }, |
| 107 | {"GGML_OP_POOL_2D", op::translate_pool_2d }, |
| 108 | {"GGML_OP_ROLL", op::translate_roll }, |
| 109 | {"GGML_OP_UPSCALE", op::translate_upscale }, |
| 110 | {"GGML_OP_CONV_2D", op::translate_conv_2d }, |
| 111 | {"GGML_OP_CONV_2D_DW", op::translate_conv_2d_dw }, |
| 112 | {"GGML_OP_CONV_TRANSPOSE_1D", op::translate_conv_transpose_1d }, |
| 113 | {"GGML_OP_CONV_TRANSPOSE_2D", op::translate_conv_transpose_2d }, |
| 114 | {"GGML_OP_CONV_3D", op::translate_conv_3d }, |
| 115 | // solve_tri has accuracy issues on GPU |
| 116 | // {"GGML_OP_SOLVE_TRI", op::translate_solve_tri }, |
| 117 | }; |
| 118 | } |
| 119 | |
| 120 | } // namespace ggml |
| 121 | } // namespace frontend |
| 122 | } // namespace ov |