Skip to content

Commit 3184b11

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]
2 parents a94c90a + f8d5a63 commit 3184b11

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

backends/xnnpack/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$")
129129
list(TRANSFORM _xnn_executor_runner__srcs PREPEND "${EXECUTORCH_ROOT}/")
130130
add_executable(xnn_executor_runner ${_xnn_executor_runner__srcs})
131131
target_link_libraries(
132-
xnn_executor_runner xnnpack_backend gflags portable_ops_lib
132+
xnn_executor_runner xnnpack_backend gflags portable_ops_lib executorch
133133
)
134134
target_compile_options(xnn_executor_runner PUBLIC ${_common_compile_options})
135135
endif()

runtime/kernel/test/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@ add_executable(
4747
)
4848
target_link_libraries(
4949
operator_registry_max_kernel_num_test GTest::gtest GTest::gtest_main
50-
GTest::gmock
50+
GTest::gmock executorch
5151
)
5252
target_compile_definitions(
5353
operator_registry_max_kernel_num_test PRIVATE "-DMAX_KERNEL_NUM=1"
5454
)
55-
target_include_directories(
56-
operator_registry_max_kernel_num_test PRIVATE ${EXECUTORCH_ROOT}/..
57-
)
5855
# TODO: This is currently not working!
5956
# add_test(operator_registry_max_kernel_num_test operator_registry_max_kernel_num_test)
6057

0 commit comments

Comments
 (0)