Skip to content

Quick start module, remove macos x86 #1608

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 2 commits into from
Apr 23, 2024
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
26 changes: 4 additions & 22 deletions .github/workflows/update-quick-start-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
package-type: all
os: windows
channel: "nightly"
macos-nightly-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: macos
channel: "nightly"
macos-arm64-nightly-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
Expand All @@ -58,13 +52,6 @@ jobs:
package-type: all
os: windows
channel: "release"
macos-release-matrix:
needs: [macos-nightly-matrix]
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: all
os: macos
channel: "release"
macos-arm64-release-matrix:
needs: [macos-arm64-nightly-matrix]
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
Expand All @@ -74,9 +61,8 @@ jobs:
channel: "release"

update-quick-start:
needs: [linux-nightly-matrix, windows-nightly-matrix, macos-nightly-matrix,
macos-arm64-nightly-matrix, linux-release-matrix, windows-release-matrix,
macos-release-matrix, macos-arm64-release-matrix]
needs: [linux-nightly-matrix, windows-nightly-matrix, macos-arm64-nightly-matrix,
linux-release-matrix, windows-release-matrix, macos-arm64-release-matrix]
runs-on: "ubuntu-20.04"
environment: pytorchbot-env
steps:
Expand All @@ -92,22 +78,18 @@ jobs:
env:
LINUX_NIGHTLY_MATRIX: ${{ needs.linux-nightly-matrix.outputs.matrix }}
WINDOWS_NIGHTLY_MATRIX: ${{ needs.windows-nightly-matrix.outputs.matrix }}
MACOS_NIGHTLY_MATRIX: ${{ needs.macos-nightly-matrix.outputs.matrix }}
MACOS_ARM64_NIGHTLY_MATRIX: ${{ needs.macos-arm64-nightly-matrix.outputs.matrix }}
MACOS_NIGHTLY_MATRIX: ${{ needs.macos-arm64-nightly-matrix.outputs.matrix }}
LINUX_RELEASE_MATRIX: ${{ needs.linux-release-matrix.outputs.matrix }}
WINDOWS_RELEASE_MATRIX: ${{ needs.windows-release-matrix.outputs.matrix }}
MACOS_RELEASE_MATRIX: ${{ needs.macos-release-matrix.outputs.matrix }}
MACOS_ARM64_RELEASE_MATRIX: ${{ needs.macos-arm64-release-matrix.outputs.matrix }}
MACOS_RELEASE_MATRIX: ${{ needs.macos-arm64-release-matrix.outputs.matrix }}
run: |
set -ex
printf '%s\n' "$LINUX_NIGHTLY_MATRIX" > linux_nightly_matrix.json
printf '%s\n' "$WINDOWS_NIGHTLY_MATRIX" > windows_nightly_matrix.json
printf '%s\n' "$MACOS_NIGHTLY_MATRIX" > macos_nightly_matrix.json
printf '%s\n' "$MACOS_ARM64_NIGHTLY_MATRIX" > macos_arm64_nightly_matrix.json
printf '%s\n' "$LINUX_RELEASE_MATRIX" > linux_release_matrix.json
printf '%s\n' "$WINDOWS_RELEASE_MATRIX" > windows_release_matrix.json
printf '%s\n' "$MACOS_RELEASE_MATRIX" > macos_release_matrix.json
printf '%s\n' "$MACOS_ARM64_RELEASE_MATRIX" > macos_arm64_release_matrix.json
python3 ./scripts/gen_quick_start_module.py --autogenerate > assets/quick-start-module.js
rm *_matrix.json
- name: Create Issue if failed
Expand Down
6 changes: 1 addition & 5 deletions published_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,31 +118,27 @@
"accnone": {
"note": null,
"versions": {
"Download x86 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-x86_64-latest.zip",
"Download arm64 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-arm64-latest.zip"
}
},
"cuda.x": {
"note": null,
"default": true,
"versions": {
"Download x86 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-x86_64-latest.zip",
"Download arm64 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-arm64-latest.zip"
}
},
"cuda.y": {
"note": null,
"default": true,
"versions": {
"Download x86 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-x86_64-latest.zip",
"Download arm64 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-arm64-latest.zip"
}
},
"rocm5.x": {
"note": null,
"default": true,
"versions": {
"Download x86 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-x86_64-latest.zip",
"Download arm64 libtorch here (ROCm and CUDA are not supported):": "https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-arm64-latest.zip"
}
}
Expand Down Expand Up @@ -4131,4 +4127,4 @@
}
}
}
}
}
23 changes: 3 additions & 20 deletions scripts/gen_quick_start_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class OperatingSystem(Enum):
LINUX: str = "linux"
WINDOWS: str = "windows"
MACOS: str = "macos"
MACOS_ARM64: str = "macos_arm64"

PRE_CXX11_ABI = "pre-cxx11"
CXX11_ABI = "cxx11-abi"
Expand All @@ -31,21 +30,20 @@ class OperatingSystem(Enum):
ENABLE = "enable"
DISABLE = "disable"
MACOS = "macos"
MACOS_ARM64 = "macos-arm64"

# Mapping json to release matrix default values
acc_arch_ver_default = {
"nightly": {
"accnone": ("cpu", ""),
"cuda.x": ("cuda", "11.8"),
"cuda.y": ("cuda", "12.1"),
"rocm5.x": ("rocm", "5.7")
"rocm5.x": ("rocm", "6.0")
},
"release": {
"accnone": ("cpu", ""),
"cuda.x": ("cuda", "11.8"),
"cuda.y": ("cuda", "12.1"),
"rocm5.x": ("rocm", "5.7")
"rocm5.x": ("rocm", "6.0")
}
}

Expand All @@ -59,8 +57,7 @@ class OperatingSystem(Enum):
CXX11_ABI: "Download here (cxx11 ABI):",
RELEASE: "Download here (Release version):",
DEBUG: "Download here (Debug version):",
MACOS: "Download x86 libtorch here (ROCm and CUDA are not supported):",
MACOS_ARM64: "Download arm64 libtorch here (ROCm and CUDA are not supported):",
MACOS: "Download arm64 libtorch here (ROCm and CUDA are not supported):",
}

def load_json_from_basedir(filename: str):
Expand Down Expand Up @@ -124,16 +121,6 @@ def update_versions(versions, release_matrix, release_version):
if (x["package_type"], x["gpu_arch_type"], x["gpu_arch_version"]) ==
(package_type, gpu_arch_type, gpu_arch_version)
]
# MACOS and MACOS_ARM64 release matrices are reduced to
# one single matrix in get started page. This is the only
# OS that this logic applies to. Hence this logic is needed.
pkg_arch_matrix_arm64 = []
if os_key == OperatingSystem.MACOS.value and package_type == "libtorch":
pkg_arch_matrix_arm64 = [
x for x in release_matrix[OperatingSystem.MACOS_ARM64.value]
if (x["package_type"], x["gpu_arch_type"], x["gpu_arch_version"]) ==
(package_type, gpu_arch_type, gpu_arch_version)
]

if pkg_arch_matrix:
if package_type != "libtorch":
Expand All @@ -155,10 +142,6 @@ def update_versions(versions, release_matrix, release_version):
elif os_key == OperatingSystem.MACOS.value:
if instr["versions"] is not None:
instr["versions"][LIBTORCH_DWNL_INSTR[MACOS]] = pkg_arch_matrix[0]["installation"]
if len(pkg_arch_matrix_arm64) > 0:
instr["versions"][LIBTORCH_DWNL_INSTR[MACOS_ARM64]] = pkg_arch_matrix_arm64[0]["installation"]
else:
instr["versions"].pop(LIBTORCH_DWNL_INSTR[MACOS_ARM64], None)

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