Skip to content

Commit a95683d

Browse files
committed
Fix macos libtorch instructions
Put back autogenerate to true Update quick start module Revert "Put back autogenerate to true" This reverts commit 3acc91f. Put back original assets Put back autogenerate to false
1 parent ceb0350 commit a95683d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

published_versions.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@
124124
"cuda.x": {
125125
"note": null,
126126
"versions": {
127-
"MacOS binaries do not support CUDA. Download default libtorch here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
127+
"Download default libtorch here (ROCm and CUDA not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
128128
}
129129
},
130130
"cuda.y": {
131131
"note": null,
132132
"versions": {
133-
"MacOS binaries do not support CUDA. Download CPU libtorch here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
133+
"Download default libtorch here (ROCm and CUDA not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
134134
}
135135
},
136136
"rocm5.x": {
137137
"note": null,
138138
"versions": {
139-
"ROCm is not available on MacOS. Download default libtorch here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
139+
"Download default libtorch here (ROCm and CUDA not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
140140
}
141141
}
142142
}
@@ -2237,4 +2237,4 @@
22372237
}
22382238
}
22392239
}
2240-
}
2240+
}

scripts/gen_quick_start_module.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class OperatingSystem(Enum):
2929
DEFAULT = "default"
3030
ENABLE = "enable"
3131
DISABLE = "disable"
32+
MACOS = "macos"
3233

3334
# Mapping json to release matrix default values
3435
acc_arch_ver_default = {
@@ -56,6 +57,7 @@ class OperatingSystem(Enum):
5657
CXX11_ABI: "Download here (cxx11 ABI):",
5758
RELEASE: "Download here (Release version):",
5859
DEBUG: "Download here (Debug version):",
60+
MACOS: "Download default libtorch here (ROCm and CUDA not supported):",
5961
}
6062

6163
def load_json_from_basedir(filename: str):
@@ -137,6 +139,13 @@ def update_versions(versions, release_matrix, release_version):
137139
if instr["versions"] is not None:
138140
for ver in [RELEASE, DEBUG]:
139141
instr["versions"][LIBTORCH_DWNL_INSTR[ver]] = rel_entry_dict[ver]
142+
elif os_key == OperatingSystem.MACOS.value:
143+
rel_entry_dict = {
144+
x["devtoolset"]: x["installation"] for x in pkg_arch_matrix
145+
if x["libtorch_variant"] == "shared-with-deps"
146+
}
147+
if instr["versions"] is not None:
148+
instr["versions"][LIBTORCH_DWNL_INSTR[MACOS]] = list(rel_entry_dict.values())[0]
140149

141150
# This method is used for generating new quick-start-module.js
142151
# from the versions json object

0 commit comments

Comments
 (0)