From 542bab953e86dff4ff5e28eff5e86d2418eccf45 Mon Sep 17 00:00:00 2001 From: Divin Honnappa Date: Fri, 15 Aug 2025 15:13:24 -0500 Subject: [PATCH] [AUTOGENERATED] [release/2.7] Change triton package name depending on rocm version (#2528) Cherry-pick of https://github.com/ROCm/pytorch/pull/2518 Co-authored-by: Ethan Wee --- .github/scripts/build_triton_wheel.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/build_triton_wheel.py b/.github/scripts/build_triton_wheel.py index 67971a6bd07ee..038e641f60148 100644 --- a/.github/scripts/build_triton_wheel.py +++ b/.github/scripts/build_triton_wheel.py @@ -101,8 +101,12 @@ def build_triton( triton_pythondir = triton_basedir / "python" triton_repo = "https://github.com/openai/triton" if device == "rocm": - triton_pkg_name = "pytorch-triton-rocm" triton_repo = "https://github.com/ROCm/triton" + rocm_version = get_rocm_version() # e.g., "7.0.1" + if tuple(map(int, rocm_version.split("."))) > (7, 0, 0): + triton_pkg_name = "triton" + else: + triton_pkg_name = "pytorch-triton-rocm" elif device == "xpu": triton_pkg_name = "pytorch-triton-xpu" triton_repo = "https://github.com/intel/intel-xpu-backend-for-triton"