Skip to content

Commit

Permalink
[pytorch] Add macOS M1 chip support. (#1656)
Browse files Browse the repository at this point in the history
Change-Id: I5fb7f2bc1ba07626fb8dcc45e1daf77d4b31765b
  • Loading branch information
frankfliu committed May 16, 2022
1 parent a8aa45e commit e9a14c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -364,7 +364,8 @@ private static LibTorch downloadPyTorch(Platform platform) {
String precxx11;
if (Boolean.getBoolean("PYTORCH_PRECXX11")
|| Boolean.parseBoolean(System.getenv("PYTORCH_PRECXX11"))
|| "aarch64".equals(platform.getOsArch())) {
|| ("aarch64".equals(platform.getOsArch())
&& "linux".equals(platform.getOsPrefix()))) {
precxx11 = "-precxx11";
} else {
precxx11 = "";
Expand Down
1 change: 1 addition & 0 deletions engines/pytorch/pytorch-jni/build.gradle
Expand Up @@ -30,6 +30,7 @@ processResources {
files.add("linux-x86_64/cu113/libdjl_torch.so")
files.add("linux-x86_64/cu113-precxx11/libdjl_torch.so")
files.add("win-x86_64/cu113/djl_torch.dll")
files.add("osx-aarch64/cpu/libdjl_torch.dylib")
} else if (ptVersion.startsWith("1.10.")) {
files.add("linux-x86_64/cu113/libdjl_torch.so")
files.add("linux-x86_64/cu113-precxx11/libdjl_torch.so")
Expand Down

0 comments on commit e9a14c8

Please sign in to comment.