Skip to content

Fix macos libtorch instructions for auto generated PR #1245

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

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions published_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,25 @@
"accnone": {
"note": null,
"versions": {
"Download here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
}
},
"cuda.x": {
"note": null,
"versions": {
"MacOS binaries do not support CUDA. Download default libtorch here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
}
},
"cuda.y": {
"note": null,
"versions": {
"MacOS binaries do not support CUDA. Download CPU libtorch here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
}
},
"rocm5.x": {
"note": null,
"versions": {
"ROCm is not available on MacOS. Download default libtorch here:": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip"
}
}
}
Expand Down Expand Up @@ -317,19 +317,19 @@
"accnone": {
"note": null,
"versions": {
"Download here:": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
}
},
"cuda.x": {
"note": null,
"versions": {
"MacOS binaries do not support CUDA. Download CPU libtorch here:": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
}
},
"cuda.y": {
"note": null,
"versions": {
"MacOS binaries do not support CUDA. Download CPU libtorch here:": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
"Download default libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.0.zip"
}
},
"rocm5.x": {
Expand Down Expand Up @@ -2237,4 +2237,4 @@
}
}
}
}
}
9 changes: 9 additions & 0 deletions scripts/gen_quick_start_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class OperatingSystem(Enum):
DEFAULT = "default"
ENABLE = "enable"
DISABLE = "disable"
MACOS = "macos"

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

def load_json_from_basedir(filename: str):
Expand Down Expand Up @@ -137,6 +139,13 @@ def update_versions(versions, release_matrix, release_version):
if instr["versions"] is not None:
for ver in [RELEASE, DEBUG]:
instr["versions"][LIBTORCH_DWNL_INSTR[ver]] = rel_entry_dict[ver]
elif os_key == OperatingSystem.MACOS.value:
rel_entry_dict = {
x["devtoolset"]: x["installation"] for x in pkg_arch_matrix
if x["libtorch_variant"] == "shared-with-deps"
}
if instr["versions"] is not None:
instr["versions"][LIBTORCH_DWNL_INSTR[MACOS]] = list(rel_entry_dict.values())[0]

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