Skip to content

triton: Add version 3.9.0 - #4895

Open
luhenry wants to merge 4 commits into
mainfrom
triton
Open

luhenry wants to merge 4 commits into
mainfrom
triton

Conversation

@luhenry

@luhenry luhenry commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Builds Triton's Python-AST-to-TTIR frontend against a CPU/riscv64 codegen backend (triton-shared's TTIR->Linalg lowering, then Buddy Compiler's Linalg->LLVM-MLIR lowering, then LLVM llc), replacing upstream's NVIDIA/AMD-only codegen. Upstream triton-lang/triton has no riscv64 target at all (gotcha 41).

Reuses triton-riscv's own scripts/release.sh directly instead of reimplementing its build.

Differs from upstream

  • Builds the triton-riscv fork, not triton-lang/triton directly - upstream has no riscv64 codegen to build.
  • LLVM and Buddy Compiler come from buddy-mlir's prebuilt riscv64 release tarballs, not a from-source LLVM build.

Matrix: single cp312-abi3 manylinux build; the stable-ABI build covers 3.12+, and buddy-mlir publishes no riscv64-musl toolchain release to build musllinux from.

Testing

  • Installs this registry's own riscv64 torch wheel and runs a vector-add kernel, checked against torch's own CPU result.

License: MIT (triton, triton-shared). The wheel also bundles Apache-2.0-WITH-LLVM-exception LLVM tools and Apache-2.0 buddy-mlir tools (opt, llc, buddy-*), stripped binaries from triton-riscv's own prebuilt release.

Upstream triton-lang/triton is GPU-only with no riscv64 target (gotcha
41, not-feasible). This builds the RuyiAI-Stack/triton-riscv fork
instead, which replaces the NVIDIA/AMD codegen with a CPU/riscv64
backend (triton-shared -> Buddy Compiler -> LLVM llc) against prebuilt
riscv64 LLVM/buddy-mlir toolchains, and reuses that fork's own
scripts/release.sh directly rather than reimplementing its build.
luhenry added a commit that referenced this pull request Nov 16, 2026
uv pip install only honors UV_* env vars, never PIP_* - PIP_EXTRA_INDEX_URL
silently no-ops, so uv only ever saw public PyPI (no riscv64 torch there)
and never consulted this registry at all (gotcha 244). Confirmed from this
PR's own CI run 43873735422/job 133321388047: the wheel build itself
succeeded, only the torch install in the test step failed, with uv's error
citing only PyPI's own non-riscv64 torch releases.

Rename to UV_EXTRA_INDEX_URL and add UV_INDEX_STRATEGY: unsafe-best-match
so uv actually queries this registry and picks its riscv64 wheel over
PyPI's incompatible ones, matching the pattern used by ~90 other
build-*.yml workflows in this repo.
Real riscv64 CI: the first successful build of this PR (run 43873735422)
took the whole wheel-build step close to 7h end to end. A rerun of the
exact same commit (run 43947463976) hit the previous 360-minute
(6h) cap, cancelled mid-build - pip's own 'Building editable for triton:
still running...' heartbeat printed continuously right up to the timeout,
so the build was never hung, just genuinely this slow (and apparently
somewhat variable) on this hardware. The original 360 was a guess from
upstream's x86_64 CI timing, not this fleet's own riscv64 numbers.

600 gives real headroom above the observed ~7h without masking an actual
hang, which would still show up as a timeout well past that.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant