Skip to content

[ROCm] Skip matmul dtype overload accuracy tests on MI200 (gfx90a) - #186098

Closed
amdfaa wants to merge 3 commits into
pytorch:mainfrom
amdfaa:skip-mi200-matmul-accuracy
Closed

amdfaa wants to merge 3 commits into
pytorch:mainfrom
amdfaa:skip-mi200-matmul-accuracy

Conversation

@amdfaa

@amdfaa amdfaa commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extend the hipBLAS/hipBLASLt accuracy SkipTest gate in test_mm_bmm_dtype_overload and test_addmm_baddmm_dtype_overload so MI200 (gfx90a) also skips the known-bad bf16/fp16 shape cases, not only ROCm versions before 7.2.1. MI210 on HIP 7.2.x still fails bf16 N=1 GEMM accuracy after PR #175868 narrowed the skip to _get_torch_rocm_version() < (7, 2, 1).

Test plan

Validated on MI200 (gfx90a / MI210) in linux-jammy-rocm-py3.10-mi200 / test (default, …, linux.rocm.gpu.mi210.1):

Results:

  • The targeted test_mm_bmm_dtype_overload* and test_addmm_baddmm_dtype_overload* accuracy cases are now SKIPPED on MI200 (previously failing), with skip message accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes.
  • test_matmul_cuda: 1594 collected, 0 failures / 0 errors; 92 targeted dtype-overload cases skipped.
  • The skip is scoped to the intended bad shapes only (0 out-of-scope skips, 0 missed matching cases); CUDA and non-MI200 ROCm arches are unaffected.
  • The remaining red ROCm shards are unrelated pre-existing failures, not caused by this PR: inductor/test_torchinductor_opinfo.py::TestInductorOpInfoCUDA::test_comprehensive_addmm_cuda_float16, inductor/test_fused_attention.py::SDPAPatternRewriterGpuTests::test_sdpa_rewriter_1_gpu, and inductor/test_flex_attention.py::TestLearnableBiasesCUDA::test_comparison_vs_sdpa_with_learnable_bias_cuda.

Evidence (XML test report)

The per-test SKIPPED verdict is recorded in the XML test report; the console log only shows the file-level test_matmul_cuda 1/1 was successful.

XML artifact (run 26899002259 / shard 1 job 79352276629):

  • https://gha-artifacts.s3.amazonaws.com/pytorch/pytorch/26899002259/1/artifact/test-reports-test-default-1-6-linux.rocm.gpu.mi210.1_79352276629.zip
  • inner path: test-reports/python-pytest/test_matmul_cuda/test_matmul_cuda-edec47fe7df60a0f.xml

Verbatim skip elements:

<testcase classname="TestMatmulCudaCUDA" name="test_mm_bmm_dtype_overload_bfloat16_M_1_N_1_K_32_batch_size_1_backend_cublas_cuda" time="0.002" file="test_matmul_cuda.py"><skipped type="pytest.skip" message="accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes">/var/lib/jenkins/workspace/test/test_matmul_cuda.py:892: accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes</skipped></testcase>
<testcase classname="TestMatmulCudaCUDA" name="test_addmm_baddmm_dtype_overload_bfloat16_M_1_N_1_K_32_batch_size_1_broadcast_self_False_high_precision_self_False_backend_cublaslt_cuda" time="0.002" file="test_matmul_cuda.py"><skipped type="pytest.skip" message="accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes">/var/lib/jenkins/workspace/test/test_matmul_cuda.py:959: accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes</skipped></testcase>

Made with Cursor

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

PR pytorch#175868 limited hipBLAS/hipBLASLt accuracy skips to ROCm < 7.2.1, so
MI210 (gfx90a) on HIP 7.2.x still runs bf16 N=1 GEMM cases that fail.
Also skip those shapes when isRocmArchAnyOf(MI200_ARCH).

Made with Cursor
@pytorch-bot

pytorch-bot Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 43 Pending

As of commit 76e09ef with merge base f87543d (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/b200 ciflow/h100 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 topic: not user facing topic category labels Jun 3, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

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

@amdfaa amdfaa changed the title Skip matmul dtype overload accuracy tests on MI200 (gfx90a) [ROCm] Skip matmul dtype overload accuracy tests on MI200 (gfx90a) Jun 3, 2026
@pytorch-bot pytorch-bot Bot added the module: rocm AMD GPU support for Pytorch label Jun 3, 2026
@jithunnair-amd jithunnair-amd added ciflow/trunk Trigger trunk jobs on your pull request ciflow/rocm-mi200 Trigger "default" config CI on ROCm MI200 labels Jun 3, 2026
MI200 default CI jobs run in trunk-rocm-sandbox, which only had
workflow_dispatch and schedule triggers. Add a temporary push tag
trigger for ciflow/trunk/* so applying ciflow/trunk on the PR runs
those jobs. Remove this block after validation.

Made with Cursor
@amdfaa
amdfaa requested a review from a team as a code owner June 3, 2026 16:37
Reverts the temporary push-tag (ciflow/trunk/*) trigger added to
.github/workflows/trunk-rocm-sandbox.yml, restoring it to match main.
The intended change in this PR is only the MI200 skip gate in
test/test_matmul_cuda.py.

Made with Cursor
@pragupta

pragupta commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "CI validated run is in the description"

@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

gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…ytorch#186098)

## Summary
Extend the hipBLAS/hipBLASLt accuracy `SkipTest` gate in `test_mm_bmm_dtype_overload` and `test_addmm_baddmm_dtype_overload` so MI200 (gfx90a) also skips the known-bad bf16/fp16 shape cases, not only ROCm versions before 7.2.1. MI210 on HIP 7.2.x still fails bf16 N=1 GEMM accuracy after PR pytorch#175868 narrowed the skip to `_get_torch_rocm_version() < (7, 2, 1)`.

## Test plan
Validated on MI200 (gfx90a / MI210) in `linux-jammy-rocm-py3.10-mi200 / test (default, …, linux.rocm.gpu.mi210.1)`:
- Run: https://github.com/pytorch/pytorch/actions/runs/26899002259
- Job (shard 1/6, where `test_matmul_cuda` runs): https://github.com/pytorch/pytorch/actions/runs/26899002259/job/79352276629

Results:
- The targeted `test_mm_bmm_dtype_overload*` and `test_addmm_baddmm_dtype_overload*` accuracy cases are now **SKIPPED** on MI200 (previously failing), with skip message `accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes`.
- `test_matmul_cuda`: 1594 collected, **0 failures / 0 errors**; **92 targeted dtype-overload cases skipped**.
- The skip is scoped to the intended bad shapes only (0 out-of-scope skips, 0 missed matching cases); CUDA and non-MI200 ROCm arches are unaffected.
- The remaining red ROCm shards are unrelated pre-existing failures, not caused by this PR: `inductor/test_torchinductor_opinfo.py::TestInductorOpInfoCUDA::test_comprehensive_addmm_cuda_float16`, `inductor/test_fused_attention.py::SDPAPatternRewriterGpuTests::test_sdpa_rewriter_1_gpu`, and `inductor/test_flex_attention.py::TestLearnableBiasesCUDA::test_comparison_vs_sdpa_with_learnable_bias_cuda`.

### Evidence (XML test report)
The per-test SKIPPED verdict is recorded in the XML test report; the console log only shows the file-level `test_matmul_cuda 1/1 was successful`.

XML artifact (run 26899002259 / shard 1 job 79352276629):
- `https://gha-artifacts.s3.amazonaws.com/pytorch/pytorch/26899002259/1/artifact/test-reports-test-default-1-6-linux.rocm.gpu.mi210.1_79352276629.zip`
- inner path: `test-reports/python-pytest/test_matmul_cuda/test_matmul_cuda-edec47fe7df60a0f.xml`

Verbatim skip elements:
```xml
<testcase classname="TestMatmulCudaCUDA" name="test_mm_bmm_dtype_overload_bfloat16_M_1_N_1_K_32_batch_size_1_backend_cublas_cuda" time="0.002" file="test_matmul_cuda.py"><skipped type="pytest.skip" message="accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes">/var/lib/jenkins/workspace/test/test_matmul_cuda.py:892: accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes</skipped></testcase>
```
```xml
<testcase classname="TestMatmulCudaCUDA" name="test_addmm_baddmm_dtype_overload_bfloat16_M_1_N_1_K_32_batch_size_1_broadcast_self_False_high_precision_self_False_backend_cublaslt_cuda" time="0.002" file="test_matmul_cuda.py"><skipped type="pytest.skip" message="accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes">/var/lib/jenkins/workspace/test/test_matmul_cuda.py:959: accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes</skipped></testcase>
```

Made with Cursor

Pull Request resolved: pytorch#186098
Approved by: https://github.com/jeffdaily
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…ytorch#186098)

## Summary
Extend the hipBLAS/hipBLASLt accuracy `SkipTest` gate in `test_mm_bmm_dtype_overload` and `test_addmm_baddmm_dtype_overload` so MI200 (gfx90a) also skips the known-bad bf16/fp16 shape cases, not only ROCm versions before 7.2.1. MI210 on HIP 7.2.x still fails bf16 N=1 GEMM accuracy after PR pytorch#175868 narrowed the skip to `_get_torch_rocm_version() < (7, 2, 1)`.

## Test plan
Validated on MI200 (gfx90a / MI210) in `linux-jammy-rocm-py3.10-mi200 / test (default, …, linux.rocm.gpu.mi210.1)`:
- Run: https://github.com/pytorch/pytorch/actions/runs/26899002259
- Job (shard 1/6, where `test_matmul_cuda` runs): https://github.com/pytorch/pytorch/actions/runs/26899002259/job/79352276629

Results:
- The targeted `test_mm_bmm_dtype_overload*` and `test_addmm_baddmm_dtype_overload*` accuracy cases are now **SKIPPED** on MI200 (previously failing), with skip message `accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes`.
- `test_matmul_cuda`: 1594 collected, **0 failures / 0 errors**; **92 targeted dtype-overload cases skipped**.
- The skip is scoped to the intended bad shapes only (0 out-of-scope skips, 0 missed matching cases); CUDA and non-MI200 ROCm arches are unaffected.
- The remaining red ROCm shards are unrelated pre-existing failures, not caused by this PR: `inductor/test_torchinductor_opinfo.py::TestInductorOpInfoCUDA::test_comprehensive_addmm_cuda_float16`, `inductor/test_fused_attention.py::SDPAPatternRewriterGpuTests::test_sdpa_rewriter_1_gpu`, and `inductor/test_flex_attention.py::TestLearnableBiasesCUDA::test_comparison_vs_sdpa_with_learnable_bias_cuda`.

### Evidence (XML test report)
The per-test SKIPPED verdict is recorded in the XML test report; the console log only shows the file-level `test_matmul_cuda 1/1 was successful`.

XML artifact (run 26899002259 / shard 1 job 79352276629):
- `https://gha-artifacts.s3.amazonaws.com/pytorch/pytorch/26899002259/1/artifact/test-reports-test-default-1-6-linux.rocm.gpu.mi210.1_79352276629.zip`
- inner path: `test-reports/python-pytest/test_matmul_cuda/test_matmul_cuda-edec47fe7df60a0f.xml`

Verbatim skip elements:
```xml
<testcase classname="TestMatmulCudaCUDA" name="test_mm_bmm_dtype_overload_bfloat16_M_1_N_1_K_32_batch_size_1_backend_cublas_cuda" time="0.002" file="test_matmul_cuda.py"><skipped type="pytest.skip" message="accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes">/var/lib/jenkins/workspace/test/test_matmul_cuda.py:892: accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes</skipped></testcase>
```
```xml
<testcase classname="TestMatmulCudaCUDA" name="test_addmm_baddmm_dtype_overload_bfloat16_M_1_N_1_K_32_batch_size_1_broadcast_self_False_high_precision_self_False_backend_cublaslt_cuda" time="0.002" file="test_matmul_cuda.py"><skipped type="pytest.skip" message="accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes">/var/lib/jenkins/workspace/test/test_matmul_cuda.py:959: accuracy regression in hipblas and hipblaslt in ROCm 7.0 for certain shapes</skipped></testcase>
```

Made with Cursor

Pull Request resolved: pytorch#186098
Approved by: https://github.com/jeffdaily
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/trunk Trigger trunk jobs on your pull request Merged module: rocm AMD GPU support for Pytorch open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants