Skip to content

Commit 4459937

Browse files
authored
Merge pull request #1245 from atalman/fix_libtorch_mac_release
Fix macos libtorch instructions for auto generated PR
2 parents ceb0350 + 829af54 commit 4459937

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

published_versions.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -118,25 +118,25 @@
118118
"accnone": {
119119
"note": null,
120120
"versions": {
121-
"Download here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
121+
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
122122
}
123123
},
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 are 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 are 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 are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
140140
}
141141
}
142142
}
@@ -317,19 +317,19 @@
317317
"accnone": {
318318
"note": null,
319319
"versions": {
320-
"Download here:": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
320+
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
321321
}
322322
},
323323
"cuda.x": {
324324
"note": null,
325325
"versions": {
326-
"MacOS binaries do not support CUDA. Download CPU libtorch here:": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
326+
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
327327
}
328328
},
329329
"cuda.y": {
330330
"note": null,
331331
"versions": {
332-
"MacOS binaries do not support CUDA. Download CPU libtorch here:": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
332+
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
333333
}
334334
},
335335
"rocm5.x": {
@@ -2237,4 +2237,4 @@
22372237
}
22382238
}
22392239
}
2240-
}
2240+
}

scripts/gen_quick_start_module.py

+9
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)