Skip to content

Add triton-kernels support and improve triton install messaging - #3335

Merged
mengfei-jiang merged 3 commits into
mainfrom
install_triton_kernels
Jun 2, 2026
Merged

mengfei-jiang merged 3 commits into
mainfrom
install_triton_kernels

Conversation

@mengfei-jiang

@mengfei-jiang mengfei-jiang commented May 25, 2026 •

Copy link
Copy Markdown
Contributor
  • Add triton-kernels uninstall/install to install_triton.sh and download_triton_wheel.sh
  • Add torch version check in install_triton.sh to skip reinstall when torch < 2.9.1
  • Improve setup.py log messages for version check and AITER_USE_SYSTEM_TRITON cases
  • Document AITER_USE_SYSTEM_TRITON usage in README.md

Motivation

  1. ATOM relies on triton-kernels for some of its operators, so the triton-kernels package must be installed alongside triton at a matching version to avoid compatibility issues

  2. Torch version guard — Environments with torch < 2.9.1 (e.g. SGLang Downstream) are incompatible with the latest Triton upstream. The script now skips the reinstall and preserves the image-bundled Triton and triton-kernels in these cases.

  3. Clearer messaging — Log messages now show the exact version being kept or replaced, with actionable guidance for each scenario.

Technical Details

  • install_triton.sh: Added torch version guard (< 2.9.1 skips reinstall), triton-kernels uninstall/install alongside triton, and install_triton_from_wheelhouse() for offline installation from cached wheels with AMD PyPI fallback.
  • download_triton_wheel.sh: Pre-downloads triton-kernels wheel from AMD PyPI for CI caching. Auto-detects ROCm version.
  • setup.py: Improved log messages for torch version check and AITER_USE_SYSTEM_TRITON scenarios with clearer version info and actionable guidance.
  • README.md: Added AITER_USE_SYSTEM_TRITON=1 usage example.

Test Plan

Test Result

Submission Checklist

@mengfei-jiang
mengfei-jiang requested a review from a team May 25, 2026 12:26
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 3335 --add-label <label>

- Add triton-kernels uninstall/install to install_triton.sh and
  download_triton_wheel.sh
- Add torch version check in install_triton.sh to skip reinstall
  when torch < 2.9.1
- Improve setup.py log messages for version check and
  AITER_USE_SYSTEM_TRITON cases
- Document AITER_USE_SYSTEM_TRITON usage in README.md

Co-Authored-By: Claude Opus 4 <[email protected]>
@mengfei-jiang
mengfei-jiang force-pushed the install_triton_kernels branch from 8b558dd to 4d1c96b Compare May 25, 2026 14:48
@mengfei-jiang
mengfei-jiang merged commit 5f38e30 into main Jun 2, 2026
497 of 583 checks passed
@mengfei-jiang
mengfei-jiang deleted the install_triton_kernels branch June 2, 2026 07:56
amirumoAMD pushed a commit that referenced this pull request Jun 2, 2026
- Add triton-kernels uninstall/install to install_triton.sh and
  download_triton_wheel.sh
- Add torch version check in install_triton.sh to skip reinstall
  when torch < 2.9.1
- Improve setup.py log messages for version check and
  AITER_USE_SYSTEM_TRITON cases
- Document AITER_USE_SYSTEM_TRITON usage in README.md

Co-authored-by: Claude Opus 4 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants