Skip to content

Commit 2e94054

Browse files
use tochao 0.17.0
1 parent 9a7dab9 commit 2e94054

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,18 @@ if(EXECUTORCH_BUILD_KERNELS_TORCHAO)
846846
set(TORCHAO_ENABLE_ARM_NEON_DOT ON)
847847
set(TORCHAO_BUILD_KLEIDIAI ON)
848848

849+
# TorchAO requires find_package(Torch) for include dirs; add its cmake path.
850+
execute_process(
851+
COMMAND ${PYTHON_EXECUTABLE} -c
852+
"import torch; print(torch.utils.cmake_prefix_path)"
853+
OUTPUT_VARIABLE _torch_cmake_prefix
854+
OUTPUT_STRIP_TRAILING_WHITESPACE
855+
RESULT_VARIABLE _torch_cmake_prefix_result
856+
)
857+
if(_torch_cmake_prefix_result EQUAL 0 AND _torch_cmake_prefix)
858+
list(APPEND CMAKE_PREFIX_PATH "${_torch_cmake_prefix}")
859+
endif()
860+
849861
# TorchAO kernels look for EXECUTORCH_INCLUDE_DIRS
850862
if(DEFINED EXECUTORCH_INCLUDE_DIRS)
851863
message(FATAL_ERROR "EXECUTORCH_INCLUDE_DIRS is already defined")

third-party/ao

Submodule ao updated 202 files

0 commit comments

Comments
 (0)