[annotations]
"aipcc.component" = "Accelerator Enablement"
"aipcc.accelerator-enablement.libtorch" = "true"
"aipcc.accelerator-enablement.cuda" = "true"
"aipcc.accelerator-enablement.gaudi" = "true"
"aipcc.accelerator-enablement.neuron" = "true"
"aipcc.accelerator-enablement.rocm" = "true"
"aipcc.accelerator-enablement.tpu" = "true"

[changelog]
"2.3.1" = ["2024-09-12: replace patches with project_override", "2024-09-30: don't include AMD build changes in sdist", "2024-10-10: Fix false cmake warnings in ROCm", "2024-10-12: remove Intel oneMKL", "2024-10-14: force cuDNN for Caffe2 and add Red Hat supported math libs", "2024-10-16: build with OpenCV", "2024-10-23: Fix gloo MPI compile", "2024-10-28: MPI workaround is no longer necessary with Fromager 0.32", "2024-11-06: Use aotriton wheel for ROCm instead of local build"]
"2.4.1" = ["2024-10-10: update 2.3.1 patches for 2.4.1", "2024-10-15: stop building CMake in Torch 2.4.1", "2024-10-18: port forward patch to turn cmake warning into status messages", "2024-11-14: switch to llvm-triton from container", "2024-12-02: rebuild for ROCm gfx908;gfx942"]
"2.5.1" = ["2024-12-09: forward port relevant patches from 2.4.1", "2025-01-17: CUDA - Update CUDNN variables and enable CUFile"]
"2.6.0" = ["2025-02-03: forward port relevant patches from 2.5.1", "2025-04-09: Updating torch for ROCm", "2025-04-25: build with numpy 2.x", "2025-05-29: Move six clone into plugin", "2025-06-04: remove unsupported settings from env"]
"2.7.0" = ["2025-06-09: forward port relevant patches from 2.6.0", "2025-06-10: Updating torch for ROCm", "2025-06-23: Updated to fromager 0.50.0", "2025-07-03: Fix AOTRITON_INSTALLED_PREFIX path", "2025-07-03: mark package as exclusive build", "2025-07-03: Removed iniconfig from update_build_requires", "2025-07-03: Removed pluggy from update_build_requires", "2025-07-03: Removed pybind11 from update_build_requires", "2025-07-04: Add ignore_platform: true for ppc64le support", "2025-07-15: Build with OpenBLAS instead of FlexiBLAS", "2025-08-11: Build with openblas-openmp and correct OpenMP runtime for GCC", "2025-08-11: Remove GIT_REPOS_DIR usage", "2025-08-18: Switch to internal mirror of six", "2025-08-27: Depend on designated Triton version", "2025-09-01: Handle Triton constraint that is not an exact pin", "2025-09-02: More explicit flags for compute backends", "2025-09-16: Remove numpy<2 restriction to numpy for ROCm aotriton"]
"2.7.1" = ["2025-07-28: add spyre support", "2025-08-07: Update with torchaudio 2.7.1 update for CUDA", "2025-08-11: TORCH_CUDA_ARCH_LIST change, compress fatbin", "2025-08-11: Build with openblas-openmp and correct OpenMP runtime for GCC", "2025-08-13: Updating torch for ROCm", "2025-08-15: Remove GIT_REPOS_DIR usage", "2025-08-18: Switch to internal mirror of six", "2025-08-27: Depend on designated Triton version", "2025-09-01: Handle Triton constraint that is not an exact pin", "2025-09-02: More explicit flags for compute backends", "2025-09-16: Remove numpy<2 restriction to numpy for ROCm aotriton", "2025-10-17: Rebuild torch with right triton dependency", "2025-10-17: Rebuild torch with triton-3.3.1 for spyre", "2025-10-21: Updating torch plugin to disable Triton for s390x", "2025-10-29: Updating torch plugin to disable Triton for ppc64le", "2025-11-27: Enable Triton dependency for aarch64 on non-Spyre variants", "2026-03-13: Require explicit triton constraint from constraints.txt instead of fetching from git"]
"2.8.0" = ["2025-08-29: forward port relevant patches from 2.7.0", "2025-09-17: Revert the MR for 2.8.0, see AIPCC-4852", "2025-09-17: Added collection for TPU", "2025-09-19: Updating to torch 2.8, porting the relevant patches from 2.7", "2025-09-25: Added new torch-2.8.0 collection for ROCm", "2025-10-01: Rebuild Torch with libnccl-devel from CUDA 12.8 and not 12.9", "2025-10-17: Rebuild torch with right triton dependency", "2025-11-07: Add ROCm 7.0 compatibility patches (0007-0012: warpSize and uint64_t fixes for block_reduce, composable_kernel, C10_WARP_SIZE, layer_norm, sparse kernels)", "2025-11-18: Added collection for Neuron (AIPCC-7276)", "2025-11-27: Enable Triton dependency for aarch64 on non-Spyre variants", "2026-03-05: Require explicit triton constraint from constraints.txt instead of fetching from git"]
"2.9.0.dev20250716" = ["2025-08-04: Built torch for TPU offline, added here as pre-built wheel", "2025-08-27: Depend on designated Triton version", "2025-09-01: Handle Triton constraint that is not an exact pin"]
"2.9.0.dev20250730" = ["2025-09-02: Built torch for TPU offline, added here as pre-built wheel"]
"2.9.0" = ["2025-10-28: Building torch 2.9.0 with limited patches", "2025-11-12: Add ROCm 7.0 patch for uint32_t namespace issue in resource_strings.h (0007)", "2025-11-12: Disable FBGEMM_GENAI for ROCm 7.0 builds to avoid composable_kernel warpSize compilation errors", "2025-11-12: Update aotriton patch to support 0.11.0, upgrade to aotriton 0.11b0 + triton 3.5.0 for ROCm 7.0", "2025-11-27: Enable Triton dependency for aarch64 on non-Spyre variants", "2026-02-27: Build torch from source for Gaudi instead of pre-built wheel"]
"2.9.1" = ["2026-01-08: Forward port patches from 2.9.0 for torch 2.9.1", "2026-01-29: Updated aotriton patch to support 0.11.1", "2026-03-13: Require explicit triton constraint from constraints.txt instead of fetching from git", "2026-04-08: Rebuild with aotriton 0.11b0 to fix NaN regression on gfx942 (AIPCC-13815)", "2026-04-28: Rebuild without TORCH_ALLOW_TF32_CUBLAS_OVERRIDE to fix PyTorch UT precision failures (AIPCC-13681)", "2026-04-29: Include aotriton.images in torch wheel to fix NaN on gfx942 SDPA (AIPCC-13815)", "2026-05-12: Remove redundant MPI env vars for ROCm - container header already sets correct paths (AIPCC-15858)"]
"2.10.0" = ["2026-01-26: First torch 2.10.0 build", "2026-02-05: Set environment variable for OpenBLAS with OpenMP", "2026-02-16: Update aotriton patch to support 0.11.1b0", "2026-02-23: Fix aotriton patch version to 0.11.2 to match aotriton==0.11.2b0", "2026-04-08: Set environment variable for OpenBLAS with OpenMP appropriately", "2026-04-22: Add temp fix for missing .dockerignore file", "2026-04-28: Rebuild without TORCH_ALLOW_TF32_CUBLAS_OVERRIDE to fix PyTorch UT precision failures (AIPCC-13681)", "2026-04-29: Include aotriton.images in torch wheel to fix NaN on gfx942 SDPA (AIPCC-13815)", "2026-04-30: Opt out of gcc-toolset-14 for system GCC ABI consistency (AIPCC-10154)", "2026-04-30: Narrow USE_FBGEMM_GENAI guard to ROCm 7.0 only to restore CK flash attention on ROCm 7.1+ (AIPCC-15156)", "2026-05-12: Remove redundant MPI env vars for ROCm - container header already sets correct paths (AIPCC-15858)", "2026-05-28: Add DGX Spark (sm_121) CUDA arch support"]
"2.11.0" = ["2026-05-14: Switch CUDA torch to pre-built wheels from internal indexes (AIPCC-16435)", "2026-05-27: First torch 2.11.0 build", "2026-05-27: Bump torch to 2.11.0 for Gaudi with vLLM 0.21.0", "2026-06-02: Add patch to skip nccl_device.h and one-sided API on ROCm (RCCL does not ship these)", "2026-07-16: Extend RCCL patch to gate ncclGetLsaMultimemDevicePointer in NCCLSymmetricMemory.cu for ROCm 7.14 GA (AIPCC-22824)"]

[env]
USE_KINETO = "1"
BLAS = "OpenBLAS"
USE_CUDA = "OFF"
USE_ROCM = "OFF"
USE_XPU = "OFF"
OpenBLAS_LIB_NAME = "openblaso;openblas"

[download_source]
url = "https://github.com/pytorch/pytorch/releases/download/v${version}/pytorch-v${version}.tar.gz"
destination_filename = "torch-${version}.tar.gz"

[resolver_dist]
sdist_server_url = "https://pypi.org/simple"
include_sdists = false
include_wheels = true
ignore_platform = true

[build_options]
memory_per_job_gb = 8.0
exclusive_build = true

[project_override]
update_build_requires = ["filelock", "packaging"]
remove_build_requires = ["cmake"]

[variants.cuda-ubi9]
pre_built = true

[variants.cuda-ubi9.env]
CFLAGS = "-fno-gnu-unique"
CMAKE_PREFIX_PATH = "/usr/local"
CUDNN_INCLUDE_DIR = "/usr/include"
CUDNN_ROOT = "/usr"
USE_NCCL = "1"
USE_SYSTEM_NCCL = "1"
NCCL_INCLUDE_DIR = "/usr/include"
NCCL_ROOT = "/usr"
TORCH_NVCC_FLAGS = "${NVCC_APPEND_FLAGS}"
USE_CUDA = "ON"
USE_CUFILE = "1"

[variants.rocm-ubi9.env]
OPENBLAS_NUM_THREADS = "1"
USE_ROCM = "ON"

[variants.gaudi-ubi9]
wheel_server_url = "https://gitlab.com/api/v4/projects/82007171/packages/pypi/simple"
pre_built = true
