Skip to content

Commit e8fb9f8

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
added expand and gelu ops (#4675)
Summary: Those two and select_copy.int_out were missing when running vision_transformer. Added the former two, skipped the latter one because it will get replaced by view_copy in Cadence passes Reviewed By: hsharma35 Differential Revision: D61080956
1 parent 7b27f9b commit e8fb9f8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

backends/cadence/aot/functions.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,21 @@
5757
- arg_meta: null
5858
kernel_name: torch::executor::embedding_out
5959

60+
- op: expand_copy.out
61+
kernels:
62+
- arg_meta: null
63+
kernel_name: torch::executor::expand_copy_out
64+
6065
- op: full.out
6166
kernels:
6267
- arg_meta: null
6368
kernel_name: torch::executor::full_out
6469

70+
- op: gelu.out
71+
kernels:
72+
- arg_meta: null
73+
kernel_name: torch::executor::gelu_out
74+
6575
- op: mean.out
6676
kernels:
6777
- arg_meta: null

backends/cadence/reference/operators/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ set(_aten_ops__srcs
4747
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_split_with_sizes_copy.cpp"
4848
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_sub.cpp"
4949
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_to_copy.cpp"
50-
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_where.cpp")
50+
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_where.cpp"
51+
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_expand_copy.cpp"
52+
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_gelu.cpp")
5153
add_library(aten_ops_cadence ${_aten_ops__srcs})
5254
target_link_libraries(aten_ops_cadence PUBLIC executorch)
5355
target_link_libraries(aten_ops_cadence PRIVATE cadence_kernels)
@@ -82,7 +84,7 @@ generate_bindings_for_kernels(
8284
LIB_NAME "cadence_ops_lib" OPS_SCHEMA_YAML
8385
FUNCTIONS_YAML ${CMAKE_CURRENT_SOURCE_DIR}/../../aot/functions.yaml
8486
)
85-
message("Generated files ${gen_command_sources}")
87+
message("Generated cadence x86 files ${gen_command_sources}")
8688

8789
gen_operators_lib(
8890
LIB_NAME "cadence_ops_lib"

0 commit comments

Comments
 (0)