Skip to content

Re-enabling Origami for all ROCm versions and updating rocm_origami version pin to 0.0.3 - #201122

Closed
umechand-amd wants to merge 8 commits into
pytorch:mainfrom
ROCm:enable_rocm_origami
Closed

umechand-amd wants to merge 8 commits into
pytorch:mainfrom
ROCm:enable_rocm_origami

Conversation

@umechand-amd

@umechand-amd umechand-amd commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR re-enables origami for all Rocm versions and pins rocm-origami pypi package version to 0.0.3

Before submitting, please review:

Go through the following checklist

  • Passes lint (spin fixlint)
  • Added/updated tests
  • Updated documentation (if applicable)
  • Included benchmark results (for PRs impacting perf)

Linked issue or supporting maintainer

Supported by @jeffdaily

Summary (human written only)

rocm-origami 0.0.2 does not match the origami library API in ROCm 10.0+, so #193843 disabled origami on ROCm >= 10.0. This PR pins rocm-origami to 0.0.3, which matches it, and replaces the ROCm version cutoff with a package-version gate: on ROCm >= 10.0, origami is used only when the installed rocm-origami is >= 0.0.3 (an older or unparsable version logs a warning and disables origami). TestOrigamiPackageVersionGate covers the gate, and TestOrigami skips when the gate has disabled origami.

Validated on MI300X (ROCm 10.1) with rocm-origami 0.0.3 (origami active, all tests pass) and 0.0.2 (gate disables origami, TestOrigami skips). Note that .ci/docker/ci_commit_pins/rocm-origami.txt rebuilds the CI images, so this should merge only after #202390.

Tests and Benchmarks.

After re-enabling origami, gemm kernel latency was within the 5% tolerance compared to max-autotune for all shapes in the unit test and compilation time was
image

image

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @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 Oct 15, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 4096fde with merge base 109544c (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot Bot added ciflow/docker ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests module: inductor module: rocm AMD GPU support for Pytorch release notes: releng release notes category labels Oct 15, 2026
@pytorch-bot

pytorch-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@pytorch-bot

pytorch-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:

  • ciflow/inductor
  • ciflow/torchtitan
  • ciflow/docker

Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows.

@jithunnair-amd jithunnair-amd added ciflow/trunk Trigger trunk jobs on your pull request ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/periodic-rocm-mi300 Trigger "distributed" config CI on ROCm MI300/MI325 ciflow/inductor-rocm-mi300 Trigger "inductor" config CI on ROCm MI300/MI325 ciflow/inductor-perf-test-nightly-rocm-mi350 Trigger inductor perf tests on ROCm MI350 ciflow/inductor-perf-test-nightly-rocm-mi300 Trigger inductor perf tests on ROCm MI300 keep-going Don't stop on first failure, keep running tests until the end ci-no-td Do not run TD on this PR labels Oct 25, 2026
@jithunnair-amd

Copy link
Copy Markdown
Collaborator

@claude Analyze CI failures, check if the failures are related to the code changes in the PR, be thorough.

@claude

claude Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Claude finished @jithunnair-amd's task in 2m 5s —— View job


None of the CI failures are related to this PR. It only changes Python code under torch/_inductor/ and test/inductor/test_origami.py, plus the Docker pin, and every failure is either already failing on trunk/merge base or a C++/toolchain problem in code the PR doesn't touch.

Per-job analysis

What the PR changes

  • .ci/docker/ci_commit_pins/rocm-origami.txt: pin moves from 0.0.2 to 0.0.3, which rebuilds the ROCm Docker image.
  • torch/_inductor/heuristics/template/triton.py: removes the ROCm < 10.0 gate. _origami_enabled() is now checked at call time in MMTemplateConfigMixin.
  • torch/_inductor/config.py: removes one comment line.
  • test/inductor/test_origami.py: removes the ROCm-version skip logic.

All of this only runs on ROCm, and only when max_autotune and rocm.origami are both on. No C++ changes.

Failures

Job Error Related? Why
pull / linux-noble-xpu-n-py3.11 / build libsycl.so: undefined reference to urKernelSetArg*@LIBUR_LOADER_0.12 → ld returned 1 ❌ No Linker mismatch between oneAPI 2026.1 libsycl and the Unified Runtime loader in the XPU image. It's an XPU toolchain/image problem; the PR touches no XPU code and no C++. Dr. CI lists it as "new" only because it didn't match a trunk failure. A retry or rebase should clear it once the XPU image is fixed on trunk.
pull / linux-jammy-aarch64-py3.11-clang21 / build qembeddingbag.cpp:222: function 'embedding_neon_kernel' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] ❌ No A clang21 -Werror warning in aten/src/ATen/native/quantized/cpu/qembeddingbag.cpp, a CPU/aarch64 C++ file the PR doesn't touch. Dr. CI couldn't classify it because the job didn't run on the merge base. (I couldn't download this log; the error is taken from the Dr. CI summary.)
rocm-mi300 / test (default, 4, 8) TestLinalgSVDCUDA::test_svd_scaled_entries_scale_1000000000000_0_cuda_complex64, Tensor-likes are not close (512/512 mismatched) ❌ No Eager torch.linalg.svd test, so no Inductor and no origami involved. The test was added in the merge base commit 7b3bd95 (#200776, "[MPS] Prescale Jacobi SVD by the largest entry"), and ROCm can't pass it yet.
trunk / rocm-py3.11-mi350 / test (default, 1, 8) test_svd_scaled_entries_scale_1000000000000_0_cuda_{float32,complex64}, FAILED CONSISTENTLY ❌ No Same new SVD test. Dr. CI shows it failing on the merge base (broken trunk).
trunk / rocm-py3.11-mi350 / test (default, 8, 8) test_svd_scaled_entries_scale_1e-12_cuda_{float32,complex64}, FAILED CONSISTENTLY ❌ No Same, broken trunk.
torchtitan-test / torchtitan_features_integration ImportError: pyarrow requires NumPy 2.0 or newer, found 1.26.4 ❌ No Dependency mismatch in the torchtitan environment. Also fails on the merge base.
trunk / macos-py3-arm64 / test (mps) Cancelled ❌ No Infra cancellation. Retry it.

test_origami.py doesn't check the new pin in default CI

inductor/test_origami ran on the mi350 shard and was reported as successful, but its 9 tests finished in about 4 seconds (0.07 min). The main TestOrigami class is skipped unless TORCHINDUCTOR_MAX_AUTOTUNE=1 TORCHINDUCTOR_ORIGAMI=1 are set (test/inductor/test_origami.py:71-74), and the default shards don't set them. So that "success" doesn't show that rocm-origami==0.0.3 works or that origami selects configs correctly on the new image.

To actually validate the PR, check that run:

  • Look at the inductor-rocm / inductor-perf-test-nightly-rocm-* jobs, which are labeled on this PR, or the test/test-reports/inductor.test_origami_*.log artifact. Make sure the TestOrigami cases were executed, not skipped.
  • Make sure the rebuilt ubuntu-rocm image (from ciflow/docker) actually has rocm-origami==0.0.3 installed. Otherwise HAS_ORIGAMI is False and everything skips without any error.

Small cleanup

ORIGAMI_ROCM_SUPPORTED = IS_ROCM (test/inductor/test_origami.py:36) and its skipIf (lines 66-69) now duplicate the IS_ROCM skip on line 65. You could remove them.

Recommendation

Nothing here needs a code change to unblock the PR. Rebase onto viable/strict to pick up any fixes for the SVD and torchtitan breakages, then retry the XPU build and the cancelled MPS job.

@jithunnair-amd

Copy link
Copy Markdown
Collaborator

@claude Analyze CI failures

@claude

claude Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Claude finished @jithunnair-amd's task in 46s —— View job


The new head (3605bf4f) has no CI failures because no CI has run on it yet: all 4 workflows are waiting for maintainer approval. However, the new commit breaks the DO_PERF_TEST skip on the perf test, and that will show up as slow or unexpected runs once CI does run.

Details

CI status for 3605bf4f

Workflow Conclusion
pull action_required (awaiting approval)
Lint action_required
BC Lint action_required
docs-build action_required

None of these ran, so there are no failures to analyze. The failures in the earlier analysis were on the previous head (d4953a6c) and were all unrelated to this PR: XPU linker, aarch64 clang21 -Werror, the SVD test from the merge base, and torchtitan's pyarrow/NumPy mismatch. Someone with write access needs to approve the workflows, along with the ciflow/* labels, before there's anything new to triage.

Bug in the new commit: the perf-test skip moved to the wrong method

In test/inductor/test_origami.py:228-248, the new _benchmark_median helper was inserted between the @unittest.skipIf(not DO_PERF_TEST, ...) decorator and test_origami_runtime_matches_regular_max_autotune. As a result:

  • The decorator now wraps _benchmark_median, and the test method has no DO_PERF_TEST guard at all.
  • When DO_PERF_TEST is unset but the class is enabled (TORCHINDUCTOR_MAX_AUTOTUNE=1 TORCHINDUCTOR_ORIGAMI=1, origami installed), the test runs. It does the full origami and max-autotune compiles for all 12 cases (mm/addmm/bmm × 8192/16384 × topk 5/10). Only then does the first _benchmark_median call raise SkipTest. The test is reported as "skipped", but only after the expensive autotuning work, which can cause timeouts on the inductor-rocm shards.
  • The log message at lines 21-25 says the test "will be skipped", which is now misleading.

Fix: move the decorator back onto test_origami_runtime_matches_regular_max_autotune and leave _benchmark_median undecorated. Placing the helper above the decorator is enough:

    def _benchmark_median(self, compiled, args):
        ...

    @unittest.skipIf(
        not DO_PERF_TEST,
        "Perf test not enabled; set DO_PERF_TEST=1 to enable runtime perf benchmarks",
    )
    def test_origami_runtime_matches_regular_max_autotune(self):

Fix this →

Nits

  • The _benchmark_median docstring contains a non-ASCII ±. The repo asks for ASCII only in new comments, so use +/-.
  • Move import statistics to the top of the module.
  • The commit also removes ORIGAMI_ROCM_SUPPORTED and its skipIf, which addresses the cleanup suggested in the earlier analysis. It leaves two blank lines after IS_ROCM = that lint may flag.

Still open from the earlier analysis

Default CI shards don't set TORCHINDUCTOR_MAX_AUTOTUNE=1 TORCHINDUCTOR_ORIGAMI=1, so TestOrigami is skipped there. Once CI runs, check that the rebuilt ROCm image has rocm-origami==0.0.3 installed and that the TestOrigami cases actually executed in some job (for example inductor-rocm or the perf-nightly jobs) rather than being skipped.

@jeffdaily jeffdaily left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My agent came up with this analysis, but I've read and approved it.

  1. test/inductor/test_origami.py: _benchmark_median was inserted between the @unittest.skipIf(not DO_PERF_TEST, ...) decorator and test_origami_runtime_matches_regular_max_autotune, so the decorator now guards the helper and the test has no guard. .ci/pytorch/test.sh runs test_origami on ROCm shard 1 with TORCHINDUCTOR_MAX_AUTOTUNE=1 TORCHINDUCTOR_ORIGAMI=1, so every ROCm inductor run will do all 12 origami and full max-autotune compiles at 8192/16384 before the first _benchmark_median call raises SkipTest. Move the helper above the decorator, and move import statistics to module level.
  2. Removing the ROCm version gate outright reopens the failure #193843 guarded against. config.rocm.origami defaults to on, the selection calls (origami.OrigamiMatmulSelector, select_topk_configs, select_grid_size) have no fallback, and rocm-origami==0.0.2 is still on PyPI, so anyone on ROCm 10+ with 0.0.2 installed hits the API mismatch under max_autotune. Please gate on the installed package instead: on ROCm >= 10.0 require importlib.metadata.version("rocm-origami") >= 0.0.3, otherwise warn once and leave origami = None. Also say in the description which ROCm versions 0.0.3 was tested with; CI only covers ROCm 10.1, and the title says all versions.
  3. The config.rocm.origami comment in torch/_inductor/config.py still says toggling via config.patch has no effect, but the new _origami_enabled() checks make config.patch({"rocm.origami": False}) disable origami at call time. Update the comment to say patching to False works and patching to True does not.

@jithunnair-amd

Copy link
Copy Markdown
Collaborator

@claude Analyze CI failures, see if the failures are related to the code changes in the PR, be thorough

@claude

claude Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Claude finished @jithunnair-amd's task in 1m 34s —— View job


No, none of the remaining CI failures on 6ef95ae3 come from this PR's code. All CI has finished, and every ROCm/origami job passed: inductor-rocm-mi300, inductor-rocm-mi200, both inductor-perf-nightly-rocm runs (mi300, mi350), the mi350 inductor shards, Lint and docker-builds. The new inductor_amx failures are the same pytest INTERNALERROR crash already seen on the CUDA cpp_wrapper jobs. The tests pass, then pytest crashes while writing its report. The most likely trigger is the Docker image rebuild that this PR's .ci/docker/ pin change sets off, not the origami code.

Per-job analysis

Pytest reporting crash in the rebuilt images (indirect, not origami code)

Affected jobs:

  • inductor-cpu-test / inductor_amx shards 3, 6, 7 (CPU, AMX)
  • inductor-test-cuda132 / inductor_cpp_wrapper 1/2 and 2/2 (A10G)
  • inductor-test-cuda132 / inductor_distributed
  • inductor_aoti_fallback 1/2 and 2/2 (already marked unstable)

All of these fail the same way. Across the three amx logs there are 1786 FAILED CONSISTENTLY lines and 5367 INTERNALERROR> KeyError lines:

INTERNALERROR>   File "/__w/pytorch/pytorch/test/conftest.py", line 252, in pytest_runtest_logreport
INTERNALERROR>     super().pytest_runtest_logreport(report)
INTERNALERROR>   File ".../_pytest/junitxml.py", ... in finalize
INTERNALERROR> KeyError: (NodeId(...), None)

The runner reports platform linux -- Python 3.11.18, pytest-9.2.0, pluggy-1.7.0, but .ci/docker/requirements-ci.txt:193 pins pytest==7.3.2. The LogXML subclass in test/conftest.py doesn't work with pytest 9's junitxml keys. Each crash ends with exit code 3, so the rerun step marks the test as failing consistently.

Why it shows up on this PR:

  • Not the PR's code. Origami is ROCm-only and gated on torch.version.hip, so it can't run on CPU-AMX or A10G jobs. The PR doesn't touch conftest.py, opinfo, gradients or AOTI.
  • Probably a side effect of the PR. Changing .ci/docker/ci_commit_pins/rocm-origami.txt changes the docker content hash, so every image gets rebuilt from scratch with the latest versions of unpinned dependencies. One candidate is pytest-rerunfailures>=10.3, which is unpinned. Another dependency could also be pulling pytest up to 9.x. I haven't confirmed this from the image build log. Trunk still runs on its older cached images, which would explain why Dr. CI lists these as "new".
  • What to do. Fix it outside this PR: either pin whatever pulls in pytest 9, or make conftest.py work with pytest 9. Any other PR that touches .ci/docker/ would probably hit the same crash. A maintainer can treat these failures as infra for this PR.

Unrelated, already on trunk or infra

Job Error Why unrelated
rocm-mi300 / default 1/8 TestLinalgSVDCUDA::test_svd_scaled_entries_scale_{1e12,1e-12}_cuda_{float32,complex64} FAILED CONSISTENTLY (4 tests) Eager SVD test added in merge base #200776. It also fails on trunk (mi350 7/8, broken trunk). No inductor involved.
trunk / rocm-mi350 / default 7/8 Same SVD test Broken trunk
rocm-mi300 / default 5/8, periodic-rocm-mi300 / distributed 4/5, win-vs2022-cpu-py3 / default 2/12 No failed step or log (runner lost) Infra flaky
pull / linux-noble-xpu-n-py3.11 / build libsycl.so: undefined reference to urKernelSetArg*@LIBUR_LOADER_0.12 oneAPI/Unified Runtime mismatch in the XPU image, possibly also exposed by the image rebuild. The PR has no XPU or C++ changes.
pull / linux-jammy-aarch64-py3.11-clang21 / build qembeddingbag.cpp:222 ... [-Werror,-Wunneeded-internal-declaration] aarch64 C++ warning treated as an error. The PR has no C++ changes.
torchtitan_features_integration pyarrow requires NumPy 2.0 or newer, found 1.26.4 Also fails on the merge base
trunk / macos mps Cancelled Retry it

Conclusion

Nothing in this PR's code needs to change. The pytest 9 INTERNALERROR failures are a CI-image problem that this PR exposes by forcing a docker rebuild. Either fix that separately (pin pytest's transitive puller or update conftest.py) or have a maintainer override those failures as infra.

@umechand-amd
umechand-amd marked this pull request as ready for review October 28, 2026 16:06
@umechand-amd

Copy link
Copy Markdown
Contributor Author

My agent came up with this analysis, but I've read and approved it.

  1. test/inductor/test_origami.py: _benchmark_median was inserted between the @unittest.skipIf(not DO_PERF_TEST, ...) decorator and test_origami_runtime_matches_regular_max_autotune, so the decorator now guards the helper and the test has no guard. .ci/pytorch/test.sh runs test_origami on ROCm shard 1 with TORCHINDUCTOR_MAX_AUTOTUNE=1 TORCHINDUCTOR_ORIGAMI=1, so every ROCm inductor run will do all 12 origami and full max-autotune compiles at 8192/16384 before the first _benchmark_median call raises SkipTest. Move the helper above the decorator, and move import statistics to module level.
  2. Removing the ROCm version gate outright reopens the failure Disabling Origami for ROCm 10.0 and above. #193843 guarded against. config.rocm.origami defaults to on, the selection calls (origami.OrigamiMatmulSelector, select_topk_configs, select_grid_size) have no fallback, and rocm-origami==0.0.2 is still on PyPI, so anyone on ROCm 10+ with 0.0.2 installed hits the API mismatch under max_autotune. Please gate on the installed package instead: on ROCm >= 10.0 require importlib.metadata.version("rocm-origami") >= 0.0.3, otherwise warn once and leave origami = None. Also say in the description which ROCm versions 0.0.3 was tested with; CI only covers ROCm 10.1, and the title says all versions.
  3. The config.rocm.origami comment in torch/_inductor/config.py still says toggling via config.patch has no effect, but the new _origami_enabled() checks make config.patch({"rocm.origami": False}) disable origami at call time. Update the comment to say patching to False works and patching to True does not.

pushed a commit to address all three of these.

The ROCm >= 10.0 gate parsed the rocm-origami version with int() per
component, so a pre-release such as 0.0.4rc1 raised ValueError, which
neither except clause caught, and importing the template heuristics
failed whenever ROCm, max_autotune and origami were all on. Move the
check into _origami_package_supported(), compare with the vendored
packaging Version (an unparsable version disables origami), take the
ROCm version from _rocm_version_tuple(), and unit test the helper.

Test Plan:
```
python test/inductor/test_origami.py -k TestOrigamiPackageVersionGate
```

Authored with Claude.
@jeffdaily

Copy link
Copy Markdown
Collaborator

Before this merges: the .ci/docker/ci_commit_pins/rocm-origami.txt change rebuilds every CI image, the rebuilt images pick up pytest 9.2.0, and that crashes the test shards with INTERNALERROR (the CUDA failures here, and the reason #197576 was auto-reverted this morning). Please hold the merge until #202390 lands. I'm also pushing a small commit for the remaining version-gate nits once it passes validation.

TestOrigami was gated on `import origami` succeeding, so with an
installed rocm-origami that the ROCm >= 10.0 gate rejects (0.0.2 on
ROCm 10.1), the heuristic ran with origami off and six subtests failed
instead of skipping. Skip the class when the heuristics module has
origami set to None even though the package imports and both config
flags are on.

Test Plan: on MI300X with ROCm 10.1, rocm-origami 0.0.2 (TestOrigami
skips) and 0.0.3 (TestOrigami runs and passes).
```
TORCHINDUCTOR_MAX_AUTOTUNE=1 TORCHINDUCTOR_ORIGAMI=1 python test/inductor/test_origami.py -v
```

Authored with Claude.

@jeffdaily jeffdaily left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with my two commits on top: the package-version gate now parses with packaging and has a unit test, and TestOrigami skips when the gate disables origami (validated on MI300X with ROCm 10.1 and rocm-origami 0.0.2 and 0.0.3). I updated the description to match. Please hold the merge until #202390 lands.

@jeffdaily

Copy link
Copy Markdown
Collaborator

Update: #202385 pins pytest==9.1.1 in the inductor-benchmarks images, which works around the pytest 9.2.0 INTERNALERROR, so this no longer has to wait for #202390. I merged viable/strict (109544c, which includes #202385) into this branch so the images this PR rebuilds pick up the pin.

@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 83 checks: Lint / workflow-checks / lint, Lint / toc / lint, Lint / Test tools / lint, Lint / quick-checks / lint, Lint / Link checks / lint-urls / lint, Lint / Link checks / lint-xrefs / lint, Lint / lintrunner-clang-all / lint, Lint / lintrunner-pyrefly-all / lint, Lint / lintrunner-noclang-all / lint, pull / dynamo-cpython-build / build, pull / linux-jammy-aarch64-py3.11-clang21 / build, pull / linux-jammy-py3.14t-clang21 / build, pull / linux-jammy-py3.11-clang21-asan / build, pull / linux-jammy-rocm-py3.11 / build, pull / linux-jammy-aarch64-py3.11 / build, pull / linux-jammy-py3.11-clang21 / build, pull / linux-jammy-py3.11-gcc11 / build, pull / linux-jammy-cuda13.2-cudnn9-py3.11-clang20 / build, pull / linux-jammy-py3.11-gcc11-mobile-lightweight-dispatch-build / build, pull / linux-jammy-py3.14-clang21 / build, pull / linux-jammy-py3.11-gcc11-no-ops / build, docs-build / linux-jammy-py3.11-gcc11 / build, .github/workflows/tsan.yml / linux-jammy-py3.14t-clang21-tsan / build, inductor-perf-nightly-rocm-mi350 / linux-jammy-rocm-py3.11-mi350 / build, trunk / dynamo-unittest / dynamo-build (3.15) / build, trunk / dynamo-unittest / dynamo-build (3.11) / build, trunk / dynamo-unittest / dynamo-build (3.13) / build, trunk / dynamo-unittest / dynamo-build (3.12) / build, trunk / linux-jammy-aarch64-py3.11 / build, trunk / linux-jammy-cuda12.6-py3.11-gcc11-sm90-build-only / build, trunk / libtorch-linux-jammy-cuda13.2-py3.11-gcc11-debug / build, trunk / linux-jammy-cuda13.2-py3.11-gcc11-no-ops / build, trunk / linux-jammy-cuda13.2-py3.11-gcc11 / build, trunk / verify-cachebench-cpu-build / build, trunk / linux-jammy-py3.11-gcc11-full-debug-build-only / build, trunk / inductor-build-cuda132 / build, inductor-rocm-mi200 / linux-jammy-rocm-py3.11-mi200 / build, torchtitan-test / torchtitan-x-pytorch-build / build, inductor / inductor-cpu-build / build, inductor / inductor-build-cuda132 / build, inductor / inductor-build-cuda134 / build, inductor / unit-test / inductor-cpu-build / build, inductor / unit-test / inductor-halide-build / build, inductor / unit-test / inductor-build-cuda132 / build, inductor / unit-test / inductor-triton-cpu-build / build, inductor / unit-test / inductor-cpu-core-build (3.12) / build, inductor / unit-test / inductor-cpu-core-build (3.13) / build, inductor / unit-test / inductor-cpu-core-build (3.11) / build, inductor-perf-nightly-rocm-mi300 / linux-jammy-rocm-py3.11-mi300 / build, docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.4-cudnn9-py3-gcc11-..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.15-clang21), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-cudnn9-py3.12-gcc11), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.4-cudnn9-py3-gcc11), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.14-clang21), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda12.6-cudnn9-py3.11-gcc11), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-rocm-n-py3), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.13-clang21), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.14t-clang21), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-cudnn9-py3.12-gcc..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-noble-rocm-preview-py3.11), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.11-clang21), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-tpu-py3.12-pallas), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-cla..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.4-cudnn9-py3.11-cla..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-lin..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.12-halide), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-xpu-n-1-py3), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3-gcc11-inductor-benchma..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-noble-xpu-n-py3-client), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.12-triton-cpu), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-py3.12-pallas), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11-..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-noble-xpu-n-py3-inductor-benchma..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.12-clang21), docker-builds / docker-build (pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13, tcp://buildkitd-arm64.bui..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-linter), docker-builds / docker-build (pytorch-linux-jammy-aarch64-cuda13.2-cudnn9-py3.11-gcc13, tcp://buildkitd-arm64.bui..., docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-rocm-n-py3-benchmarks), docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-noble-riscv64-py3.12-gcc14-cross..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-py3.11-gcc13, tcp://buildkitd-arm64.buildkit:1234, mt-l..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-py3.11-gcc13-inductor-benchmarks, tcp://buildkitd-arm64..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-py3.11-clang21, tcp://buildkitd-arm64.buildkit:1234, mt...

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

@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "docker-build jobs from the ROCm fork build every image but cannot push to the CI image registry, so downstream tests cannot run; last full CI run on this PR was green on ROCm/origami, and the follow-up commits only touch the package-version gate and its test (validated on MI300X)"

@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

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR changes files under .ci/docker/, so the docker-builds builds must all pass before merging, but 34 of them failed, the first few are: docker-builds / docker-build (pytorch-linux-jammy-aarch64-cuda13.2-cudnn9-py3.11-gcc13, tcp://buildkitd-arm64.bui..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13, tcp://buildkitd-arm64.bui..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-py3.11-clang21, tcp://buildkitd-arm64.buildkit:1234, mt..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-py3.11-gcc13, tcp://buildkitd-arm64.buildkit:1234, mt-l..., docker-builds / docker-build (pytorch-linux-jammy-aarch64-py3.11-gcc13-inductor-benchmarks, tcp://buildkitd-arm64.... The docker images could not be built, so trunk jobs would be unable to find them. Please fix the docker build and re-run ciflow/docker before merging.

Details for Dev Infra team

Raised by workflow job

@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 5, 2026
…ersion pin to 0.0.3 (pytorch#201122)

This PR re-enables origami for all Rocm versions and pins rocm-origami pypi package version to 0.0.3

Before submitting, please review:
- [PR lifecycle](https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#pr-lifecycle) in the contributing guide
- [AI-Assisted Development](https://github.com/pytorch/pytorch/blob/main/AI_POLICY.md) policy

Go through the following checklist
- [x] Passes lint (`spin fixlint`)
- [x] Added/updated tests
- [ ] Updated documentation (if applicable)
- [x] Included benchmark results (for PRs impacting perf)

---

## Linked issue or supporting maintainer

<!-- Keep the one line that applies and delete the others. Link an issue labeled "actionable", or name the maintainer who agreed to this change beforehand. PRs with neither will be automatically closed, unless the author has write access to the repo. -->

Supported by @jeffdaily

<!-- If this change breaks backward compatibility, describe the impact and migration path. Otherwise, write "No". -->

## Summary (human written only)

rocm-origami 0.0.2 does not match the origami library API in ROCm 10.0+, so pytorch#193843 disabled origami on ROCm >= 10.0. This PR pins rocm-origami to 0.0.3, which matches it, and replaces the ROCm version cutoff with a package-version gate: on ROCm >= 10.0, origami is used only when the installed rocm-origami is >= 0.0.3 (an older or unparsable version logs a warning and disables origami). `TestOrigamiPackageVersionGate` covers the gate, and `TestOrigami` skips when the gate has disabled origami.

Validated on MI300X (ROCm 10.1) with rocm-origami 0.0.3 (origami active, all tests pass) and 0.0.2 (gate disables origami, `TestOrigami` skips). Note that `.ci/docker/ci_commit_pins/rocm-origami.txt` rebuilds the CI images, so this should merge only after pytorch#202390.

## Tests and Benchmarks.
After re-enabling origami, gemm kernel latency was within the 5% tolerance compared to max-autotune for all shapes in the unit test and compilation time was
<img width="655" height="668" alt="image" src="https://github.com/user-attachments/assets/89b6310b-b22d-46b5-ad23-f2fd2d16df4c" />

<img width="638" height="262" alt="image" src="https://github.com/user-attachments/assets/6e2677a6-27f6-42ff-9646-4f4474f07650" />

Pull Request resolved: pytorch#201122
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <[email protected]>
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 9, 2026
…ersion pin to 0.0.3 (pytorch#201122)

This PR re-enables origami for all Rocm versions and pins rocm-origami pypi package version to 0.0.3

Before submitting, please review:
- [PR lifecycle](https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#pr-lifecycle) in the contributing guide
- [AI-Assisted Development](https://github.com/pytorch/pytorch/blob/main/AI_POLICY.md) policy

Go through the following checklist
- [x] Passes lint (`spin fixlint`)
- [x] Added/updated tests
- [ ] Updated documentation (if applicable)
- [x] Included benchmark results (for PRs impacting perf)

---

## Linked issue or supporting maintainer

<!-- Keep the one line that applies and delete the others. Link an issue labeled "actionable", or name the maintainer who agreed to this change beforehand. PRs with neither will be automatically closed, unless the author has write access to the repo. -->

Supported by @jeffdaily

<!-- If this change breaks backward compatibility, describe the impact and migration path. Otherwise, write "No". -->

## Summary (human written only)

rocm-origami 0.0.2 does not match the origami library API in ROCm 10.0+, so pytorch#193843 disabled origami on ROCm >= 10.0. This PR pins rocm-origami to 0.0.3, which matches it, and replaces the ROCm version cutoff with a package-version gate: on ROCm >= 10.0, origami is used only when the installed rocm-origami is >= 0.0.3 (an older or unparsable version logs a warning and disables origami). `TestOrigamiPackageVersionGate` covers the gate, and `TestOrigami` skips when the gate has disabled origami.

Validated on MI300X (ROCm 10.1) with rocm-origami 0.0.3 (origami active, all tests pass) and 0.0.2 (gate disables origami, `TestOrigami` skips). Note that `.ci/docker/ci_commit_pins/rocm-origami.txt` rebuilds the CI images, so this should merge only after pytorch#202390.

## Tests and Benchmarks.
After re-enabling origami, gemm kernel latency was within the 5% tolerance compared to max-autotune for all shapes in the unit test and compilation time was
<img width="655" height="668" alt="image" src="https://github.com/user-attachments/assets/89b6310b-b22d-46b5-ad23-f2fd2d16df4c" />

<img width="638" height="262" alt="image" src="https://github.com/user-attachments/assets/6e2677a6-27f6-42ff-9646-4f4474f07650" />

Pull Request resolved: pytorch#201122
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-triage-error ci-no-td Do not run TD on this PR ciflow/docker ciflow/inductor ciflow/inductor-perf-test-nightly-rocm-mi300 Trigger inductor perf tests on ROCm MI300 ciflow/inductor-perf-test-nightly-rocm-mi350 Trigger inductor perf tests on ROCm MI350 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-mi350 Trigger "inductor" config CI on ROCm MI350 ciflow/periodic-rocm-mi300 Trigger "distributed" config CI on ROCm MI300/MI325 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request keep-going Don't stop on first failure, keep running tests until the end Merged module: inductor module: rocm AMD GPU support for Pytorch open source release notes: releng release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants