Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyproject.toml with legacy build backend to keep most logic in setup.py #7033

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c0f87fb
Add pyproject.toml
loadams Feb 13, 2025
65f5365
Formatting fix
loadams Feb 13, 2025
87ce80a
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 13, 2025
9ca2c2d
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 14, 2025
f7d18dc
Update setuptools min requirement
loadams Feb 14, 2025
b0594ef
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 14, 2025
b8244bd
Switch build to legacy
loadams Feb 14, 2025
e5826c9
Add no-build isolation
loadams Feb 14, 2025
3b25efd
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 19, 2025
b38d75f
Test with non legacy backend
loadams Feb 19, 2025
a2cee4f
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 19, 2025
8acbaa3
Need legacy backend to execute setup.py, though it executes it differ…
loadams Feb 19, 2025
e5146e4
Update to actually use legacy backend
loadams Feb 19, 2025
c1694cd
Add all imports from setup.py to pyproject.toml
loadams Feb 21, 2025
3316f08
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 25, 2025
b720b54
Update workflow to not do build isolation
loadams Feb 25, 2025
a868356
Add more requirements
loadams Feb 25, 2025
1d869d1
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 25, 2025
fa4d66b
Add pyproject.toml into comments
loadams Feb 26, 2025
73f8c71
Merge branch 'master' into loadams/pyproject-toml
loadams Feb 26, 2025
b2ecd98
Merge branch 'master' into loadams/pyproject-toml
loadams Mar 11, 2025
e54b495
Merge branch 'master' into loadams/pyproject-toml
loadams Mar 14, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/nv-mii.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '.github/workflows/nv-mii.yml'
- 'requirements/**'
- 'setup.py'
- 'pyproject.toml'
- 'deepspeed/__init__.py'
- 'deepspeed/inference/**'
- '!deepspeed/inference/v2/**' # exclude v2 dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nv-pre-compile-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
#python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
- name: Compile DeepSpeed Ops
run: |
DS_ACCELERATOR=cuda DS_ENABLE_NINJA=1 TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0" DS_BUILD_OPS=1 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_GDS=0 DS_BUILD_RAGGED_DEVICE_OPS=0 DS_BUILD_EVOFORMER_ATTN=0 pip3 install .
DS_ACCELERATOR=cuda DS_ENABLE_NINJA=1 TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0" DS_BUILD_OPS=1 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_GDS=0 DS_BUILD_RAGGED_DEVICE_OPS=0 DS_BUILD_EVOFORMER_ATTN=0 pip3 install . --no-build-isolation
- name: DS Report
run: |
ds_report
2 changes: 1 addition & 1 deletion .github/workflows/nv-torch-latest-v100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Install deepspeed
run: |
pip install .[dev,1bit,autotuning]
pip install .[dev,1bit,autotuning] --no-build-isolation
ds_report

- name: Python environment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nv-torch-nightly-v100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Install deepspeed
run: |
pip install .[dev,1bit,autotuning]
pip install .[dev,1bit,autotuning] --no-build-isolation
ds_report

- name: Python environment
Expand Down
2 changes: 1 addition & 1 deletion deepspeed/git_version_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# DeepSpeed Team

try:
# This is populated by setup.py
# This is populated by setup.py/pyproject.toml
from .git_version_info_installed import * # noqa: F401 # type: ignore
except ModuleNotFoundError:
import os
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = [
"setuptools>=64",
"wheel",
"ninja",
"typing-extensions>=4.10.0",
"torch"
]
# Use legacy backend to import local packages in setup.py
build-backend = "setuptools.build_meta:__legacy__"
Loading