Skip to content

Commit b3a0601

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 ef0a735 + fc981d6 commit b3a0601

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,9 @@ if(NOT "${_repo_dir_name}" STREQUAL "executorch")
337337
"fix for this restriction."
338338
)
339339
endif()
340-
set(_common_include_directories ${CMAKE_CURRENT_SOURCE_DIR}/..)
340+
set(_common_include_directories ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/runtime/core/portable_type)
341+
# We don't need any of C10's CMake macros.
342+
add_definitions(-DC10_USING_CUSTOM_GENERATED_MACROS)
341343

342344
#
343345
# The `_<target>_srcs` lists are defined by including ${EXECUTORCH_SRCS_FILE}.

0 commit comments

Comments
 (0)