-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Update PyTorch to 2.8.0 #20358
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
Merged
+50
−45
Merged
Update PyTorch to 2.8.0 #20358
Changes from 28 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
d6bf991
[WIP][RC] Update PyTorch to 2.8.0
huydhn 456985c
Handle xformers
huydhn 4838d53
Some more tweaks
huydhn ca21216
Attempt to fix xformers build
huydhn 0c43174
Silly typo
huydhn 14c85d1
Few more tweaks for a greener CI
huydhn ad98d10
Attempt to offload to CPU to avoid OOM in CI
huydhn 316f116
Merge branch 'main' into pytorch-2.8.0
huydhn 460ed09
Merge branch 'main' into pytorch-2.8.0
huydhn 7df288f
Merge branch 'main' into pytorch-2.8.0
huydhn 6a08113
Fix lint
huydhn 44f07c0
Run all test_sequence_parallel again
huydhn 29fb5a0
Typo
huydhn 6a7e3f8
Merge branch 'main' into pytorch-2.8.0
huydhn c5d8940
Try to reproduce OOM after recent rebase
huydhn f320d9d
Match xformers version
huydhn a5999e1
Not sure why building xformers 0.0.31 fails
huydhn d1dbb4e
Remove some doc changes what are not needed
huydhn 6f394f5
Tweak some tests
huydhn f62f6cf
Merge branch 'main' into pytorch-2.8.0
huydhn f1a6642
Merge branch 'main' into pytorch-2.8.0
huydhn aa1d8c1
Lower memory usage for test_chatglm3_lora_tp4_fully_sharded_loras
huydhn 6f2c684
Merge branch 'main' into pytorch-2.8.0
huydhn 91ce20f
Build mamba_ssm from source
huydhn 5ce81c7
Merge branch 'main' into pytorch-2.8.0
huydhn c789827
Merge branch 'main' into pytorch-2.8.0
huydhn 93eb498
Ready 2.8.0
huydhn c741b0e
Update cpu.txt
huydhn f948f41
Merge branch 'main' into pytorch-2.8.0
huydhn 1543b92
Resolve xformers and mamba_ssm
huydhn 8de151c
Ready to land
huydhn bbf1ce3
xformers v0.0.32 is almost here
huydhn 653ccd1
Use xformers 0.0.32
huydhn bcb7ffc
Merge branch 'main' into pytorch-2.8.0
huydhn 684c24d
Install ao from cu128
huydhn 456d284
Merge branch 'main' into pytorch-2.8.0
mgoin 338d1b5
Merge branch 'main' into pytorch-2.8.0
mgoin 984ff0f
Merge branch 'main' into pytorch-2.8.0
mgoin 90d455e
Merge branch 'main' into pytorch-2.8.0
mgoin be370a8
Merge branch 'main' into pytorch-2.8.0
mgoin d8de108
Tweaking jason9693/Qwen2.5-1.5B-apeach memory usage
huydhn 047e295
Same model, different test
huydhn a409dc2
Revert "Same model, different test"
huydhn b1c83ec
Revert "Tweaking jason9693/Qwen2.5-1.5B-apeach memory usage"
huydhn cafb50d
Merge branch 'main' into pytorch-2.8.0
huydhn 56739de
Merge branch 'main' into pytorch-2.8.0
huydhn 3526230
Switch to XFORMERS backend for some tests
huydhn 6bae6f2
Revert "Switch to XFORMERS backend for some tests"
huydhn 102d0d7
Apply #23853
huydhn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \ | |
uv pip install --system -r requirements/cuda.txt \ | ||
--extra-index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.') | ||
|
||
# Build from source to unblock PyTorch 2.8.0 update | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv pip install --system --no-build-isolation "git+https://github.com/state-spaces/[email protected]" | ||
|
||
# cuda arch list used by torch | ||
# can be useful for both `dev` and `test` | ||
# explicitly set the list to avoid issues with torch 2.2 | ||
|
@@ -376,6 +380,13 @@ RUN --mount=type=bind,from=build,src=/workspace/dist,target=/vllm-workspace/dist | |
uv pip install --system dist/*.whl --verbose \ | ||
--extra-index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.') | ||
|
||
# TODO (huydhn): Remove this once xformers is released for 2.8.0 | ||
RUN --mount=type=cache,target=/root/.cache/uv bash - <<'BASH' | ||
. /etc/environment | ||
export TORCH_CUDA_ARCH_LIST='7.0 7.5 8.0 8.9 9.0 10.0 12.0' | ||
uv pip install --system --no-build-isolation "git+https://github.com/facebookresearch/[email protected]" | ||
huydhn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
BASH | ||
|
||
# If we need to build FlashInfer wheel before its release: | ||
# $ # Note we remove 7.0 from the arch list compared to the list below, since FlashInfer only supports sm75+ | ||
# $ export TORCH_CUDA_ARCH_LIST='7.5 8.0 8.9 9.0a 10.0a 12.0' | ||
|
@@ -483,6 +494,10 @@ ENV UV_INDEX_STRATEGY="unsafe-best-match" | |
# Use copy mode to avoid hardlink failures with Docker cache mounts | ||
ENV UV_LINK_MODE=copy | ||
|
||
# Build from source to unblock PyTorch 2.8.0 update | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv pip install --system --no-build-isolation "git+https://github.com/state-spaces/[email protected]" | ||
|
||
# install development dependencies (for testing) | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
CUDA_MAJOR="${CUDA_VERSION%%.*}"; \ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.