Skip to content

Commit

Permalink
added expand and gelu ops
Browse files Browse the repository at this point in the history
Differential Revision: D61080956

Pull Request resolved: pytorch#4675
  • Loading branch information
zonglinpengmeta authored Aug 15, 2024
1 parent caadd81 commit c4ccad3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions backends/cadence/aot/functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,21 @@
- arg_meta: null
kernel_name: torch::executor::embedding_out

- op: expand_copy.out
kernels:
- arg_meta: null
kernel_name: torch::executor::expand_copy_out

- op: full.out
kernels:
- arg_meta: null
kernel_name: torch::executor::full_out

- op: gelu.out
kernels:
- arg_meta: null
kernel_name: torch::executor::gelu_out

- op: mean.out
kernels:
- arg_meta: null
Expand Down
6 changes: 4 additions & 2 deletions backends/cadence/reference/operators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ set(_aten_ops__srcs
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_split_with_sizes_copy.cpp"
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_sub.cpp"
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_to_copy.cpp"
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_where.cpp")
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_where.cpp"
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_expand_copy.cpp"
"${EXECUTORCH_ROOT}/kernels/portable/cpu/op_gelu.cpp")
add_library(aten_ops_cadence ${_aten_ops__srcs})
target_link_libraries(aten_ops_cadence PUBLIC executorch)
target_link_libraries(aten_ops_cadence PRIVATE cadence_kernels)
Expand Down Expand Up @@ -82,7 +84,7 @@ generate_bindings_for_kernels(
LIB_NAME "cadence_ops_lib" OPS_SCHEMA_YAML
FUNCTIONS_YAML ${CMAKE_CURRENT_SOURCE_DIR}/../../aot/functions.yaml
)
message("Generated files ${gen_command_sources}")
message("Generated cadence x86 files ${gen_command_sources}")

gen_operators_lib(
LIB_NAME "cadence_ops_lib"
Expand Down

0 comments on commit c4ccad3

Please sign in to comment.