← Back to Pull requests

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

Closed
unknown closed this pull request without merging on Oct 28, 2026 13:05 UTC
View on GitHub
unknown unknown commented on Oct 15, 2026 23:46 UTC
Author

Human Written Summary


For PyTorch 2.14, this PR updates Triton 3.8 -> 3.9. In order to bump Triton, we need the block-pointer API cherry-pick from upstream PyTorch: https://github.com/pytorch/pytorch/pull/191007

The reason we are bumping Triton to 3.9 is two-fold:

  • Support for gfx1250-strict target

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

  • Backport pytorch/pytorch#191007 so config.triton.use_block_ptr=True gracefully falls back when Triton no longer exposes tl.make_block_ptr / tl.advance.

  • Advance the ROCm Triton pin from 669b31acc1dd1b3fd93286afd5db67f65d9f7557 (3.8.0) to fc8d31a5439ec9842557a284dc7ca61aee69246b (3.9.0).

  • Keep the existing ROCm/triton installer source.
  • Limited Validation on MI450

  • Cherry-picked upstream squash commit 7b45c7a09bf79ec4e2826d324714c523147c0e75 with -x; no conflicts.

  • git diff --check and Python syntax checks passed.

  • PyTorch Lintrunner RUFF, FLAKE8, and PYFMT passed on all 12 backported Python files.

  • Verified origin/release/internal/3.9.x and upstream/release/3.9.x are exactly aligned at fc8d31a5439.

  • Built and installed Triton 3.9.0 from that revision.

  • Built and installed PyTorch 2.14.0+git4dd22ff for ROCm/gfx1250.

  • GPU elementwise and FP16 matmul smoke tests passed.

  • End-to-end fallback check with use_block_ptr=True emitted no tl.make_block_ptr, produced the one-time FutureWarning, and matched reference numerics.

  • A gfx1250 tensor-descriptor reduction that previously failed in Triton's AMD PassManager compiled and executed successfully with Triton 3.9.
  • Validation on MI300

    Validation covered the seven nightly core Inductor suites on four idle AMD Instinct MI308X (gfx942) GPUs.

    Overall Result

  • Included exact nodes: 11,655; pending: 0; intentional exclusions: 0.

  • Final outcomes: 8,711 passed, 2,846 skipped, 96 xfailed, 2 failed, 0 errors, 0 timed out, and 0 missed.

  • Non-failing rate: 99.98% = (8,711 passed + 2,846 skipped + 96 xfailed) / 11,655.

  • Unresolved rate: 0.02% = (2 failed + 0 errors + 0 timed out + 0 missed) / 11,655.

  • The primary pass used a 300-second per-test timeout and produced eight timeouts. Approved targeted reruns used 600- and 1,200-second limits with zero automatic retries; all eight subsequently passed. The final results below use the latest rerun outcome for those nodes.
  • 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 |
    |---|---|---:|---:|---:|---:|---:|---:|---:|---:|
    | 🟡 P2 | test/inductor/test_torchinductor.py | 1,564 | 1,293 | 269 | 1 | 1 | 0 | 0 | 0 |
    | | test/inductor/test_flex_attention.py | 867 | 800 | 66 | 1 | 0 | 0 | 0 | 0 |
    | 🟡 P2 | test/inductor/test_max_autotune.py | 694 | 474 | 219 | 0 | 1 | 0 | 0 | 0 |
    | | test/inductor/test_aot_inductor.py | 1,416 | 825 | 591 | 0 | 0 | 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,847 | 1,710 | 1,078 | 59 | 0 | 0 | 0 | 0 |
    | | test/inductor/test_torchinductor_opinfo.py | 3,697 | 3,055 | 609 | 33 | 0 | 0 | 0 | 0 |
    | | Included total | 11,655 | 8,711 | 2,846 | 96 | 2 | 0 | 0 | 0 |

    Environment

  • GPU: four AMD Instinct MI308X GPUs, gfx942.

  • Python: 3.14.4.

  • PyTorch: 2.14.0+rocm10.2.0rc0; native wheel git 1e32fc5029e9d57f6ba5f7f9daf9cfe18d60bf13; HIP 7.17.26413.

  • PR under test: Python files from this PR at 26bdd398f8f968d494ce1c503f77df25973a78c2 were overlaid onto the native wheel; no C++ files changed and no native PyTorch rebuild was performed.

  • Triton: non-editable source build of ROCm Triton 3.9.0 from release/internal/3.9.x at 0a6e13e6e31f18fa75a17ac72dee0dd1bcb507b8.

  • LLVM hashes: b010a18d2b648cab83c83967ff26b8fde11acdc6 (core) and 6bc4aaf6641c56ee104f6200c96a6a571bc77052 (AMD).

  • Execution: continuous four-GPU run with HSA_HOTSWAP_ENABLE=1, zero automatic retries, and fresh run-local Inductor and Triton caches.
  • Notes

    Performed a smoke test to verify that Triton 3.9 can generate code for gfx1250-strict target.

    The complete Lintrunner invocation also reports pre-existing release-branch PYREFLY, CODEOWNERS taxonomy, and can_use_tma() docstring findings. The cherry-pick does not modify the reported can_use_tma() function.

    Diff: 588 lines (+441 / -147) across 7 files Reviewer: pruthvistony Review duration: 18078m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 588 lines diff across 7 files
    0.50
    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%
    56%
    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.382
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3831"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 50.0% (MEDIUM) · Higher = larger blast radius
    50.0%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 21.6% · Safe to merge
    21.6%
    Repository