From 50889dc6b7437a2513d9f51445d7afea06c48c23 Mon Sep 17 00:00:00 2001 From: Prachi Gupta Date: Fri, 22 Aug 2025 21:39:52 +0000 Subject: [PATCH 1/2] [rocm7.1_internal_testing] Add triton_kernels wheel generation --- .github/scripts/build_triton_wheel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/scripts/build_triton_wheel.py b/.github/scripts/build_triton_wheel.py index 9d6de81c3aef1..78e8f783f9bd0 100644 --- a/.github/scripts/build_triton_wheel.py +++ b/.github/scripts/build_triton_wheel.py @@ -162,6 +162,11 @@ def build_triton( cwd=triton_basedir, ) + triton_kernels_dir = Path(f"{triton_basedir}/python/triton_kernels") + check_call([sys.executable, "-m", "build", "--wheel"], cwd=triton_kernels_dir, env=env) + kernels_whl_path = next(iter((triton_kernels_dir / "dist").glob("*.whl"))) + shutil.copy(kernels_whl_path, Path.cwd()) + return Path.cwd() / whl_path.name From 149bf4edef655b67dd90e81d91af2c06e740fc40 Mon Sep 17 00:00:00 2001 From: Prachi Gupta Date: Fri, 22 Aug 2025 18:07:50 -0400 Subject: [PATCH 2/2] Update comment --- .github/scripts/build_triton_wheel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/scripts/build_triton_wheel.py b/.github/scripts/build_triton_wheel.py index 78e8f783f9bd0..9e86d332c5316 100644 --- a/.github/scripts/build_triton_wheel.py +++ b/.github/scripts/build_triton_wheel.py @@ -162,6 +162,8 @@ def build_triton( cwd=triton_basedir, ) + # For gpt-oss models, triton requires this extra triton_kernels wheel + # triton_kernels came after pytorch release/2.8 triton_kernels_dir = Path(f"{triton_basedir}/python/triton_kernels") check_call([sys.executable, "-m", "build", "--wheel"], cwd=triton_kernels_dir, env=env) kernels_whl_path = next(iter((triton_kernels_dir / "dist").glob("*.whl")))