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
24 changes: 2 additions & 22 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,15 @@ jobs:
name: ${{ matrix.name }} (torch v${{ matrix.torch-version }})
strategy:
matrix:
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']
arch: ['arm64', 'x86_64']
torch-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9', '2.10']
torch-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9', '2.10']
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'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.9'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.10'}
include:
# add `cibw-arch` and `rust-target` to the different configurations
- name: x86_64 Linux
Expand All @@ -60,11 +50,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 @@ -76,8 +61,6 @@ 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-*'}
Expand Down Expand Up @@ -143,9 +126,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
2 changes: 1 addition & 1 deletion .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
include:
- os: ubuntu-24.04
python-version: "3.10"
torch-version: "2.1"
torch-version: "2.3"
numpy-version-pin: "<2.0"
- os: ubuntu-24.04
python-version: "3.10"
Expand Down
4 changes: 2 additions & 2 deletions docs/src/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ and use it will depend on the programming language you are using.

We provide pre-compiled wheels on PyPI that are compatible with all the
supported ``torch`` versions at the time of the ``metatomic-torch`` release.
Currently PyTorch version 2.1 and above is supported.
Currently PyTorch version 2.3 and above is supported.

If you want to use the code with an unsupported PyTorch version, or a
new release of PyTorch which did not exist yet when we released
Expand Down Expand Up @@ -105,7 +105,7 @@ and use it will depend on the programming language you are using.
metatensor-torch.
- the C++ part of PyTorch, which you can install `on its own
<https://pytorch.org/get-started/locally/>`_. We are compatible with
``libtorch`` version 2.1 or above. You can also use the same library as
``libtorch`` version 2.3 or above. You can also use the same library as
the Python version of torch by adding the output of the command below
to ``CMAKE_PREFIX_PATH``:

Expand Down
4 changes: 4 additions & 0 deletions metatomic-torch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ a changelog](https://keepachangelog.com/en/1.1.0/) format. This project follows
### Removed
-->

### Changed

- Removed support for torch 2.1 and 2.2

## [Version 0.1.8](https://github.com/metatensor/metatomic/releases/tag/metatomic-torch-v0.1.8) - 2026-02-02

### Added
Expand Down
2 changes: 1 addition & 1 deletion metatomic-torch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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)

set(METATOMIC_TORCH_HEADERS
"include/metatomic/torch/system.hpp"
Expand Down
2 changes: 1 addition & 1 deletion python/metatomic_torch/build-backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if FORCED_TORCH_VERSION is not None:
TORCH_DEP = f"torch =={FORCED_TORCH_VERSION}"
else:
TORCH_DEP = "torch >=2.1"
TORCH_DEP = "torch >=2.3"

# ==================================================================================== #
# Build backend functions definition #
Expand Down
2 changes: 1 addition & 1 deletion python/metatomic_torch/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def create_version_number(version):
torch_version = f"== {torch_v_major}.{torch_v_minor}.*"
except ImportError:
# otherwise we are building a sdist
torch_version = ">= 2.1"
torch_version = ">= 2.3"

install_requires = [
f"torch {torch_version}",
Expand Down
Loading