Skip to content

Commit 8dc61bb

Browse files
committed
Added aarch64 libtorch.
1 parent df24066 commit 8dc61bb

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

openequivariance/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ find_package(Python 3.10 REQUIRED COMPONENTS Interpreter Development.Module)
66
# Download LibTorch
77
include(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+
917
FetchContent_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

1422
message(STATUS "Downloading LibTorch...")

openequivariance/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ addopts = [
7575

7676
[tool.ruff]
7777
lint.ignore = ["E741"]
78+
79+
[tool.scikit-build.cmake.define]
80+
AARCH64 = {env="AARCH64", default="0"}

0 commit comments

Comments
 (0)