mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
CUDA 12.4 ARM wheel integration to CD - nightly build (#126174)
rebasing https://github.com/pytorch/pytorch/pull/124112. too many conflict files, so starting a new PR. Test https://github.com/pytorch/builder/pull/1775 (merged) for ARM wheel addition Test https://github.com/pytorch/builder/pull/1828 (merged) for setting MAX_JOBS Current issue to follow up: https://github.com/pytorch/pytorch/issues/126980 Co-authored-by: Aidyn-A <aidyn.b.aitzhan@gmail.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/126174 Approved by: https://github.com/nWEIdia, https://github.com/atalman
This commit is contained in:
committed by
PyTorch MergeBot
parent
7763c83af6
commit
1c2e221e25
50
.github/scripts/generate_binary_build_matrix.py
vendored
50
.github/scripts/generate_binary_build_matrix.py
vendored
@ -34,6 +34,9 @@ CPU_AARCH64_ARCH = ["cpu-aarch64"]
|
||||
CPU_S390X_ARCH = ["cpu-s390x"]
|
||||
|
||||
|
||||
CUDA_AARCH64_ARCH = ["cuda-aarch64"]
|
||||
|
||||
|
||||
PYTORCH_EXTRA_INSTALL_REQUIREMENTS = {
|
||||
"11.8": (
|
||||
"nvidia-cuda-nvrtc-cu11==11.8.89; platform_system == 'Linux' and platform_machine == 'x86_64' | " # noqa: B950
|
||||
@ -135,6 +138,8 @@ def arch_type(arch_version: str) -> str:
|
||||
return "cpu-aarch64"
|
||||
elif arch_version in CPU_S390X_ARCH:
|
||||
return "cpu-s390x"
|
||||
elif arch_version in CUDA_AARCH64_ARCH:
|
||||
return "cuda-aarch64"
|
||||
else: # arch_version should always be "cpu" in this case
|
||||
return "cpu"
|
||||
|
||||
@ -155,6 +160,7 @@ WHEEL_CONTAINER_IMAGES = {
|
||||
"cpu-cxx11-abi": f"pytorch/manylinuxcxx11-abi-builder:cpu-cxx11-abi-{DEFAULT_TAG}",
|
||||
"cpu-aarch64": f"pytorch/manylinuxaarch64-builder:cpu-aarch64-{DEFAULT_TAG}",
|
||||
"cpu-s390x": f"pytorch/manylinuxs390x-builder:cpu-s390x-{DEFAULT_TAG}",
|
||||
"cuda-aarch64": f"pytorch/manylinuxaarch64-builder:cuda12.4-{DEFAULT_TAG}",
|
||||
}
|
||||
|
||||
CONDA_CONTAINER_IMAGES = {
|
||||
@ -213,6 +219,7 @@ def translate_desired_cuda(gpu_arch_type: str, gpu_arch_version: str) -> str:
|
||||
"cpu-cxx11-abi": "cpu-cxx11-abi",
|
||||
"cpu-s390x": "cpu",
|
||||
"cuda": f"cu{gpu_arch_version.replace('.', '')}",
|
||||
"cuda-aarch64": "cu124",
|
||||
"rocm": f"rocm{gpu_arch_version}",
|
||||
}.get(gpu_arch_type, gpu_arch_version)
|
||||
|
||||
@ -293,11 +300,11 @@ def generate_libtorch_matrix(
|
||||
"libtorch_variant": libtorch_variant,
|
||||
"libtorch_config": abi_version if os == "windows" else "",
|
||||
"devtoolset": abi_version if os != "windows" else "",
|
||||
"container_image": LIBTORCH_CONTAINER_IMAGES[
|
||||
(arch_version, abi_version)
|
||||
]
|
||||
if os != "windows"
|
||||
else "",
|
||||
"container_image": (
|
||||
LIBTORCH_CONTAINER_IMAGES[(arch_version, abi_version)]
|
||||
if os != "windows"
|
||||
else ""
|
||||
),
|
||||
"package_type": "libtorch",
|
||||
"build_name": f"libtorch-{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-{abi_version}".replace(
|
||||
".", "_"
|
||||
@ -330,7 +337,7 @@ def generate_wheels_matrix(
|
||||
elif os == "linux-aarch64":
|
||||
# Only want the one arch as the CPU type is different and
|
||||
# uses different build/test scripts
|
||||
arches = ["cpu-aarch64"]
|
||||
arches = ["cpu-aarch64", "cuda-aarch64"]
|
||||
elif os == "linux-s390x":
|
||||
# Only want the one arch as the CPU type is different and
|
||||
# uses different build/test scripts
|
||||
@ -346,11 +353,16 @@ def generate_wheels_matrix(
|
||||
or arch_version == "cpu-cxx11-abi"
|
||||
or arch_version == "cpu-aarch64"
|
||||
or arch_version == "cpu-s390x"
|
||||
or arch_version == "cuda-aarch64"
|
||||
else arch_version
|
||||
)
|
||||
|
||||
# 12.1 linux wheels require PYTORCH_EXTRA_INSTALL_REQUIREMENTS to install
|
||||
if arch_version in ["12.4", "12.1", "11.8"] and os == "linux":
|
||||
if (
|
||||
arch_version in ["12.4", "12.1", "11.8"]
|
||||
and os == "linux"
|
||||
or arch_version == "cuda-aarch64"
|
||||
):
|
||||
ret.append(
|
||||
{
|
||||
"python_version": python_version,
|
||||
@ -359,10 +371,16 @@ def generate_wheels_matrix(
|
||||
"desired_cuda": translate_desired_cuda(
|
||||
gpu_arch_type, gpu_arch_version
|
||||
),
|
||||
"devtoolset": "",
|
||||
"devtoolset": (
|
||||
"cxx11-abi" if arch_version == "cuda-aarch64" else ""
|
||||
),
|
||||
"container_image": WHEEL_CONTAINER_IMAGES[arch_version],
|
||||
"package_type": package_type,
|
||||
"pytorch_extra_install_requirements": PYTORCH_EXTRA_INSTALL_REQUIREMENTS[arch_version], # fmt: skip
|
||||
"pytorch_extra_install_requirements": (
|
||||
PYTORCH_EXTRA_INSTALL_REQUIREMENTS[arch_version] # fmt: skip
|
||||
if os != "linux-aarch64"
|
||||
else ""
|
||||
),
|
||||
"build_name": f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}".replace( # noqa: B950
|
||||
".", "_"
|
||||
),
|
||||
@ -377,17 +395,19 @@ def generate_wheels_matrix(
|
||||
"desired_cuda": translate_desired_cuda(
|
||||
gpu_arch_type, gpu_arch_version
|
||||
),
|
||||
"devtoolset": "cxx11-abi"
|
||||
if arch_version == "cpu-cxx11-abi"
|
||||
else "",
|
||||
"devtoolset": (
|
||||
"cxx11-abi" if arch_version == "cpu-cxx11-abi" else ""
|
||||
),
|
||||
"container_image": WHEEL_CONTAINER_IMAGES[arch_version],
|
||||
"package_type": package_type,
|
||||
"build_name": f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}".replace(
|
||||
".", "_"
|
||||
),
|
||||
"pytorch_extra_install_requirements":
|
||||
PYTORCH_EXTRA_INSTALL_REQUIREMENTS["12.1"] # fmt: skip
|
||||
if os != "linux" else "",
|
||||
"pytorch_extra_install_requirements": (
|
||||
PYTORCH_EXTRA_INSTALL_REQUIREMENTS["12.1"] # fmt: skip
|
||||
if os != "linux"
|
||||
else ""
|
||||
),
|
||||
}
|
||||
)
|
||||
return ret
|
||||
|
Reference in New Issue
Block a user