Skip to content

Commit 4b91ca9

Browse files
committed
Update on "Use c10 version of half/bfloat16 in executorch"
Accomplished by importing relevant files from c10 into executorch/runtime/core/portable_type/c10, and then using `using` in the top-level ExecuTorch headers. This approach should keep the ExecuTorch build hermetic for embedded use cases. In the future, we should add a CI job to ensure the c10 files stay identical to the PyTorch ones. Differential Revision: [D66106969](https://our.internmc.facebook.com/intern/diff/D66106969/) [ghstack-poisoned]
1 parent 906f932 commit 4b91ca9

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)