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

[changelog]
"0.18.1" = ["2024-10-17: fix ROCm builds and build with WebP"]
"0.19.0" = ["2024-10-25: Use torch version set by constraints file", "2024-11-07: Update package version for ROCm"]
"0.19.1" = ["2024-12-02: rebuild for ROCm gfx908;gfx942"]
"0.21.0" = ["2025-03-02: Use upstream build for Gaudi", "2025-03-15: Add note about enabling ffmpeg"]
"0.22.0" = ["2025-06-09: Update with torch 2.7 update for CUDA", "2025-06-10: Update with torch 2.7 update for ROCm", "2025-07-04: Add ignore_platform: true for ppc64le support", "2025-07-31: Build with ffmpeg, fix env var names"]
"0.24.0.dev20250716" = ["2025-08-04: Built torchvision for TPU offline, added as pre-built wheel"]
"0.22.1" = ["2025-08-07: Update with torchaudio 2.7.1 update for CUDA", "2025-08-13: Update with torchaudio 2.7.1 update for ROCm", "2025-10-17: Rebuild torchaudio for spyre with triton-3.3.1"]
"0.23.0" = ["2025-08-29: Update with torch 2.8.0 update for CUDA", "2025-09-17: Revert the MR for 2.8.0, see AIPCC-4852", "2025-09-19: Second try to update with torch 2.8.0 upgrade for CUDA", "2025-09-25: Added new torch-2.8.0 collection for ROCm", "2025-09-25: Removed pre-built settings for TPU", "2025-11-12: Update with torch 2.9.0 update for ROCm"]
"0.24.0" = ["2025-11-19: Update with torch 2.9.0 update for ROCm"]
"0.24.0.dev20250730" = ["2025-09-02: Built torchvision for TPU offline, added as pre-built wheel", "2025-09-15: Update with torch 2.8.0 update for ROCm"]
"0.25.0" = ["2026-06-03: dynamic setuptools cap via plugin — pkg_resources removal (AIPCC-15912)", "2026-09-21: Switch to opendatahub-io fork via GitLab mirror, pin +rhaiv.1 tags (AIPCC-32156)"]

[env]
TORCHVISION_USE_JPEG = "1"
TORCHVISION_USE_PNG = "1"
TORCHVISION_USE_WEBP = "1"
TORCHVISION_USE_FFMPEG = "1"
TORCHVISION_USE_VIDEO_CODEC = "1"
TORCHVISION_USE_NVJPEG = "0"
TORCHVISION_INCLUDE = "/usr/include/ffmpeg"
TORCHVISION_LIBRARY = "/usr/lib64"

[download_source]
url = "https://gitlab.com/redhat/rhel-ai/core/mirrors/github/opendatahub-io/torchvision/-/archive/v${version}/torchvision-v${version}.tar.gz"
destination_filename = "torchvision-${version}.tar.gz"

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

[variants.cuda-ubi9.env]
CFLAGS = "-fno-gnu-unique"
CMAKE_PREFIX_PATH = "/usr/local"
TORCHVISION_USE_NVJPEG = "1"
FORCE_CUDA = "1"

[variants.rocm-ubi9.env]
FORCE_CUDA = "1"
