Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,15 @@ jobs:
name: ${{ matrix.name }} (torch v${{ matrix.torch-version }})
strategy:
matrix:
torch-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '2.8']
torch-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9']
arch: ['arm64', 'x86_64']
os: ['ubuntu-24.04', 'ubuntu-24.04-arm', 'macos-15-intel', 'macos-15', 'windows-2022']
os: ['ubuntu-24.04', 'ubuntu-24.04-arm', 'macos-15', 'windows-2022']
exclude:
# remove mismatched arch-os combinations
- {os: macos-15-intel, arch: arm64}
- {os: windows-2022, arch: arm64}
- {os: ubuntu-24.04, arch: arm64}
- {os: macos-15, arch: x86_64}
- {os: ubuntu-24.04-arm, arch: x86_64}
# arch x86_64 on macos is only supported for torch <2.3
- {os: macos-15-intel, arch: x86_64, torch-version: '2.3'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.4'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.5'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.6'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.7'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.8'}
include:
# add `cibw-arch` and `rust-target` to the different configurations
- name: x86_64 Linux
Expand All @@ -128,11 +120,6 @@ jobs:
arch: arm64
rust-target: aarch64-unknown-linux-gnu
cibw-arch: aarch64
- name: x86_64 macOS
os: macos-15-intel
arch: x86_64
rust-target: x86_64-apple-darwin
cibw-arch: x86_64
- name: arm64 macOS
os: macos-15
arch: arm64
Expand All @@ -144,14 +131,13 @@ jobs:
rust-target: x86_64-pc-windows-msvc
cibw-arch: AMD64
# add the right python version image for each torch version
- {torch-version: '2.1', cibw-python: 'cp311-*'}
- {torch-version: '2.2', cibw-python: 'cp312-*'}
- {torch-version: '2.3', cibw-python: 'cp312-*'}
- {torch-version: '2.4', cibw-python: 'cp312-*'}
- {torch-version: '2.5', cibw-python: 'cp312-*'}
- {torch-version: '2.6', cibw-python: 'cp312-*'}
- {torch-version: '2.7', cibw-python: 'cp312-*'}
- {torch-version: '2.8', cibw-python: 'cp312-*'}
- {torch-version: '2.9', cibw-python: 'cp312-*'}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -233,9 +219,6 @@ jobs:
- name: arm64 Linux
os: ubuntu-24.04-arm
arch: arm64
- name: x86_64 macOS
os: macos-15-intel
arch: x86_64
- name: arm64 macOS
os: macos-15
arch: arm64
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
matrix:
include:
- os: ubuntu-24.04
torch-version: "2.1"
torch-version: "2.3"
python-version: "3.10"
cargo-test-flags: --release

- os: ubuntu-24.04
torch-version: "2.8"
torch-version: "2.9"
python-version: "3.13"
cargo-test-flags: --release
do-valgrind: true
Expand All @@ -33,18 +33,18 @@ jobs:
- os: ubuntu-24.04
container: ubuntu:22.04
extra-name: ", cmake 3.22"
torch-version: "2.8"
torch-version: "2.9"
python-version: "3.13"
cargo-test-flags: ""
cxx-flags: -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -g

- os: macos-15
torch-version: "2.8"
torch-version: "2.9"
python-version: "3.13"
cargo-test-flags: --release

- os: windows-2022
torch-version: "2.8"
torch-version: "2.9"
python-version: "3.13"
cargo-test-flags: --release

Expand Down
1 change: 1 addition & 0 deletions featomic-torch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ a changelog](https://keepachangelog.com/en/1.1.0/) format. This project follows
### Changed

- We now require Python >= 3.10
- Added support for torch v2.9, removed support for torch 2.1 and 2.2

## [Version 0.7.1](https://github.com/metatensor/featomic/releases/tag/featomic-torch-v0.7.1) - 2025-09-17

Expand Down
10 changes: 5 additions & 5 deletions featomic-torch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endif()
# fixed version in `cmake/FindCUDNN.cmake`
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")

find_package(Torch 2.1 REQUIRED)
find_package(Torch 2.3 REQUIRED)

# ============================================================================ #
# Setup metatensor_torch
Expand All @@ -122,7 +122,7 @@ find_package(Torch 2.1 REQUIRED)
#
# When updating METATENSOR_TORCH_FETCH_VERSION, you will also have to update the
# SHA256 sum of the file in `FetchContent_Declare`.
set(METATENSOR_TORCH_FETCH_VERSION "0.8.0")
set(METATENSOR_TORCH_FETCH_VERSION "0.8.2")
set(REQUIRED_METATENSOR_TORCH_VERSION "0.8")
if (FEATOMIC_FETCH_METATENSOR_TORCH)
message(STATUS "Fetching metatensor-torch from github")
Expand All @@ -132,7 +132,7 @@ if (FEATOMIC_FETCH_METATENSOR_TORCH)
FetchContent_Declare(
metatensor_torch
URL ${URL_ROOT}/metatensor-torch-v${METATENSOR_TORCH_FETCH_VERSION}/metatensor-torch-cxx-${METATENSOR_TORCH_FETCH_VERSION}.tar.gz
URL_HASH SHA256=61d383ce958deafe0e3916088185527680c9118588722b17ec5c39cfbaa6da55
URL_HASH SHA256=0be618d0cdcfca86cd0c25f47d360b6a2410ebb09ece8d21f153e933ce64bb55
)

FetchContent_MakeAvailable(metatensor_torch)
Expand All @@ -150,7 +150,7 @@ endif()
#
# When updating METATOMIC_TORCH_FETCH_VERSION, you will also have to update the
# SHA256 sum of the file in `FetchContent_Declare`.
set(METATOMIC_TORCH_FETCH_VERSION "0.1.4")
set(METATOMIC_TORCH_FETCH_VERSION "0.1.7")
set(REQUIRED_METATOMIC_TORCH_VERSION "0.1")
if (FEATOMIC_FETCH_METATENSOR_TORCH)
message(STATUS "Fetching metatomic-torch from github")
Expand All @@ -160,7 +160,7 @@ if (FEATOMIC_FETCH_METATENSOR_TORCH)
FetchContent_Declare(
metatomic_torch
URL ${URL_ROOT}/metatomic-torch-v${METATOMIC_TORCH_FETCH_VERSION}/metatomic-torch-cxx-${METATOMIC_TORCH_FETCH_VERSION}.tar.gz
URL_HASH SHA256=385ec8b8515d674b6a9f093f724792b2469e7ea2365ca596f574b64e38494f94
URL_HASH SHA256=726f5711b70c4b8cc80d9bc6c3ce6f3449f31d20acc644ab68dab083aa4ea572
)

FetchContent_MakeAvailable(metatomic_torch)
Expand Down
2 changes: 1 addition & 1 deletion featomic-torch/tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn setup_pytorch(build_dir: PathBuf) -> PathBuf {
.expect("failed to run python");
assert!(status.success(), "failed to run `python -m pip install --upgrade pip`");

let torch_version = std::env::var("FEATOMIC_TORCH_TEST_VERSION").unwrap_or("2.8.*".into());
let torch_version = std::env::var("FEATOMIC_TORCH_TEST_VERSION").unwrap_or("2.9.*".into());
let status = Command::new(&python)
.arg("-m")
.arg("pip")
Expand Down
Loading