-
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
Changes from 1 commit
03bb18c
6279bb0
e4a1bf6
192f14a
18fa6de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -75,12 +75,12 @@ defmodule Torchx.MixProject do | |||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| defp libtorch_config() do | ||||||||||||||||||||||||||||||||||
| target = System.get_env("LIBTORCH_TARGET", "cpu") | ||||||||||||||||||||||||||||||||||
| version = System.get_env("LIBTORCH_VERSION", "2.8.0") | ||||||||||||||||||||||||||||||||||
| version = System.get_env("LIBTORCH_VERSION", "2.9.0") | ||||||||||||||||||||||||||||||||||
| env_dir = System.get_env("LIBTORCH_DIR") | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| # 2.8.0 is the first version that supports cu129 and drops cu118 | ||||||||||||||||||||||||||||||||||
| # cu118 might still be needed for older hardware, so we're keeping it | ||||||||||||||||||||||||||||||||||
| # for now. | ||||||||||||||||||||||||||||||||||
| # cu118 support was dropped in 2.8, which might still be needed for older hardware, | ||||||||||||||||||||||||||||||||||
| # so we're keeping it for now. | ||||||||||||||||||||||||||||||||||
| # cu129 was supported in 2.8, but replaced with cu130 in 2.9. | ||||||||||||||||||||||||||||||||||
| valid_targets = ["cpu", "cu118", "cu126", "cu128"] | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| valid_targets = | ||||||||||||||||||||||||||||||||||
|
|
@@ -89,7 +89,7 @@ defmodule Torchx.MixProject do | |||||||||||||||||||||||||||||||||
| if Version.match?(parsed, "<= 2.7.0") do | ||||||||||||||||||||||||||||||||||
| valid_targets | ||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||
| (valid_targets -- ["cu118"]) ++ ["cu129"] | ||||||||||||||||||||||||||||||||||
| (valid_targets -- ["cu118"]) ++ ["cu130"] | ||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| 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.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
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.