1
1
load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "runtime" )
2
- load ("@fbsource//xplat/executorch/kernels/optimized:op_registration_util.bzl" , "define_op_target" , "op_target" )
3
-
4
- _OPTIMIZED_ATEN_OPS = (
5
- op_target (
6
- name = "op_add" ,
7
- deps = [
8
- ":binary_ops" ,
9
- ":add_sub_impl" ,
10
- "//executorch/kernels/portable/cpu:scalar_utils" ,
11
- "//executorch/kernels/portable/cpu/util:broadcast_util" ,
12
- ],
13
- ),
14
- op_target (
15
- name = "op_bmm" ,
16
- deps = [
17
- "//executorch/kernels/optimized:libblas" ,
18
- "//executorch/kernels/portable/cpu/util:matmul_ops_util" ,
19
- ],
20
- ),
21
- op_target (
22
- name = "op_div" ,
23
- deps = [
24
- ":binary_ops" ,
25
- "//executorch/kernels/portable/cpu:scalar_utils" ,
26
- "//executorch/kernels/portable/cpu/util:broadcast_util" ,
27
- ],
28
- ),
29
- op_target (
30
- name = "op_elu" ,
31
- deps = [
32
- "//executorch/extension/threadpool:threadpool" ,
33
- "//executorch/kernels/portable/cpu:scalar_utils" ,
34
- "//executorch/runtime/core/portable_type/c10/c10:aten_headers_for_executorch" ,
35
- ],
36
- ),
37
- op_target (name = "op_exp" ),
38
- op_target (
39
- name = "op_fft_c2r" ,
40
- compiler_flags = [] if runtime .is_oss else [
41
- "-Wno-global-constructors" ,
42
- "-Wno-shadow" ,
43
- ],
44
- deps = [":fft_utils" ],
45
- ),
46
- op_target (
47
- name = "op_fft_r2c" ,
48
- compiler_flags = [] if runtime .is_oss else [
49
- "-Wno-global-constructors" ,
50
- "-Wno-shadow" ,
51
- ],
52
- deps = [":fft_utils" ],
53
- ),
54
- op_target (name = "op_sigmoid" ),
55
- op_target (
56
- name = "op_gelu" ,
57
- deps = [
58
- "//executorch/kernels/portable/cpu/util:activation_ops_util" ,
59
- "//executorch/runtime/core/portable_type/c10/c10:aten_headers_for_executorch" ,
60
- ],
61
- ),
62
- op_target (
63
- name = "op_le" ,
64
- deps = [
65
- "//executorch/kernels/portable/cpu:scalar_utils" ,
66
- "//executorch/kernels/portable/cpu/util:broadcast_util" ,
67
- ],
68
- ),
69
- op_target (
70
- name = "op_linear" ,
71
- deps = [
72
- "//executorch/kernels/optimized:libblas" ,
73
- "//executorch/kernels/portable/cpu/util:matmul_ops_util" ,
74
- ],
75
- ),
76
- op_target (
77
- name = "op_log_softmax" ,
78
- deps = [
79
- "//executorch/kernels/portable/cpu/util:activation_ops_util" ,
80
- "//executorch/runtime/core/portable_type/c10/c10:aten_headers_for_executorch" ,
81
- ],
82
- ),
83
- op_target (
84
- name = "op_mm" ,
85
- deps = [
86
- "//executorch/kernels/optimized:libblas" ,
87
- "//executorch/kernels/portable/cpu/util:matmul_ops_util" ,
88
- ],
89
- ),
90
- op_target (
91
- name = "op_mul" ,
92
- deps = [
93
- ":binary_ops" ,
94
- "//executorch/kernels/portable/cpu:scalar_utils" ,
95
- "//executorch/kernels/portable/cpu/util:broadcast_util" ,
96
- "//executorch/runtime/core/exec_aten/util:tensor_util" ,
97
- ],
98
- ),
99
- op_target (
100
- name = "op_native_layer_norm" ,
101
- deps = [
102
- ":moments_utils" ,
103
- "//executorch/kernels/portable/cpu/util:normalization_ops_util" ,
104
- ],
105
- ),
106
- op_target (name = "op_neg" ),
107
- op_target (
108
- name = "op_sub" ,
109
- deps = [
110
- ":binary_ops" ,
111
- ":add_sub_impl" ,
112
- "//executorch/kernels/portable/cpu:scalar_utils" ,
113
- "//executorch/kernels/portable/cpu/util:broadcast_util" ,
114
- ],
115
- ),
116
- op_target (
117
- name = "op_where" ,
118
- deps = [
119
- "//executorch/extension/threadpool:threadpool" ,
120
- "//executorch/kernels/portable/cpu/util:elementwise_util" ,
121
- ],
122
- ),
123
- )
124
-
2
+ load ("@fbsource//xplat/executorch/kernels/optimized:op_registration_util.bzl" , "OPTIMIZED_ATEN_OPS" , "define_op_target" , "op_target" )
125
3
126
4
def get_sleef_preprocessor_flags ():
127
5
if runtime .is_oss :
@@ -137,10 +15,10 @@ def define_common_targets():
137
15
"""
138
16
139
17
# Define build targets for all operators registered in the tables above.
140
- for op in _OPTIMIZED_ATEN_OPS :
18
+ for op in OPTIMIZED_ATEN_OPS :
141
19
define_op_target (** op )
142
20
143
- aten_op_targets = [":{}" .format (op ["name" ]) for op in _OPTIMIZED_ATEN_OPS ]
21
+ aten_op_targets = [":{}" .format (op ["name" ]) for op in OPTIMIZED_ATEN_OPS ]
144
22
all_op_targets = aten_op_targets
145
23
146
24
runtime .cxx_library (
0 commit comments