← Back to Pull requests

[release/2.13] Update ROCm Triton to 3.9 and backport Triton block-pointer API gate #3870

Closed
unknown closed this pull request without merging on Oct 28, 2026 13:05 UTC
View on GitHub
unknown unknown commented on Oct 26, 2026 22:56 UTC
Author

Human Written Summary


For PyTorch 2.13, this PR updates Triton 3.8 -> 3.9. In order to bump Triton, it backports the block-pointer API compatibility gate carried by #3831 and originating from upstream PyTorch: https://github.com/pytorch/pytorch/pull/191007

The reason for bumping Triton to 3.9 is two-fold:

  • Support for the gfx1250-strict target.

  • Improved support for kernels that use the TensorDescriptor mechanism to invoke TDM.
  • Summary

  • Backport the block-pointer API gate so config.triton.use_block_ptr=True gracefully falls back when Triton no longer exposes tl.make_block_ptr / tl.advance.

  • Advance the release/2.13 ROCm Triton pin from a3c5afb73ecd9e70046a983a8dd18fd676a30438 (3.8.0) to 0a6e13e6e31f18fa75a17ac72dee0dd1bcb507b8 (3.9.0).

  • Keep the existing ROCm/triton installer source.
  • Backport note

    The cherry-pick had one test-only conflict: the test_cuda_repro.py test decorated by the source change does not exist on release/2.13. That nonexistent test was left absent, and its now-unused imports were removed. All production changes applied automatically; the resulting deltas in all 11 shared files exactly match the source commit.

    Validation on MI300

    Validated the seven ROCm Triton nightly-core Inductor suites on four AMD Instinct MI308X (gfx942) GPUs.

    Overall Result

  • Coverage: 10,519 / 10,519 exact nodes; no exclusions or missed nodes.

  • Final outcomes: 8,241 passed, 2,163 skipped, 112 xfailed, 3 failed, 0 errors, and 0 timed out.

  • Final non-failing rate: 99.97%.

  • The primary pass used a 300-second per-test timeout and zero retries. All eight primary timeout outcomes passed when rerun once with a 1,200-second limit and zero retries.

  • The three remaining failures are P2: one test_max_autotune.py case and two test_aot_inductor.py cases.

  • Post-run HIP smoke checks passed on all four GPUs.
  • Final Suite Results

    🔴 P1 = TIMED OUT or MISSED; 🟡 P2 = FAILED or ERROR. A suite inherits its highest current priority. All timeout reruns passed, so no final P1 suite remains.

    | Priority | Test suite | Total | Passed | Skipped | Xfailed | Failed | Error | Timed out | Missed |
    |---|---|---:|---:|---:|---:|---:|---:|---:|---:|
    | | test/inductor/test_torchinductor.py | 1,373 | 1,298 | 74 | 1 | 0 | 0 | 0 | 0 |
    | | test/inductor/test_flex_attention.py | 800 | 793 | 6 | 1 | 0 | 0 | 0 | 0 |
    | 🟡 P2 | test/inductor/test_max_autotune.py | 577 | 419 | 157 | 0 | 1 | 0 | 0 | 0 |
    | 🟡 P2 | test/inductor/test_aot_inductor.py | 1,028 | 494 | 532 | 0 | 2 | 0 | 0 | 0 |
    | | test/inductor/test_flex_decoding.py | 570 | 554 | 14 | 2 | 0 | 0 | 0 | 0 |
    | | test/inductor/test_torchinductor_codegen_dynamic_shapes.py | 2,482 | 1,653 | 770 | 59 | 0 | 0 | 0 | 0 |
    | | test/inductor/test_torchinductor_opinfo.py | 3,689 | 3,030 | 610 | 49 | 0 | 0 | 0 | 0 |
    | | Total | 10,519 | 8,241 | 2,163 | 112 | 3 | 0 | 0 | 0 |

    Environment

  • GPU: four AMD Instinct MI308X GPUs (gfx942).

  • Python: 3.14.4.

  • PyTorch: 2.13.0+rocm10.2.0rc0; native base commit 75aea545823b36593391c6ea27b4b5e9313a5d0f; validation/test checkout a2d8297132ebb030983a226875c2000b48eb0545.

  • Revision note: after validation, this PR was rebased to c3f7d541a73f7f0e842220f8d10e54d1cbb0a4f0. Both PR commits have stable patch IDs identical to the validated commits, but the base advanced; the campaign was not rerun after that rebase.

  • PR installation: the six changed production Python modules were installed over the prebuilt PyTorch package; this PR patch changes no C++/native files, so PyTorch was not rebuilt.

  • ROCm/HIP: ROCm package 10.2.0rc0; torch.version.hip 7.17.26413.

  • Triton: 3.9.0, installed non-editably from ROCm/triton branch release/internal/3.9.x at 0a6e13e6e31f18fa75a17ac72dee0dd1bcb507b8.

  • LLVM revisions: core b010a18d2b648cab83c83967ff26b8fde11acdc6; AMD 6bc4aaf6641c56ee104f6200c96a6a571bc77052.

  • Execution: four GPUs, continuous run, zero retries, isolated fresh Inductor/Triton caches.
  • Notes

    Similar to this PR:
    https://github.com/ROCm/pytorch/pull/3831

    Diff: 527 lines (+395 / -132) across 6 files Reviewer: pruthvistony Review duration: 2289m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 527 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.375
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3870"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.8% (MEDIUM) · Higher = larger blast radius
    47.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%
    Repository