Skip to content

[DO NOT MERGE] CI: try downloading pre-built Triton wheel before building from source - #2761

Closed
mengfei-jiang wants to merge 19 commits into
ROCm:mainfrom
mengfei-jiang:use_triton_wheel
Closed

mengfei-jiang wants to merge 19 commits into
ROCm:mainfrom
mengfei-jiang:use_triton_wheel

Conversation

@mengfei-jiang

Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@mengfei-jiang
mengfei-jiang requested a review from a team April 16, 2026 11:09
@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 (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:triton-355 Run Triton tests on MI355 in addition to MI325
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 2761 --add-label <label>

@gyohuangxin gyohuangxin changed the title CI: try downloading pre-built Triton wheel before building from source [DO NOT MERGE] CI: try downloading pre-built Triton wheel before building from source Apr 17, 2026
@mengfei-jiang
mengfei-jiang force-pushed the use_triton_wheel branch 3 times, most recently from 65914a1 to 4480c2d Compare April 23, 2026 14:40
mengfei-jiang and others added 10 commits April 29, 2026 15:50
Update build-triton job to first attempt downloading a pre-built wheel
from rocm.frameworks-nightlies.amd.com, falling back to source build
only when the download fails. Also bump TRITON_COMMIT to d1660454.

Co-Authored-By: Claude Opus 4 <[email protected]>
Update wheel URL format from triton-3.7.0+amd.git<commit>
to triton-3.7.0+rocm7.2.0.git<commit> to match the actual
naming convention on the nightly server.

Co-Authored-By: Claude Opus 4 <[email protected]>
The server returns 403 when '+' is used literally in the URL.
Percent-encode it as %2B while keeping the local filename with '+'.

Co-Authored-By: Claude Opus 4 <[email protected]>
The wheel files are under gfx942-gfx950/ not gfx942-gfx950/triton/.
The triton/ subdirectory is a PEP 503 index page whose links point
to ../  (the parent directory).

Co-Authored-By: Claude Opus 4 <[email protected]>
- Add requirements-triton.txt with --extra-index-url for AMD PyPI
- Add pip install -r requirements-triton.txt in build_aiter_triton.sh
- Remove build-triton job from triton-test.yaml, use BUILD_TRITON=0
- Update README.md with Triton installation instructions

Co-Authored-By: Claude Opus 4 <[email protected]>
Relax atol/rtol to 0.1 for bfloat16 due to lower precision (7-bit
mantissa). Add fullgraph=True to enforce full graph compilation
without eager fallback.

Co-Authored-By: Claude Opus 4 <[email protected]>
- Change dtype params to [float16, bfloat16] across all torch_compile tests
- Add torch._dynamo.reset() to prevent recompile limit with fullgraph=True
- Relax tolerance for bf16 in fused_mul_add and activation tests (atol=0.1)

Co-Authored-By: Claude Opus 4 <[email protected]>
mengfei-jiang and others added 9 commits April 29, 2026 15:53
Move triton dependency from a separate requirements-triton.txt (using
AMD PyPI index) to the standard amd-triton package on PyPI, added as
both a build and runtime dependency. This simplifies installation by
making `pip install -e .` handle triton automatically.

Co-Authored-By: Claude Opus 4 <[email protected]>
amd-triton is now available on PyPI directly, so the extra index URL
for AMD PyPI is no longer needed.

Co-Authored-By: Claude Opus 4 <[email protected]>
If amd-triton is not yet installed, pip uninstall returns non-zero
which would abort setup.py. The reinstall call is kept as check_call
to ensure amd-triton is always installed with the latest content.

Co-Authored-By: Claude Opus 4 <[email protected]>
Use requirements-triton.txt for triton installation instead of
embedding it in pyproject.toml/setup.py. The file now references
amd-triton from PyPI directly, no extra index URL needed.

Co-Authored-By: Claude Opus 4 <[email protected]>
Replace requirements-triton.txt with inline ROCm version detection
in setup.py and CI script. Uninstall all conflicting triton packages
(triton, pytorch-triton, pytorch-triton-rocm, triton-rocm, amd-triton)
before installing amd-triton with the correct --extra-index-url based
on the detected ROCm version.

Co-Authored-By: Claude Opus 4 <[email protected]>
Add ROCm version detection and amd-triton installation to atom-test,
vllm_benchmark, and sglang_downstream workflows before pip install -e .
Wrap amd-triton install in setup.py with try/except to avoid build
failure in PEP 517 isolated environments where pip is unavailable.

Co-Authored-By: Claude Opus 4 <[email protected]>
Consolidate duplicated ROCm version detection and amd-triton
installation logic into .github/scripts/install_triton.sh. Update
all CI workflows (build_aiter_triton, atom-test, vllm_benchmark,
sglang_downstream) and README to call the shared script.

Co-Authored-By: Claude Opus 4 <[email protected]>
Replace inline ROCm version detection and amd-triton install code
in setup.py with a call to the shared install_triton.sh script.

Co-Authored-By: Claude Opus 4 <[email protected]>
…nstall amd-triton in aiter-test CI

- Move _get_compiled into torch_compile/__init__.py so all test files
  import from a single location
- Add FILE_TIMES for the 10 torch_compile tests to split_tests.sh
- Add Install amd-triton step in aiter-test.yaml for standard and
  multi-gpu test jobs

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant