Skip to content

Commit 6b3a141

Browse files
praguptajithunnair-amd
authored andcommitted
[rocm7.1_internal_testing] Add triton_kernels wheel generation (#2566)
Fixes #ISSUE_NUMBER (cherry picked from commit 0ea0592)
1 parent d28eca7 commit 6b3a141

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/scripts/build_triton_wheel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ def build_triton(
164164
cwd=triton_basedir,
165165
)
166166

167+
# For gpt-oss models, triton requires this extra triton_kernels wheel
168+
# triton_kernels came after pytorch release/2.8
169+
triton_kernels_dir = Path(f"{triton_basedir}/python/triton_kernels")
170+
check_call([sys.executable, "-m", "build", "--wheel"], cwd=triton_kernels_dir, env=env)
171+
kernels_whl_path = next(iter((triton_kernels_dir / "dist").glob("*.whl")))
172+
shutil.copy(kernels_whl_path, Path.cwd())
173+
167174
return Path.cwd() / whl_path.name
168175

169176

0 commit comments

Comments
 (0)