Skip to content

Conversation

@stewartj3
Copy link
Contributor

  • 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.
@polvalente
Copy link
Contributor

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
Comment on lines 89 to 93
if Version.match?(parsed, "<= 2.7.0") do
valid_targets
else
(valid_targets -- ["cu118"]) ++ ["cu129"]
(valid_targets -- ["cu118"]) ++ ["cu130"]
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor

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

Copy link
Contributor Author

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
Comment on lines 44 to 45
- `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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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)

Copy link
Contributor Author

@stewartj3 stewartj3 Oct 18, 2025

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that idea

Copy link
Contributor Author

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.
@stewartj3 stewartj3 requested a review from polvalente October 18, 2025 20:22
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) |
Copy link
Contributor

@polvalente polvalente Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 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) |

Copy link
Contributor

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

Copy link
Contributor Author

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.
@stewartj3 stewartj3 requested a review from polvalente October 18, 2025 23:48
Copy link
Contributor

@polvalente polvalente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@polvalente polvalente merged commit 8808f62 into elixir-nx:main Oct 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants