-
Notifications
You must be signed in to change notification settings - Fork 212
Update libtorch to 2.9 #1636
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 libtorch to 2.9 #1636
Conversation
stewartj3
commented
Oct 18, 2025
- libtorch is updated to version 2.9.0.
- cu129 support is dropped and cu130 is now supported.
- libtorch is updated to version 2.9.0. - cu129 support is dropped and cu130 is now supported.
68abf4a to
03bb18c
Compare
|
Thanks for the PR! I would rather us support both torch 2.8 and torch 2.9 Alternatively, maybe we should add a flag for letting the torch target be overridden? |
torchx/mix.exs
Outdated
| if Version.match?(parsed, "<= 2.7.0") do | ||
| valid_targets | ||
| else | ||
| (valid_targets -- ["cu118"]) ++ ["cu129"] | ||
| (valid_targets -- ["cu118"]) ++ ["cu130"] | ||
| end |
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.
| if Version.match?(parsed, "<= 2.7.0") do | |
| valid_targets | |
| else | |
| (valid_targets -- ["cu118"]) ++ ["cu129"] | |
| (valid_targets -- ["cu118"]) ++ ["cu130"] | |
| end | |
| cond do | |
| Version.match?(parsed, "< 2.8.0") -> | |
| valid_targets | |
| Version.match?(parsed, "< 2.9.0") -> | |
| (valid_targets -- ["cu118"]) ++ ["cu129"] | |
| true -> | |
| (valid_targets -- ["cu118"]) ++ ["cu130"] | |
| end |
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.
maybe even just have explicit lists in each clause
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.
Having a supported CUDA list for each version (or when libtorch changes the supported CUDA versions) would be easy to maintain. These only change every few months and are easy to update when adding a new version.
torchx/README.md
Outdated
| - `cu128` CUDA 12.8 and CPU version (no macOS support) | ||
| - `cu129` CUDA 12.9 and CPU version (no macOS support, libtorch `>= 2.8.0` only) | ||
| - `cu130` CUDA 13.0 and CPU version (no macOS support, libtorch `>= 2.9.0` only) |
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.
| - `cu128` CUDA 12.8 and CPU version (no macOS support) | |
| - `cu129` CUDA 12.9 and CPU version (no macOS support, libtorch `>= 2.8.0` only) | |
| - `cu130` CUDA 13.0 and CPU version (no macOS support, libtorch `>= 2.9.0` only) | |
| - `cu128` CUDA 12.8 and CPU version (no macOS support) | |
| - `cu129` CUDA 12.9 and CPU version (no macOS support, libtorch `>= 2.8.0 && < 2.9.0` only) | |
| - `cu130` CUDA 13.0 and CPU version (no macOS support, libtorch `>= 2.9.0` only) |
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.
With the constant updates in supported CUDA versions it may be easier to display this a a table with torch version and support CUDA versions as the columns.
| torch | supported CUDA versions |
|---|---|
| 2.7.0 | cu118, cu126, cu128 |
| 2.8.0 | cu126, cu128, cu129 |
| 2.9.0 | cu126, cu128, cu130 |
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.
I like that idea
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.
Updated the readme with the new table.
Add a table to list the supported targets for each torch version.
Ensure that each libtorch version has the correct cuda versions associated with it.
torchx/README.md
Outdated
| - `cu129` CUDA 12.9 and CPU version (no macOS support, libtorch `>= 2.8.0` only) | ||
| | Torch Version | Supported Targets | | ||
| | --------------- | ---------------------------------------------------- | | ||
| | 2.7.0 | cpu, cu118 (CUDA 11.8), cu126 (12.6), cu128 (12.8) | |
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.
| | 2.7.0 | cpu, cu118 (CUDA 11.8), cu126 (12.6), cu128 (12.8) | | |
| | < 2.8.0 | cpu, cu118 (CUDA 11.8), cu126 (12.6), cu128 (12.8) | |
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.
Also for the 3 lines all parenthesis should say CUDA x instead of the first one. I don't seem to be able to apply suggestions so I can edit this by myself
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.
Added CUDA to the other versions in the table.
Add CUDA to the version numbers on the tables.
polvalente
left a comment
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.
Thanks again!