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
42 changes: 28 additions & 14 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: install dependencies
run: python -m pip install cibuildwheel twine
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
name: ${{ matrix.name }} (torch v${{ matrix.torch-version }})
strategy:
matrix:
torch-version: ['2.1', '2.2', '2.3', '2.4', '2.5']
torch-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6']
arch: ['arm64', 'x86_64']
os: ['ubuntu-22.04', 'ubuntu-22.04-arm', 'macos-13', 'macos-14', 'windows-2022']
exclude:
Expand All @@ -113,6 +113,7 @@ jobs:
- {os: macos-13, arch: x86_64, torch-version: '2.3'}
- {os: macos-13, arch: x86_64, torch-version: '2.4'}
- {os: macos-13, arch: x86_64, torch-version: '2.5'}
- {os: macos-13, arch: x86_64, torch-version: '2.6'}
include:
# add `cibw-arch` and `rust-target` to the different configurations
- name: x86_64 Linux
Expand Down Expand Up @@ -140,12 +141,22 @@ jobs:
arch: x86_64
rust-target: x86_64-pc-windows-msvc
cibw-arch: AMD64
# add the right python version for each torch version
- {torch-version: '2.1', python-version: '3.11', cibw-python: 'cp311-*'}
- {torch-version: '2.2', python-version: '3.12', cibw-python: 'cp312-*'}
- {torch-version: '2.3', python-version: '3.12', cibw-python: 'cp312-*'}
- {torch-version: '2.4', python-version: '3.12', cibw-python: 'cp312-*'}
- {torch-version: '2.5', python-version: '3.12', cibw-python: 'cp312-*'}
# 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-*'}
# set the right manylinux image to use
- {torch-version: '2.1', manylinux-version: "2014"}
- {torch-version: '2.2', manylinux-version: "2014"}
- {torch-version: '2.3', manylinux-version: "2014"}
- {torch-version: '2.4', manylinux-version: "2014"}
- {torch-version: '2.5', manylinux-version: "2014"}
# only torch >+ 2.6 on arm64-linux needs the newer manylinux
- {torch-version: '2.6', arch: arm64, manylinux-version: "_2_28"}
- {torch-version: '2.6', arch: x86_64, manylinux-version: "2014"}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -160,14 +171,17 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.13"

- name: install dependencies
run: python -m pip install cibuildwheel

- name: build manylinux with rust docker image
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-22.04-arm'
run: docker buildx build -t rustc-manylinux2014_${{ matrix.cibw-arch }} python/scripts/rustc-manylinux2014_${{ matrix.cibw-arch }}
run: |
docker buildx build \
-t rustc-manylinux${{ matrix.manylinux-version }}_${{ matrix.cibw-arch }} \
python/scripts/rustc-manylinux${{ matrix.manylinux-version }}_${{ matrix.cibw-arch }}

- name: build featomic-torch wheel
run: python -m cibuildwheel python/featomic_torch
Expand All @@ -176,8 +190,8 @@ jobs:
CIBW_SKIP: "*musllinux*"
CIBW_ARCHS: ${{ matrix.cibw-arch }}
CIBW_BUILD_VERBOSITY: 1
CIBW_MANYLINUX_X86_64_IMAGE: rustc-manylinux2014_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: rustc-manylinux2014_aarch64
CIBW_MANYLINUX_X86_64_IMAGE: rustc-manylinux${{ matrix.manylinux-version }}_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: rustc-manylinux${{ matrix.manylinux-version }}_aarch64
# FEATOMIC_NO_LOCAL_DEPS is set to 1 when building a tag of
# featomic-torch, which will force to use the version of featomic
# already released on PyPI. Otherwise, this will use the version of
Expand Down Expand Up @@ -245,7 +259,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: install dependencies
run: python -m pip install twine wheel
Expand Down Expand Up @@ -294,7 +308,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: build featomic sdist
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: setup rust
uses: dtolnay/rust-toolchain@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: install dependencies
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
- os: ubuntu-22.04
python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.12"
python-version: "3.13"
- os: macos-14
python-version: "3.12"
python-version: "3.13"
- os: windows-2022
python-version: "3.12"
python-version: "3.13"
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
name: Python ${{ matrix.python-version }} / check build
strategy:
matrix:
python-version: ['3.9', '3.12']
python-version: ['3.9', '3.13']
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
uses: actions/setup-python@v5
if: "!matrix.container"
with:
python-version: "3.12"
python-version: "3.13"

- name: setup rust
uses: dtolnay/rust-toolchain@master
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,32 @@ jobs:
matrix:
include:
- os: ubuntu-22.04
torch-version: 1.12.*
torch-version: "1.12"
python-version: "3.9"
cargo-test-flags: --release

- os: ubuntu-22.04
torch-version: 2.3.*
python-version: "3.12"
torch-version: "2.6"
python-version: "3.13"
cargo-test-flags: --release
do-valgrind: true

- os: ubuntu-20.04
container: ubuntu:20.04
extra-name: ", cmake 3.16"
torch-version: 2.5.*
python-version: "3.12"
torch-version: "2.6"
python-version: "3.13"
cargo-test-flags: ""
cxx-flags: -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -g

- os: macos-14
torch-version: 2.3.*
python-version: "3.12"
torch-version: "2.6"
python-version: "3.13"
cargo-test-flags: --release

- os: windows-2022
# Torch 2.3.0 is broken on Windows, and 2.2 has https://github.com/pytorch/pytorch/issues/118862
torch-version: 2.1.*
python-version: "3.11"
torch-version: "2.6"
python-version: "3.13"
cargo-test-flags: --release

steps:
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.3.*".into());
let torch_version = std::env::var("FEATOMIC_TORCH_TEST_VERSION").unwrap_or("2.6.*".into());
let status = Command::new(&python)
.arg("-m")
.arg("pip")
Expand Down
1 change: 1 addition & 0 deletions featomic-torch/tests/valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
fun:malloc
...
fun:mkl_serv_malloc
...
fun:mkl_serv_domain_get_max_threads
...
}
Expand Down
11 changes: 11 additions & 0 deletions python/scripts/rustc-manylinux_2_28_aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Use manylinux docker image as a base
FROM quay.io/pypa/manylinux_2_28_aarch64

RUN yum install git -y
RUN git config --global --add safe.directory /code

# Download rustup-init asn install
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain 1.75

ENV PATH="/root/.cargo/bin:${PATH}"
ENV RUST_BUILD_TARGET="aarch64-unknown-linux-gnu"
Loading