-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Update to torch==2.6.0 #12721
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
Update to torch==2.6.0 #12721
Conversation
Signed-off-by: mgoin <michael@neuralmagic.com>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
Signed-off-by: mgoin <michael@neuralmagic.com>
Signed-off-by: mgoin <michael@neuralmagic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, CI looks green
Shall we merge #12393 first? cc: @youkaichao |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I built vLLM by merging this PR, and it worked perfectly 🚀
Confirmed that this update will break V1 at the current state, we should wait for #12393 at least
|
@mgoin can you help review and stamp that PR? |
@mgoin Thanks a lot for the update. IPEX CPU w/ PT 2.6 will be released next week. Will update on this as soon as the binary is out. Thanks, -yuan |
This pull request has merge conflicts that must be resolved before it can be |
I wanna when this PR will be merged? |
Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: mgoin <mgoin64@gmail.com>
LoRA and multi-modal tests should be fixed on main, let's see what errors are left. |
There seems to be an import error in |
Yeah looking into it, it seems that |
Signed-off-by: luka <luka@neuralmagic.com>
Possibly good to go now?? 🤞 🤞 edit: of course not -- I'll fix the pre-commit |
hi, How can I build vllm using torch 2.5.1 after this PR? Was there anyone succeeded? |
Can you try |
I am trying:
|
Are you getting an error? You might need to downgrade other dependencies as well, that would be my only other guess. |
I am building wheels for torch 2.5.1, but I meet many errors. I hope vllm could officially provide wheels for torch2.5.1 since torch2.6.0 would lead to many dependence problems when using vllm with some integrations such as verl or ms-swift. |
Could you create a new issue and post the errors? I don't think providing official 2.5.1 wheels is on the roadmap for v0.8.0+. But you're welcome to use an earlier version or cherry pick the commits you need. |
Signed-off-by: mgoin <michael@neuralmagic.com> Signed-off-by: mgoin <mgoin64@gmail.com> Signed-off-by: luka <luka@neuralmagic.com> Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: Tyler Michael Smith <tyler@neuralmagic.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
Signed-off-by: mgoin <michael@neuralmagic.com> Signed-off-by: mgoin <mgoin64@gmail.com> Signed-off-by: luka <luka@neuralmagic.com> Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: Tyler Michael Smith <tyler@neuralmagic.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: mgoin <michael@neuralmagic.com> Signed-off-by: mgoin <mgoin64@gmail.com> Signed-off-by: luka <luka@neuralmagic.com> Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: Tyler Michael Smith <tyler@neuralmagic.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
Summary: In torch 2.6.0, torch accidentally changed the default for custom operators to be "requires_contiguous". As a workaround, vLLM added needs_fixed_stride_order to a large number of custom operators. vLLM is currently on torch 2.7.0 which has reverted the default for custom operators back to needs_fixed_stride_order. This PR cleans up the kernel logic by flipping the default back. The other reason why I want to flip the default back is that needs_fixed_stride_order is actually buggy and torch 2.8.0 has better behavior for custom operators with no layout tags set. Also Kaichao tells me that some backends may not have moved to PyTorch 2.7.0 yet (vllm-project#8932) so I didn't delete the code in this PR. Test Plan: - Existing tests - Ran `pytest tests/compile/test_full_graph.py` (this was the test that originally caused us to add the needs_fixed_stride_order tag, see vllm-project#12721 for context) Signed-off-by: rzou <zou3519@gmail.com>
Summary: In torch 2.6.0, torch accidentally changed the default for custom operators to be "requires_contiguous". As a workaround, vLLM added needs_fixed_stride_order to a large number of custom operators. vLLM is currently on torch 2.7.0 which has reverted the default for custom operators back to needs_fixed_stride_order. This PR cleans up the kernel logic by flipping the default back. The other reason why I want to flip the default back is that needs_fixed_stride_order is actually buggy and torch 2.8.0 has better behavior for custom operators with no layout tags set. Also Kaichao tells me that some backends may not have moved to PyTorch 2.7.0 yet (vllm-project#8932) so I didn't delete the code in this PR. Test Plan: - Existing tests - Ran `pytest tests/compile/test_full_graph.py` (this was the test that originally caused us to add the needs_fixed_stride_order tag, see vllm-project#12721 for context) Signed-off-by: rzou <zou3519@gmail.com>
Summary: In torch 2.6.0, torch accidentally changed the default for custom operators to be "requires_contiguous". As a workaround, vLLM added needs_fixed_stride_order to a large number of custom operators. vLLM is currently on torch 2.7.0 which has reverted the default for custom operators back to needs_fixed_stride_order. This PR cleans up the kernel logic by flipping the default back. The other reason why I want to flip the default back is that needs_fixed_stride_order is actually buggy and torch 2.8.0 has better behavior for custom operators with no layout tags set. Also Kaichao tells me that some backends may not have moved to PyTorch 2.7.0 yet (vllm-project#8932) so I didn't delete the code in this PR. Test Plan: - Existing tests - Ran `pytest tests/compile/test_full_graph.py` (this was the test that originally caused us to add the needs_fixed_stride_order tag, see vllm-project#12721 for context) Signed-off-by: rzou <zou3519@gmail.com>
Only updates for CUDA. Successfully built locally on H100 CUDA 12.5 system and tested with
vllm serve meta-llama/Llama-3.1-8B-Instruct
We should upgrade other hardware backends separately. For instance, CPU is blocked by IPEX in the Dockerfile.cpu
FIX #12719