Skip to content

Commit 13058bb

Browse files
committed
Update to latest LibTorch and use official release
1 parent ff7ad85 commit 13058bb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

torchx/mix.exs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ defmodule Torchx.MixProject do
7575

7676
defp libtorch_config() do
7777
target = System.get_env("LIBTORCH_TARGET", "cpu")
78-
version = System.get_env("LIBTORCH_VERSION", "2.1.0")
78+
version = System.get_env("LIBTORCH_VERSION", "2.4.0")
7979
env_dir = System.get_env("LIBTORCH_DIR")
8080

8181
%{
@@ -135,18 +135,15 @@ defmodule Torchx.MixProject do
135135
"https://download.pytorch.org/libtorch/#{libtorch_config.target}/libtorch-cxx11-abi-shared-with-deps-#{libtorch_config.version}%2B#{libtorch_config.target}.zip"
136136

137137
{:unix, :darwin} ->
138-
# MacOS
139-
# pytorch only provides official pre-built binaries for x86_64
140138
case List.to_string(:erlang.system_info(:system_architecture)) do
141139
"x86_64" <> _ ->
142140
"https://download.pytorch.org/libtorch/#{libtorch_config.target}/libtorch-macos-#{libtorch_config.version}.zip"
143141

144142
_ ->
145-
"https://github.com/mlverse/libtorch-mac-m1/releases/download/LibTorch/libtorch-v#{libtorch_config.version}.zip"
143+
"https://download.pytorch.org/libtorch/#{libtorch_config.target}/libtorch-macos-arm64-#{libtorch_config.version}.zip"
146144
end
147145

148146
{:win32, :nt} ->
149-
# Windows
150147
"https://download.pytorch.org/libtorch/#{libtorch_config.target}/libtorch-win-shared-with-deps-#{libtorch_config.version}%2B#{libtorch_config.target}.zip"
151148

152149
os ->

0 commit comments

Comments
 (0)