Skip to content

Commit

Permalink
Build for PyTorch 2.5.0
Browse files Browse the repository at this point in the history
This commit will be tagged as 0.0.28.post2, which will trigger CI jobs to build a new release which depends on the newly-released PyTorch 2.5.0.

ghstack-source-id: 2d08aac54157145d0fed78ddf4589379ea9e0d99
Pull Request resolved: fairinternal/xformers#1244

__original_commit__ = fairinternal/xformers@94d6d0e
  • Loading branch information
lw authored and xFormers Bot committed Oct 21, 2024
1 parent bed4b06 commit 68b7fd1
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
- "3.10"
- "3.11"
config:
- torch_version: "2.4.1"
- torch_version: "2.5.0"
torch_channel: "pytorch"
cuda_version: "12.1.0"
cuda_dep_runtime: ">=12.0,<13.0"
cuda_short_version: "121"

- torch_version: "2.4.1"
- torch_version: "2.5.0"
torch_channel: "pytorch"
cuda_version: "11.8.0"
cuda_dep_runtime: ">=11.7,<11.9"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'

- name: Upgrade pip
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linters_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'
- name: Run pre-script
if: ${{ inputs.pre-script }}
run: ${{ inputs.pre-script }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rocm_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
build:
strategy:
fail-fast: false
matrix:
matrix:
os: ['ubuntu-alola']
python: ['3.11']
torch_version: ['2.4.1']
torch_version: ['2.5.0']
toolkit_type: ['rocm']
toolkit_short_version: ['6.0', '6.1']

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
import itertools
environ = os.environ
PY_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12']
PY_VERSIONS = ['3.9', '3.10', '3.11', '3.12']
# NOTE: Don't forget to update `upload_pt`'s matrix
# when changing the CUDA/ROCM versions below!
CU_VERSIONS = ['118', '121', '124']
Expand All @@ -46,7 +46,7 @@ jobs:
include = []
for os in ['8-core-ubuntu', 'windows-8-core']:
for torch_version in ['2.4.1']:
for torch_version in ['2.5.0']:
# CUDA builds
for python, cuda_short_version in PY_CU:
if cuda_short_version != "124" and "windows" in os:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
uses: ./.github/workflows/wheels_upload_pip.yml
with:
twine_username: __token__
filter: "*torch2.4.1+cu121*"
filter: "*torch2.5.0+cu121*"
execute: ${{ github.repository == 'facebookresearch/xformers' && github.event_name != 'pull_request' }}
secrets:
twine_password: ${{ secrets.PYPI_TOKEN }}
Expand All @@ -116,6 +116,6 @@ jobs:
aws_role: "arn:aws:iam::749337293305:role/pytorch_bot_uploader_role"
s3_path: s3://pytorch/whl/${{ matrix.suffix }}/
aws_s3_cp_extra_args: --acl public-read
filter: "*torch2.4.1+${{ matrix.suffix }}*"
filter: "*torch2.5.0+${{ matrix.suffix }}*"
execute: ${{ github.repository == 'facebookresearch/xformers' && github.ref_type == 'tag' }}

4 changes: 2 additions & 2 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
with:
toolkit_type: "cuda"
toolkit_short_version: "124"
python: "3.8"
python: "3.9"

- name: Install build dependencies
run: |
$PY -m pip install wheel setuptools ninja torch==2.4.1 -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
$PY -m pip install wheel setuptools ninja torch==2.5.0 -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
git config --global --add safe.directory "*"
$PY -c "import torch; print('torch', torch.__version__)"
$PY -c "import torch; print('torch.cuda', torch.version.cuda)"
Expand Down
2 changes: 1 addition & 1 deletion .pyre_configuration
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignore_all_errors": ["xformers/benchmarks/", "xformers/_flash_attn"],
"python_version": "3.7",
"python_version": "3.9",
"source_directories": [
"stubs",
{"import_root": ".", "source": "xformers"}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.28.post2] - 2024-10-18
Pre-built binary wheels require PyTorch 2.5.0

## [0.0.28.post1] - 2024-09-13
Properly upload wheels for cuda 12.4

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ xFormers is:

## Installing xFormers

* **(RECOMMENDED, linux) Install latest stable with conda**: Requires [PyTorch 2.4.1 installed with conda](https://pytorch.org/get-started/locally/)
* **(RECOMMENDED, linux) Install latest stable with conda**: Requires [PyTorch 2.5.0 installed with conda](https://pytorch.org/get-started/locally/)

```bash
# (python 3.10/3.11 only)
conda install xformers -c xformers
```

* **(RECOMMENDED, linux & win) Install latest stable with pip**: Requires [PyTorch 2.4.1](https://pytorch.org/get-started/locally/)
* **(RECOMMENDED, linux & win) Install latest stable with pip**: Requires [PyTorch 2.5.0](https://pytorch.org/get-started/locally/)

```bash
# [linux only] cuda 11.8 version
Expand Down
77 changes: 0 additions & 77 deletions packaging/pkg_helpers.bash

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,18 +695,18 @@ def copy_extensions_to_source(self) -> None:
"clean": clean,
},
url="https://facebookresearch.github.io/xformers/",
python_requires=">=3.7",
python_requires=">=3.9",
author="Facebook AI Research",
author_email="[email protected]",
long_description="XFormers: A collection of composable Transformer building blocks."
+ "XFormers aims at being able to reproduce most architectures in the Transformer-family SOTA,"
+ "defined as compatible and combined building blocks as opposed to monolithic models",
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Operating System :: OS Independent",
Expand Down

0 comments on commit 68b7fd1

Please sign in to comment.