Skip to content

[ROCm][UT] Run TunableOp TF32 and fp16 subnormal tests on RDNA - #197361

Closed
lstojilj-amd wants to merge 3 commits into
pytorch:mainfrom
lstojilj-amd:rocm-ut-navi-widen-runonrocmarch-tunableop-fp16
Closed

lstojilj-amd wants to merge 3 commits into
pytorch:mainfrom
lstojilj-amd:rocm-ut-navi-widen-runonrocmarch-tunableop-fp16

Conversation

@lstojilj-amd

@lstojilj-amd lstojilj-amd commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

test_tf32_tunableop and test_tf32_offline_tunableop were enabled for all
ROCm architectures in #183474, which removed both @runOnRocmArch(MI300_ARCH)
decorators along with the now-unused import. #183586 re-added them while
extracting CUDA-only tests into TestLinalgCUDA. git blame attributes both
current decorators to that refactor rather than to any deliberate
re-restriction, so this appears to be an accidental regression. This PR
restores the state #183474 landed.

While in the same area, this also widens @runOnRocmArch(MI200_ARCH) on
test_fp16_backward_preserves_subnormals_rocm, added for MI200 in #183766.
RDNA is excluded there only by omission from the allowlist, and the test
passes on RDNA.

Part of #196583.

Validation

Repeated runs on gfx1100 (Radeon PRO W7900), gfx1151 and gfx1200, HIP
7.16.26320, with identical results every time.

test/test_linalg.py::TestLinalgCudaOnlyCUDA::test_tf32_tunableop_cuda_float32 PASSED
test/test_linalg.py::TestLinalgCudaOnlyCUDA::test_tf32_offline_tunableop_cuda_float32 PASSED
test/test_matmul_cuda.py::TestMatmulCudaCUDA::test_fp16_backward_preserves_subnormals_rocm_batched_False_backend_cublas_cuda PASSED
test/test_matmul_cuda.py::TestMatmulCudaCUDA::test_fp16_backward_preserves_subnormals_rocm_batched_False_backend_cublaslt_cuda PASSED
test/test_matmul_cuda.py::TestMatmulCudaCUDA::test_fp16_backward_preserves_subnormals_rocm_batched_True_backend_cublas_cuda PASSED
test/test_matmul_cuda.py::TestMatmulCudaCUDA::test_fp16_backward_preserves_subnormals_rocm_batched_True_backend_cublaslt_cuda PASSED

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

@pytorch-bot

pytorch-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit ec5d647 with merge base aca1d2b (image):

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

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

@pytorch-bot pytorch-bot Bot added ciflow/b200 ciflow/h100 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 module: rocm AMD GPU support for Pytorch topic: not user facing topic category labels Sep 16, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: lstojilj-amd / name: Lazar Stojiljkovic (8d275cb)

@pytorch-bot

pytorch-bot Bot commented Sep 16, 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 Sep 16, 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/rocm-mi300
  • ciflow/h100
  • ciflow/b200

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.

1 similar comment
@pytorch-bot

pytorch-bot Bot commented Sep 16, 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/rocm-mi300
  • ciflow/h100
  • ciflow/b200

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.

@k-artem

k-artem commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

LGTM

@lstojilj-amd
lstojilj-amd marked this pull request as ready for review September 17, 2026 13:46
@liangel-02 liangel-02 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 17, 2026
@lstojilj-amd

Copy link
Copy Markdown
Contributor Author

/easycla

…l tests

runOnRocmArch is an allowlist: on ROCm the test runs only on the listed gfx
archs. Widening it to NAVI still leaves gfx90a/gfx950 (TF32 TunableOp) and
gfx942/gfx950 (subnormals) skipped, although nothing in these tests is
arch-specific: the TunableOp tests check that a TF32 GEMM entry is recorded and
rocBLAS did not win, and the subnormal test checks a numerical property that
should hold on every arch. pytorch#183474 removed the TunableOp decorators outright for
the same reason, which is what this PR's description says it restores.

Remove all three decorators so the tests run on every ROCm arch (CUDA is
unaffected; runOnRocmArch was a no-op there), and drop the runOnRocmArch and
MI300_ARCH imports that are now unused in test_linalg.py.

Test Plan:
On MI355X (gfx950, ROCm 10.0), an arch these tests previously skipped:

```
python -m pytest test/test_linalg.py test/test_matmul_cuda.py -k "test_tf32_tunableop or test_tf32_offline_tunableop or test_fp16_backward_preserves_subnormals_rocm"
lintrunner --take RUFF,FLAKE8,PYFMT test/test_linalg.py test/test_matmul_cuda.py
```

6 passed.

Authored with Claude.
@jeffdaily jeffdaily added ciflow/rocm-mi200 Trigger "default" config CI on ROCm MI200 ciflow/rocm-rx7900 Trigger "default" config CI on ROCm RX7900 Radeon (Navi31/gfx1100) GPUs and removed ciflow/h100 ciflow/b200 labels Sep 25, 2026
@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 28, 2026
@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

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-noble-rocm-py3.11-mi350 / test (default, 7, 8, amd-dpx-linux.rocm.gpu.gfx950.1)

Details for Dev Infra team Raised by workflow job

@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 2 checks: trunk / linux-noble-rocm-py3.11-mi350 / test (distributed, 3, 3, amd-dpx-linux.rocm.gpu.gfx950.2), trunk / linux-noble-rocm-py3.11-mi350 / test (default, 7, 8, amd-dpx-linux.rocm.gpu.gfx950.1)

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

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

Labels

ciflow/b200 ciflow/h100 ciflow/rocm-mi200 Trigger "default" config CI on ROCm MI200 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-rx7900 Trigger "default" config CI on ROCm RX7900 Radeon (Navi31/gfx1100) GPUs ciflow/trunk Trigger trunk jobs on your pull request Merged module: rocm AMD GPU support for Pytorch open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants