Skip to content

Commit 997b005

Browse files
committed
Update on "Reuse GELU implementation from PyTorch core"
kernels/optimized doesn't need to support embedded systems, so it can just take a header-only dep on PyTorch. Note that, because we will pick up Sleef internally and ignore it externally thanks to ATen vec, this PR gets to enable optimized GELU in OSS. Testing: CI to make sure this doesn't break mobile build modes; happy to take advice on anything not currently covered that might break. Differential Revision: [D66335522](https://our.internmc.facebook.com/intern/diff/D66335522/) [ghstack-poisoned]
2 parents a508d54 + ade4e5e commit 997b005

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2ea4b56ec872424e486c4fe2d55da061067a2ed3
1+
f0c50a619c282a01ef1ad33690b7ab5e615d9fef

configurations/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
4242

4343
generate_bindings_for_kernels(
4444
LIB_NAME "optimized_native_cpu_ops_lib" FUNCTIONS_YAML
45-
${CMAKE_CURRENT_BINARY_DIR}/merged.yaml
45+
${CMAKE_CURRENT_BINARY_DIR}/merged.yaml ADD_EXCEPTION_BOUNDARY
4646
)
47-
target_compile_options(optimized_native_cpu_ops_lib PRIVATE "-fexceptions")
4847
message("Generated files ${gen_command_sources}")
4948

5049
# optimized_native_cpu_ops_lib: Register optimized op kernels into the runtime
@@ -57,6 +56,7 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
5756
DEPS
5857
executorch
5958
)
59+
target_compile_options(optimized_native_cpu_ops_lib PRIVATE "-fexceptions")
6060

6161
install(TARGETS optimized_native_cpu_ops_lib DESTINATION lib)
6262
endif()

0 commit comments

Comments
 (0)