xref: /aosp_15_r20/external/executorch/backends/cadence/aot/functions_hifi.yaml (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2#
3# This yaml file contains operators that are also defined by the ATen library.
4# For lean mode:
5#   - Codegen'd target `executorch_generated_lib` will be reading all the information
6#     from this file, including operator schema and kernel metadata.
7#   - Selective build target `codegen:executorch_defined_ops` now is selecting all the
8#     operators in this file, by dumping all the op names into `selected_operators.yaml`.
9#
10# See the README.md file in executorch/kernels/portable for a description of the syntax used
11# by this file.
12
13
14# aten ops
15- op: _to_copy.out
16  kernels:
17    - arg_meta: null
18      kernel_name: torch::executor::to_copy_out
19
20- op: _softmax.out
21  kernels:
22    - arg_meta: null
23      kernel_name: torch::executor::softmax_out
24
25- op: add.out
26  kernels:
27    - arg_meta: null
28      kernel_name: cadence::impl::HiFi::add_out
29
30- op: bmm.out
31  kernels:
32    - arg_meta: null
33      kernel_name: torch::executor::bmm_out
34
35- op: cat.out
36  kernels:
37    - arg_meta: null
38      kernel_name: torch::executor::cat_out
39
40- op: clone.out
41  kernels:
42    - arg_meta: null
43      kernel_name: torch::executor::clone_out
44
45- op: div.out
46  kernels:
47    - arg_meta: null
48      kernel_name: cadence::impl::HiFi::div_out
49
50- op: div.out_mode
51  kernels:
52    - arg_meta: null
53      kernel_name: cadence::impl::HiFi::div_out_mode
54
55- op: embedding.out
56  kernels:
57    - arg_meta: null
58      kernel_name: torch::executor::embedding_out
59
60- op: full.out
61  kernels:
62    - arg_meta: null
63      kernel_name: torch::executor::full_out
64
65- op: gelu.out
66  kernels:
67    - arg_meta: null
68      kernel_name: torch::executor::gelu_out
69
70- op: hardtanh.out
71  kernels:
72    - arg_meta: null
73      kernel_name: torch::executor::hardtanh_out
74
75- op: max_pool2d_with_indices.out
76  kernels:
77    - arg_meta: null
78      kernel_name: torch::executor::max_pool2d_with_indices_out
79
80- op: mean.out
81  kernels:
82    - arg_meta: null
83      kernel_name: cadence::impl::HiFi::mean_dim_out
84
85- op: mul.out
86  kernels:
87    - arg_meta: null
88      kernel_name: cadence::impl::HiFi::mul_out
89
90- op: permute_copy.out
91  kernels:
92    - arg_meta: null
93      kernel_name: torch::executor::permute_copy_out
94
95- op: sigmoid.out
96  kernels:
97    - arg_meta: null
98      kernel_name: cadence::impl::HiFi::sigmoid_out
99
100- op: slice_copy.Tensor_out
101  kernels:
102    - arg_meta: null
103      kernel_name: torch::executor::slice_copy_Tensor_out
104
105- op: split_with_sizes_copy.out
106  kernels:
107    - arg_meta: null
108      kernel_name: torch::executor::split_with_sizes_copy_out
109
110- op: sub.out
111  kernels:
112    - arg_meta: null
113      kernel_name: cadence::impl::HiFi::sub_out
114
115- op: tanh.out
116  kernels:
117    - arg_meta: null
118      kernel_name: cadence::impl::HiFi::tanh_out
119
120- op: view_copy.out
121  kernels:
122    - arg_meta: null
123      kernel_name: torch::executor::view_copy_out
124
125- op: where.self_out
126  kernels:
127    - arg_meta: null
128      kernel_name: cadence::impl::HiFi::where_out
129
130# custom ops
131- func: cadence::quantize_per_tensor.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)
132  variants: function
133  kernels:
134    - arg_meta: null
135      kernel_name: cadence::impl::HiFi::quantize_per_tensor_out
136
137- func: cadence::dequantize_per_tensor.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)
138  variants: function
139  kernels:
140    - arg_meta: null
141      kernel_name: cadence::impl::HiFi::dequantize_per_tensor_out
142
143
144- func: cadence::quantized_layer_norm.out(Tensor input, Tensor in_scale, Tensor in_zero_point, int[] normalized_shape, Tensor weight, Tensor bias, float eps, float output_scale, int output_zero_point, *, Tensor(a!) out) -> Tensor(a!)
145  kernels:
146    - arg_meta: null
147      kernel_name: cadence::impl::HiFi::quantized_layer_norm_out
148- func: cadence::quantized_layer_norm.per_tensor_out(Tensor input, float in_scale, int in_zero_point, int[] normalized_shape, Tensor weight, Tensor bias, float eps, float output_scale, int output_zero_point, *, Tensor(a!) out) -> Tensor(a!)
149  kernels:
150    - arg_meta: null
151      kernel_name: cadence::impl::HiFi::quantized_layer_norm_per_tensor_out
152
153- func: cadence::quantized_linear.out(Tensor src, Tensor weight, Tensor bias, int src_zero_point, Tensor weight_zero_point, Tensor out_multiplier, Tensor out_shift, int out_zero_point, Tensor? offset, *, Tensor(a!) out) -> Tensor(a!)
154  kernels:
155    - arg_meta: null
156      kernel_name: cadence::impl::HiFi::quantized_linear_out
157- func: cadence::quantized_linear.per_tensor_out(Tensor src, Tensor weight, Tensor bias, SymInt src_zero_point, SymInt weight_zero_point, SymInt out_multiplier, SymInt out_shift, SymInt out_zero_point, Tensor? offset, *, Tensor(a!) out) -> Tensor(a!)
158  kernels:
159    - arg_meta: null
160      kernel_name: cadence::impl::HiFi::quantized_linear_per_tensor_out
161