Skip to content

[reland][ROCM][inductor][UT] Enable Inductor-Triton debug asserts on ROCm - #188075

Closed
naromero77amd wants to merge 6 commits into
pytorch:mainfrom
naromero77amd:rocm-enable-hip-triton-debug-assert-part2
Closed

naromero77amd wants to merge 6 commits into
pytorch:mainfrom
naromero77amd:rocm-enable-hip-triton-debug-assert-part2

Conversation

@naromero77amd

@naromero77amd naromero77amd commented Jun 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Context

  • The previous version of this change was reverted because it broke compatibility with Triton versions that predate debug assert support on ROCm.
  • This reland keeps the ROCm path disabled on older Triton builds while preserving the intended behavior on supported Triton versions.
  • This branch cherry-picks the original PR commits with -x and layers the ROCm Triton version guard on top.

Old PR

Made with Cursor

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @pragupta @jerrymannil @xinyazhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben

@pytorch-bot

pytorch-bot Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/188075

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 6 Unrelated Failures, 1 Unclassified Failure

As of commit d2dc2a4 with merge base 2831009 (image):

NEW FAILURE - The following job has failed:

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

  • inductor-rocm-mi200 / linux-jammy-rocm-py3.10-mi200 / test (inductor, 1, 2, linux.rocm.gpu.mi210.1) (gh) (this job did not run on the merge base, so DrCI cannot tell whether the failure is pre-existing)
    test/test_modules.py::TestModuleCUDA::test_cpu_gpu_parity_nn_LinearCrossEntropyLoss_cuda_float16

    AI verdict: AI verdict: related (uncertain)

    The PR enables Triton debug asserts on ROCm (removes the is_hip guard), which changes how Triton compiles kernels on ROCm MI200. The test runs with PYTORCH_TEST_WITH_INDUCTOR=1, meaning LinearCrossEntropyLoss backward goes through Triton-compiled kernels. The debug compilation flag likely changes code generation enough to alter float16 rounding behavior, causing 1/480 gradient elements to exceed tolerance.

    Full reasoning on HUD →

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added ci-no-td Do not run TD on this PR ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests module: inductor module: rocm AMD GPU support for Pytorch labels Jun 24, 2026
@naromero77amd naromero77amd added ciflow/inductor-rocm-mi200 Trigger "inductor" config CI on ROCm MI200 ciflow/inductor-rocm-mi300 Trigger "inductor" config CI on ROCm MI300/MI325 ciflow/inductor-rocm-mi355 Trigger "inductor" config CI on ROCm MI355 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 labels Jun 24, 2026
@naromero77amd
naromero77amd requested a review from ezyang June 24, 2026 16:28
@naromero77amd naromero77amd added ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners ciflow/trunk Trigger trunk jobs on your pull request labels Jun 24, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning: Unknown label ciflow/inductor-rocm-mi355.
Currently recognized labels are

  • ciflow/b200
  • ciflow/b200-distributed
  • ciflow/b200-symm-mem
  • ciflow/binaries
  • ciflow/binaries_libtorch
  • ciflow/binaries_wheel
  • ciflow/docker
  • ciflow/dtensor
  • ciflow/dynamo
  • ciflow/h100
  • ciflow/h100-cutlass-backend
  • ciflow/h100-distributed
  • ciflow/h100-symm-mem
  • ciflow/inductor
  • ciflow/inductor-cu126
  • ciflow/inductor-micro-benchmark
  • ciflow/inductor-micro-benchmark-cpu-x86
  • ciflow/inductor-pallas
  • ciflow/inductor-perf-compare
  • ciflow/inductor-perf-test-nightly-rocm-mi300
  • ciflow/inductor-perf-test-nightly-rocm-mi350
  • ciflow/inductor-perf-test-nightly-x86-zen
  • ciflow/inductor-perf-test-nightly-xpu
  • ciflow/inductor-periodic
  • ciflow/inductor-rocm-mi200
  • ciflow/inductor-rocm-mi300
  • ciflow/mps
  • ciflow/nightly
  • ciflow/op-benchmark
  • ciflow/periodic
  • ciflow/periodic-rocm-mi200
  • ciflow/periodic-rocm-mi300
  • ciflow/pull
  • ciflow/riscv64
  • ciflow/rocm-mi200
  • ciflow/rocm-mi300
  • ciflow/rocm-navi31
  • ciflow/rocm-nightly
  • ciflow/s390
  • ciflow/slow
  • ciflow/slow-rocm-mi200
  • ciflow/torchtitan
  • ciflow/triton_binaries
  • ciflow/trunk
  • ciflow/tsan
  • ciflow/unstable
  • ciflow/vllm
  • ciflow/win-arm64
  • ciflow/xpu

Please add the new label to .github/pytorch-probot.yml

@pytorch-bot

pytorch-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning: Unknown label ciflow/rocm-mi355.
Currently recognized labels are

  • ciflow/b200
  • ciflow/b200-distributed
  • ciflow/b200-symm-mem
  • ciflow/binaries
  • ciflow/binaries_libtorch
  • ciflow/binaries_wheel
  • ciflow/docker
  • ciflow/dtensor
  • ciflow/dynamo
  • ciflow/h100
  • ciflow/h100-cutlass-backend
  • ciflow/h100-distributed
  • ciflow/h100-symm-mem
  • ciflow/inductor
  • ciflow/inductor-cu126
  • ciflow/inductor-micro-benchmark
  • ciflow/inductor-micro-benchmark-cpu-x86
  • ciflow/inductor-pallas
  • ciflow/inductor-perf-compare
  • ciflow/inductor-perf-test-nightly-rocm-mi300
  • ciflow/inductor-perf-test-nightly-rocm-mi350
  • ciflow/inductor-perf-test-nightly-x86-zen
  • ciflow/inductor-perf-test-nightly-xpu
  • ciflow/inductor-periodic
  • ciflow/inductor-rocm-mi200
  • ciflow/inductor-rocm-mi300
  • ciflow/mps
  • ciflow/nightly
  • ciflow/op-benchmark
  • ciflow/periodic
  • ciflow/periodic-rocm-mi200
  • ciflow/periodic-rocm-mi300
  • ciflow/pull
  • ciflow/riscv64
  • ciflow/rocm-mi200
  • ciflow/rocm-mi300
  • ciflow/rocm-navi31
  • ciflow/rocm-nightly
  • ciflow/s390
  • ciflow/slow
  • ciflow/slow-rocm-mi200
  • ciflow/torchtitan
  • ciflow/triton_binaries
  • ciflow/trunk
  • ciflow/tsan
  • ciflow/unstable
  • ciflow/vllm
  • ciflow/win-arm64
  • ciflow/xpu

Please add the new label to .github/pytorch-probot.yml

@naromero77amd naromero77amd changed the title [ROCM][inductor][UT] Reland HIP Triton debug asserts with Triton 3.7 guard [releand] [ROCM][inductor][UT] Enable Inductor-Triton debug asserts on ROCm Jun 24, 2026
@naromero77amd
naromero77amd force-pushed the rocm-enable-hip-triton-debug-assert-part2 branch from ad0ff57 to 8dc80e6 Compare June 24, 2026 16:41
@naromero77amd naromero77amd changed the title [releand] [ROCM][inductor][UT] Enable Inductor-Triton debug asserts on ROCm [reland][ROCM][inductor][UT] Enable Inductor-Triton debug asserts on ROCm Jun 24, 2026
@naromero77amd

Copy link
Copy Markdown
Collaborator Author

@claude Search through the CI logs under trunk for ROCm. Please verify that this test ran and PASSED: test_after_aot_cpu_runtime_error

@claude

claude Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Claude finished @naromero77amd's task in 4m 7s —— View job


Verification: test_after_aot_cpu_runtime_error on ROCm CI

  • Locate ROCm trunk CI workflow runs for this PR
  • Find the job(s) running the minifier isolate test suite
  • Search logs for test_after_aot_cpu_runtime_error
  • Report PASS/FAIL/SKIP status

Result: ✅ The test file ran and passed (no skip on the CPU test for ROCm)

test_after_aot_cpu_runtime_error lives in inductor/test_minifier_isolate.py, which runs in the default test config (not inductor). I traced it through the ROCm CI for commit 8dc80e6:

  • Workflow: rocm-mi300 — run 28114386830, conclusion success
  • Job: linux-noble-rocm-py3.12-mi300 / test (default, 1, 6, linux.rocm.gpu.gfx942.1) (job 83281670392), conclusion success

Log evidence from that job:

Executing [... 'inductor/test_minifier_isolate.py', '--shard-id=1', '--num-shards=1',
  '-v', '-vv', '-rfEX', '-p', 'no:xdist', '--use-pytest', '-x', '--reruns=2', ...]
inductor/test_minifier_isolate 1/1 was successful, full logs can be found in artifacts with path
  test/test-reports/inductor.test_minifier_isolate_1.1_49407e29aeb717e0_.log
Finished inductor/test_minifier_isolate 1/1 ... took 0.12min

Why this confirms the test passed:

  • The file is run via pytest with -x (fail-fast). If test_after_aot_cpu_runtime_error had failed, the file would have stopped and been marked failed — it was marked successful.
  • test_after_aot_cpu_runtime_error (test/inductor/test_minifier_isolate.py:45) is only skipped on Jetson and Windows — it has no ROCm skip, so it executes on the linux-noble-rocm-py3.12-mi300 runner. (Only the GPU variant, test_after_aot_gpu_runtime_error, carries @skipIfRocmWithoutDebugAsserts.)
  • Note: the sys.version_info < (3, 11) guard in the file's __main__ block does not apply here, because CI collects the tests via --use-pytest rather than the __main__ entry point.

Caveat

The GitHub Actions step log reports results at file granularity ("was successful"); the per-test PASSED/SKIPPED line for the individual test name is written to the uploaded artifact inductor.test_minifier_isolate_1.1_49407e29aeb717e0_.log, which is not part of the console step log I can read here. Based on the fail-fast file-level success plus the absence of any ROCm skip on this test, test_after_aot_cpu_runtime_error ran and passed on ROCm.
· rocm-mi300 workflow run

@naromero77amd
naromero77amd marked this pull request as ready for review June 25, 2026 14:42
@meta-codesync

meta-codesync Bot commented Jun 25, 2026

Copy link
Copy Markdown

@ezyang has imported this pull request. If you are a Meta employee, you can view this in D109728458.

@ezyang ezyang added the mergedog mergedog is watching this PR label Jun 25, 2026
pytorchmergebot and others added 3 commits June 26, 2026 21:47
Keep the ROCm debug-assert path enabled only when running with Triton 3.7 or newer, which is the first version that carries the required upstream support. Gate the minifier test the same way so older ROCm Triton builds stay compatible.

Co-authored-by: Cursor <[email protected]>
Clarify why the HIP Triton debug-assert path is gated on Triton 3.7+ so the ROCm compatibility behavior is easier to follow. Also keep the helper call formatted the way lintrunner expects.

Co-authored-by: Cursor <[email protected]>
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased rocm-enable-hip-triton-debug-assert-part2 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout rocm-enable-hip-triton-debug-assert-part2 && git pull --rebase)

Clean merge with origin/main; no conflicts.
@naromero77amd

Copy link
Copy Markdown
Collaborator Author

@claude compare the CI logs in the latest run for this PR with the CI logs from this other PR that doesn't contain the commit with my changes
#188307

@claude

claude Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Claude finished @naromero77amd's task in 7m 37s —— View job


CI comparison: this PR (#188075) vs #188307

I could not directly pull #188307's logs. In this job the gh CLI, git fetch, and WebFetch are all blocked (no network/approval), and the CI tool I do have (github_ci) is scoped to this PR only. So I cannot fetch the other PR's job logs to lay them side-by-side. What I can do is fully characterize this PR's latest failures and give you the technical read on causation — and tell you exactly what to grab from #188307 to close the loop. See the end for how to unblock me.


This PR's latest run (commit d2dc2a4)

Two real ROCm failures, both on MI200 (inductor-rocm-mi200, run 28273432469):

1. shard 1/2 (job 83777455248) — float16 numeric mismatch (NOT a flake)

test_modules.py::TestModuleCUDA::test_cpu_gpu_parity_nn_LinearCrossEntropyLoss_cuda_float16 FAILED
AssertionError: Tensor-likes are not close!
Mismatched elements: 1 / 480 (0.2%)
Greatest absolute difference: 0.125 at index (1, 2) (up to 0.04 allowed)
Greatest relative difference: 0.5  at index (1, 2) (up to 0.3  allowed)

Runs under PYTORCH_TEST_WITH_INDUCTOR=1. It reproduces on every rerun (RERUN -> RERUN -> FAILED, identical numbers), so it is a deterministic tolerance failure, not flakiness.

2. shard 2/2 (job 83777455253) — 270-min job timeout

inductor/test_torchinductor_opinfo 2/8 ... took 19.15min
Running inductor/test_torchinductor_opinfo 4/8 ...
##[error]The action 'Test' has timed out after 270 minutes.

This is one long serial shard: test_modules -> test_ops (11 sub-shards) -> test_ops_gradients -> test_torch -> test_aot_inductor (7) -> test_torchinductor_opinfo (~19 min each). It cleared everything and died partway into opinfo. No single hang — it just ran out the 270-min budget.

Not implicated: MI300 (rocm-mi300 green; inductor-rocm-mi300 shard 1 flagged infra-flaky by DrCI, shard 2 green). The x86 inductor_timm/inductor_torchbench failures are DrCI-classified flaky/broken-trunk (present on the merge base), unrelated to ROCm.


Causation read (revised from my earlier comment)

I want to correct an over-attribution from my 2026-06-26 analysis of the pre-rebase run.

This PR's only functional change is _should_enable_triton_debug_asserts (torch/_inductor/runtime/triton_heuristics.py:123), which flips compile_meta["debug"] = True for every ROCm kernel on Triton >= 3.7. Triton's debug flag enables device-side assertion lowering (tl.device_assert, indirect-indexing/bounds checks) and debug line info — it does not change the floating-point compute path of a kernel.

  • The LinearCrossEntropyLoss_cuda_float16 mismatch is therefore unlikely to be caused by this PR. Debug asserts don't perturb FP16 rounding by 0.125. This op was added very recently (linear_cross_entropy commits 29ac613/0a8f331) and the failure looks like a tight-tolerance issue for a new op on MI200 gfx90a. DrCI's "the debug flag changes float16 rounding" verdict is, mechanistically, weak. This is exactly the kind of failure that [DO NOT MERGE][TEST] A/B baseline for ROCm Inductor debug assert CI timing #188307 (same base, no debug commit) should also show if it's pre-existing.
  • The 270-min MI200 timeout is the one plausibly attributable to this PR: enabling debug asserts adds compile-time + some runtime overhead on every kernel, which can tip an already near-budget serial shard over 270 min. But it could equally be a pre-existing capacity problem on that shard. Only the comparison decides it.

So the whole question genuinely reduces to: does #188307 also fail LinearCrossEntropyLoss_cuda_float16 and/or time out on inductor-rocm-mi200 shard 2/2?


To unblock the direct comparison

Pick either:

  1. Allow me network/CLI access (e.g. add gh/WebFetch to --allowedTools), then re-trigger me and I'll pull [DO NOT MERGE][TEST] A/B baseline for ROCm Inductor debug assert CI timing #188307's logs directly; or
  2. Paste here the inductor-rocm-mi200 workflow run ID (and the two test (inductor, 1/2 & 2/2) job IDs) from [DO NOT MERGE][TEST] A/B baseline for ROCm Inductor debug assert CI timing #188307. With raw job IDs my github_ci tool can download those logs even without gh, and I'll do the line-by-line comparison.

· branch rocm-enable-hip-triton-debug-assert-part2

naromero77amd added a commit to naromero77amd/pytorch that referenced this pull request Jun 29, 2026
This empty commit refreshes the no-code-change baseline to the current merge base of pytorch#188075 so ROCm Inductor CI runtime can be compared directly.

Co-authored-by: Cursor <[email protected]>
@naromero77amd

Copy link
Copy Markdown
Collaborator Author

@claude Do we have any timeouts in the latest CI logs?

@claude

claude Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Claude finished @naromero77amd's task in 1m 42s —— View job


Timeouts in the latest CI logs

  • Pull CI status for latest commit (d2dc2a4)
  • Inspect failing jobs for timeouts
  • Report which timeouts are present

Yes — there is one timeout.

inductor-rocm-mi200 / test (inductor, 2, 2) (job 83777455253) hit the 270-minute job-level timeout:

Running inductor/test_torchinductor_opinfo 2/8 ... took 19.15min
Running inductor/test_torchinductor_opinfo 4/8 ...
##[error]The action 'Test' has timed out after 270 minutes.

Important distinction from my 2026-06-26 analysis: this is a slow-grind job timeout, not a single-test hang. The log shows steady forward progress the whole way — test_modules (16.7 / 10.4 / 8.8 min) -> test_ops (all 11 sub-shards, ~14-17 min each) -> test_ops_gradients -> test_torch -> test_aot_inductor -> then test_torchinductor_opinfo at ~19 min per shard. It cleared opinfo 2/8 and died partway into 4/8. There is no returning 124 / >30min per-file watchdog kill in this log (that watchdog hang was on mi350 in the pre-rebase run; mi350 is not in the latest run). So this is the serial shard simply running out the 270-min budget, not an op deadlocking.

The other failures are NOT timeouts

  • inductor-rocm-mi200 / test (inductor, 1, 2) (job 83777455248) — exit code 1, not a timeout. This is the deterministic test_cpu_gpu_parity_nn_LinearCrossEntropyLoss_cuda_float16 numeric mismatch (1/480 elements, reproduces on every rerun).
  • inductor-rocm-mi300 / test (inductor, 1, 2) (job 83778057887) — DrCI flagged this infra-flaky (no failing log); not a timeout. mi300 shard 2/2 and rocm-mi300 are both green.
  • The x86 inductor failures (inductor_timm, inductor_torchbench, test_shape_env_reuse) are DrCI-classified flaky / broken-trunk (present on the merge base), unrelated.

Read on the one timeout

The 270-min mi200 timeout is the same failure mode as before the rebase and is the one plausibly attributable to this PR: enabling compile_meta["debug"] = True for every ROCm Triton kernel (Triton >= 3.7) adds per-kernel compile overhead, and opinfo (the heaviest compile suite) is exactly where a near-budget serial shard tips over 270 min. But it could equally be a pre-existing capacity problem on that one serial shard — note it spent ~2 hours just in test_modules/test_ops/test_torch before even reaching inductor opinfo. The decisive evidence is still the comparison you asked about earlier: if #188307 (same base, no debug commit) also times out on inductor-rocm-mi200 shard 2/2, the timeout is pre-existing; if #188307 is green there, the overhead from this PR is tipping it over. If you paste the inductor-rocm-mi200 job IDs from #188307 I can do that line-by-line comparison directly.
· branch rocm-enable-hip-triton-debug-assert-part2

@naromero77amd

Copy link
Copy Markdown
Collaborator Author

After comparing this PR against the no-code-change baseline PR #188307 at the same merge base, I don't see evidence that this PR is causing ROCm Inductor timeouts or an appreciable test-time regression.

A few notes from the ROCm Inductor shards:

  • The clean comparable shards do not show a slowdown from this PR. For example, MI350 shard 2 was faster on this PR (191.1m) than on the baseline (254.3m), and MI300 shard 2 was also slightly faster (184.3m vs 190.8m).
  • MI350 shard 1 succeeded on this PR in 207.5m, while the baseline hit the 270.2m test timeout.
  • MI200 shard 1 failed early on both runs with only about a +1m Test-step delta on this PR, which is not meaningful.
  • MI200 shard 2 is not a valid timing comparison: this PR ran until the normal 270.2m Test timeout, but the baseline job was marked cancelled after about 59.8m while still running tests. So the raw +210m delta there means the baseline was cut short, not that this PR made the shard 210 minutes slower.

So my read is: there is no clear evidence from this A/B run that the changes in this PR are causing the ROCm Inductor timeouts. The timeout-looking data is either present on the baseline too, or not directly comparable due to cancellation/infrastructure behavior.

@naromero77amd

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@naromero77amd

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -f 'Unrelated failures'

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@ezyang ezyang removed the mergedog mergedog is watching this PR label Jul 6, 2026
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
…ROCm (pytorch#188075)

## Summary
- Reland the ROCm Inductor-Triton debug assert enablement from pytorch#186422.
- Guard the HIP path on Triton 3.7+, which is the first Triton release with the required debug assert support.
- Gate the ROCm minifier test on the same Triton version check and add a focused heuristic unit test for the guard.

## Context
- The previous version of this change was reverted because it broke compatibility with Triton versions that predate debug assert support on ROCm.
- This reland keeps the ROCm path disabled on older Triton builds while preserving the intended behavior on supported Triton versions.
- This branch cherry-picks the original PR commits with `-x` and layers the ROCm Triton version guard on top.

## Old PR
- Previous attempt: pytorch#186422

Made with [Cursor](https://cursor.com)

Pull Request resolved: pytorch#188075
Approved by: https://github.com/ezyang, https://github.com/jansel

Co-authored-by: Cursor <[email protected]>
Co-authored-by: PyTorch MergeBot <[email protected]>
Co-authored-by: Edward Z. Yang via mergedog <[email protected]>
@naromero77amd
naromero77amd deleted the rocm-enable-hip-triton-debug-assert-part2 branch July 17, 2026 18:00
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…ROCm (pytorch#188075)

## Summary
- Reland the ROCm Inductor-Triton debug assert enablement from pytorch#186422.
- Guard the HIP path on Triton 3.7+, which is the first Triton release with the required debug assert support.
- Gate the ROCm minifier test on the same Triton version check and add a focused heuristic unit test for the guard.

## Context
- The previous version of this change was reverted because it broke compatibility with Triton versions that predate debug assert support on ROCm.
- This reland keeps the ROCm path disabled on older Triton builds while preserving the intended behavior on supported Triton versions.
- This branch cherry-picks the original PR commits with `-x` and layers the ROCm Triton version guard on top.

## Old PR
- Previous attempt: pytorch#186422

Made with [Cursor](https://cursor.com)

Pull Request resolved: pytorch#188075
Approved by: https://github.com/ezyang, https://github.com/jansel

Co-authored-by: Cursor <[email protected]>
Co-authored-by: PyTorch MergeBot <[email protected]>
Co-authored-by: Edward Z. Yang via mergedog <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/inductor ciflow/inductor-rocm-mi200 Trigger "inductor" config CI on ROCm MI200 ciflow/inductor-rocm-mi300 Trigger "inductor" config CI on ROCm MI300/MI325 ciflow/inductor-rocm-mi355 Trigger "inductor" config CI on ROCm MI355 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request mergedX1 module: inductor module: rocm AMD GPU support for Pytorch open source release notes: inductor topic: bug fixes topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants