File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,9 +6,17 @@ find_package(Python 3.10 REQUIRED COMPONENTS Interpreter Development.Module)
66# Download LibTorch
77include (FetchContent )
88
9+ if (AARCH64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "(arm)|(ARM)|(aarch64)" )
10+ message (STATUS "Targeting ARM architecture (AARCH64 override or processor match)" )
11+ set (LIBTORCH_URL "https://github.com/PASSIONLab/libtorch_aarch64/raw/refs/heads/main/pkg-libtorch.tar.zst" )
12+ else ()
13+ message (STATUS "Did not match arm/aarch64, performing x86 install" )
14+ set (LIBTORCH_URL "https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.10.0%2Bcpu.zip" )
15+ endif ()
16+
917FetchContent_Declare (
1018 libtorch
11- URL "https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.10.0%2Bcpu.zip "
19+ URL "${LIBTORCH_URL} "
1220)
1321
1422message (STATUS "Downloading LibTorch..." )
Original file line number Diff line number Diff line change @@ -75,3 +75,6 @@ addopts = [
7575
7676[tool .ruff ]
7777lint.ignore = [" E741" ]
78+
79+ [tool .scikit-build .cmake .define ]
80+ AARCH64 = {env =" AARCH64" , default =" 0" }
You can’t perform that action at this time.
0 commit comments