Skip to content

[ROCm][CI] remove relaxed tolerance for tf32 tests - #166478

Closed
pragupta wants to merge 4 commits into
pytorch:mainfrom
ROCm:rocm_remove_tf32_relaxed_tol
Closed

pragupta wants to merge 4 commits into
pytorch:mainfrom
ROCm:rocm_remove_tf32_relaxed_tol

Conversation

@pragupta

@pragupta pragupta commented Oct 29, 2025 •

Copy link
Copy Markdown
Collaborator

Instead of relaxing tolerances for certain unit tests that exercise TF32 on MI300, skip the tests until hipblaslt accuracy is improved.

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd

@pytorch-bot

pytorch-bot Bot commented Oct 29, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 46 Pending

As of commit e99c51e with merge base 84fe848 (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 module: rocm AMD GPU support for Pytorch topic: not user facing topic category labels Oct 29, 2025
@jeffdaily
jeffdaily marked this pull request as ready for review October 29, 2025 01:01
@jeffdaily
jeffdaily marked this pull request as draft October 29, 2025 01:01
@jeffdaily jeffdaily added keep-going Don't stop on first failure, keep running tests until the end ciflow/rocm ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners labels Oct 29, 2025
Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
@pytorch-bot pytorch-bot Bot removed ciflow/rocm ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners labels Oct 29, 2025
@jeffdaily jeffdaily added rocm This tag is for PRs from ROCm team ciflow/rocm ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners labels Oct 29, 2025
Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
@pytorch-bot pytorch-bot Bot removed ciflow/rocm ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners labels Oct 30, 2025
@jeffdaily jeffdaily added ciflow/rocm ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi355 Trigger "default" config CI on ROCm MI355 runners labels Oct 30, 2025
Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
BoyuanFeng pushed a commit that referenced this pull request Oct 31, 2025
Instead of relaxing tolerances for certain unit tests that exercise TF32 on MI300, skip the tests until hipblaslt accuracy is improved.

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

Co-authored-by: Jeff Daily <[email protected]>
Co-authored-by: Jagadish Krishnamoorthy <[email protected]>
etaf pushed a commit to etaf/pytorch-inductor-xpu that referenced this pull request Nov 4, 2025
Instead of relaxing tolerances for certain unit tests that exercise TF32 on MI300, skip the tests until hipblaslt accuracy is improved.

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

Co-authored-by: Jeff Daily <[email protected]>
Co-authored-by: Jagadish Krishnamoorthy <[email protected]>
This was referenced Jan 20, 2026
pytorchmergebot pushed a commit that referenced this pull request May 20, 2026
)

Removes 14 uses of `@skipIfRocmArch(MI300_ARCH)` and one `test_cuda=` pre-test skip covering TF32-sensitive tests skipped on MI300 by PR #166478, and replaces each with a disposition grounded in numerical measurement.

Background: the skips existed because the tests failed under hipBLASLt's FAST_TF32 (which maps to AMD CDNA3 XF32 matrix instructions) while passing on NVIDIA TF32. A standalone analysis harness at https://github.com/jeffdaily/tf32_analysis characterizes each failure and quantifies the AMD XF32 vs ideal NV-TF32 gap at the GEMM level, confirming that CDNA3's round-down accumulation is a documented hardware property (arXiv:2511.10909), not a hipBLASLt accuracy bug. Each test lands in one of three dispositions:

  1. **ROCm-conditional tolerance bump** — NV-TF32 passes the prior tolerance but AMD XF32 does not, so preserve CUDA coverage and relax only on ROCm (`test_addmm_sizes`, `test_broadcast_batched_matmul`, `test_compile_kernel_advanced`, `test_Conv2d_size_1_kernel`, `test_ConvTranspose2d_size_1_kernel`, `test_cdist_large`, `test_tensordot`, Linear no-bias module test).

  2. **`@with_ieee_matmul_precision`** — the test's intent is algorithmic correctness (not matmul precision) and TF32 noise is unrelated or amplified to the point where no sensible tolerance works (`test_old_cholesky`, `test_rnn_fused`, the three `affine_grid`/`grid_sample` tests). A new decorator in `common_utils.py` forces `torch.backends.{cuda,mkldnn}.matmul.fp32_precision = "ieee"` with save/restore, covering both CUDA TF32 and CPU mkldnn reduced-f32 matmul.

  3. **Drop the skip, no other change** — measurement shows the test already passes at existing tolerances (`test_transformerencoder_fastpath`, which compares fastpath vs slowpath and not TF32 vs FP32; `test_variable_sequence`, whose tiny LSTM sizes don't dispatch through MFMA).

Also adds documentation: `notes/numerical_accuracy.rst` gets a "TensorFloat-32 (TF32) on AMD Instinct MI300 devices" section parallel to the existing MI200 reduced-precision section, and `notes/hip.rst`'s stale "TF32 is not supported on ROCm" line is replaced with a pointer to the new section.

Authored with Claude (claude.ai/code).

Fixes #155216.
Fixes #168693.
Fixes #168694.
Fixes #168739.
Fixes #168757.
Fixes #168763.
Fixes #168769.
Fixes #168770.
Fixes #168802.
Fixes #168803.
Fixes #168804.
Fixes #168805.
Fixes #168811.
Fixes #168867.
Fixes #168870.
Fixes #169392.

Pull Request resolved: #180926
Approved by: https://github.com/albanD
pytorchmergebot pushed a commit to khushi-411/pytorch that referenced this pull request May 20, 2026
…rch#180926)

Removes 14 uses of `@skipIfRocmArch(MI300_ARCH)` and one `test_cuda=` pre-test skip covering TF32-sensitive tests skipped on MI300 by PR pytorch#166478, and replaces each with a disposition grounded in numerical measurement.

Background: the skips existed because the tests failed under hipBLASLt's FAST_TF32 (which maps to AMD CDNA3 XF32 matrix instructions) while passing on NVIDIA TF32. A standalone analysis harness at https://github.com/jeffdaily/tf32_analysis characterizes each failure and quantifies the AMD XF32 vs ideal NV-TF32 gap at the GEMM level, confirming that CDNA3's round-down accumulation is a documented hardware property (arXiv:2511.10909), not a hipBLASLt accuracy bug. Each test lands in one of three dispositions:

  1. **ROCm-conditional tolerance bump** — NV-TF32 passes the prior tolerance but AMD XF32 does not, so preserve CUDA coverage and relax only on ROCm (`test_addmm_sizes`, `test_broadcast_batched_matmul`, `test_compile_kernel_advanced`, `test_Conv2d_size_1_kernel`, `test_ConvTranspose2d_size_1_kernel`, `test_cdist_large`, `test_tensordot`, Linear no-bias module test).

  2. **`@with_ieee_matmul_precision`** — the test's intent is algorithmic correctness (not matmul precision) and TF32 noise is unrelated or amplified to the point where no sensible tolerance works (`test_old_cholesky`, `test_rnn_fused`, the three `affine_grid`/`grid_sample` tests). A new decorator in `common_utils.py` forces `torch.backends.{cuda,mkldnn}.matmul.fp32_precision = "ieee"` with save/restore, covering both CUDA TF32 and CPU mkldnn reduced-f32 matmul.

  3. **Drop the skip, no other change** — measurement shows the test already passes at existing tolerances (`test_transformerencoder_fastpath`, which compares fastpath vs slowpath and not TF32 vs FP32; `test_variable_sequence`, whose tiny LSTM sizes don't dispatch through MFMA).

Also adds documentation: `notes/numerical_accuracy.rst` gets a "TensorFloat-32 (TF32) on AMD Instinct MI300 devices" section parallel to the existing MI200 reduced-precision section, and `notes/hip.rst`'s stale "TF32 is not supported on ROCm" line is replaced with a pointer to the new section.

Authored with Claude (claude.ai/code).

Fixes pytorch#155216.
Fixes pytorch#168693.
Fixes pytorch#168694.
Fixes pytorch#168739.
Fixes pytorch#168757.
Fixes pytorch#168763.
Fixes pytorch#168769.
Fixes pytorch#168770.
Fixes pytorch#168802.
Fixes pytorch#168803.
Fixes pytorch#168804.
Fixes pytorch#168805.
Fixes pytorch#168811.
Fixes pytorch#168867.
Fixes pytorch#168870.
Fixes pytorch#169392.

Pull Request resolved: pytorch#180926
Approved by: https://github.com/albanD
pytorchmergebot pushed a commit to weishi-deng/pytorch that referenced this pull request May 21, 2026
…rch#180926)

Removes 14 uses of `@skipIfRocmArch(MI300_ARCH)` and one `test_cuda=` pre-test skip covering TF32-sensitive tests skipped on MI300 by PR pytorch#166478, and replaces each with a disposition grounded in numerical measurement.

Background: the skips existed because the tests failed under hipBLASLt's FAST_TF32 (which maps to AMD CDNA3 XF32 matrix instructions) while passing on NVIDIA TF32. A standalone analysis harness at https://github.com/jeffdaily/tf32_analysis characterizes each failure and quantifies the AMD XF32 vs ideal NV-TF32 gap at the GEMM level, confirming that CDNA3's round-down accumulation is a documented hardware property (arXiv:2511.10909), not a hipBLASLt accuracy bug. Each test lands in one of three dispositions:

  1. **ROCm-conditional tolerance bump** — NV-TF32 passes the prior tolerance but AMD XF32 does not, so preserve CUDA coverage and relax only on ROCm (`test_addmm_sizes`, `test_broadcast_batched_matmul`, `test_compile_kernel_advanced`, `test_Conv2d_size_1_kernel`, `test_ConvTranspose2d_size_1_kernel`, `test_cdist_large`, `test_tensordot`, Linear no-bias module test).

  2. **`@with_ieee_matmul_precision`** — the test's intent is algorithmic correctness (not matmul precision) and TF32 noise is unrelated or amplified to the point where no sensible tolerance works (`test_old_cholesky`, `test_rnn_fused`, the three `affine_grid`/`grid_sample` tests). A new decorator in `common_utils.py` forces `torch.backends.{cuda,mkldnn}.matmul.fp32_precision = "ieee"` with save/restore, covering both CUDA TF32 and CPU mkldnn reduced-f32 matmul.

  3. **Drop the skip, no other change** — measurement shows the test already passes at existing tolerances (`test_transformerencoder_fastpath`, which compares fastpath vs slowpath and not TF32 vs FP32; `test_variable_sequence`, whose tiny LSTM sizes don't dispatch through MFMA).

Also adds documentation: `notes/numerical_accuracy.rst` gets a "TensorFloat-32 (TF32) on AMD Instinct MI300 devices" section parallel to the existing MI200 reduced-precision section, and `notes/hip.rst`'s stale "TF32 is not supported on ROCm" line is replaced with a pointer to the new section.

Authored with Claude (claude.ai/code).

Fixes pytorch#155216.
Fixes pytorch#168693.
Fixes pytorch#168694.
Fixes pytorch#168739.
Fixes pytorch#168757.
Fixes pytorch#168763.
Fixes pytorch#168769.
Fixes pytorch#168770.
Fixes pytorch#168802.
Fixes pytorch#168803.
Fixes pytorch#168804.
Fixes pytorch#168805.
Fixes pytorch#168811.
Fixes pytorch#168867.
Fixes pytorch#168870.
Fixes pytorch#169392.

Pull Request resolved: pytorch#180926
Approved by: https://github.com/albanD
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…rch#180926)

Removes 14 uses of `@skipIfRocmArch(MI300_ARCH)` and one `test_cuda=` pre-test skip covering TF32-sensitive tests skipped on MI300 by PR pytorch#166478, and replaces each with a disposition grounded in numerical measurement.

Background: the skips existed because the tests failed under hipBLASLt's FAST_TF32 (which maps to AMD CDNA3 XF32 matrix instructions) while passing on NVIDIA TF32. A standalone analysis harness at https://github.com/jeffdaily/tf32_analysis characterizes each failure and quantifies the AMD XF32 vs ideal NV-TF32 gap at the GEMM level, confirming that CDNA3's round-down accumulation is a documented hardware property (arXiv:2511.10909), not a hipBLASLt accuracy bug. Each test lands in one of three dispositions:

  1. **ROCm-conditional tolerance bump** — NV-TF32 passes the prior tolerance but AMD XF32 does not, so preserve CUDA coverage and relax only on ROCm (`test_addmm_sizes`, `test_broadcast_batched_matmul`, `test_compile_kernel_advanced`, `test_Conv2d_size_1_kernel`, `test_ConvTranspose2d_size_1_kernel`, `test_cdist_large`, `test_tensordot`, Linear no-bias module test).

  2. **`@with_ieee_matmul_precision`** — the test's intent is algorithmic correctness (not matmul precision) and TF32 noise is unrelated or amplified to the point where no sensible tolerance works (`test_old_cholesky`, `test_rnn_fused`, the three `affine_grid`/`grid_sample` tests). A new decorator in `common_utils.py` forces `torch.backends.{cuda,mkldnn}.matmul.fp32_precision = "ieee"` with save/restore, covering both CUDA TF32 and CPU mkldnn reduced-f32 matmul.

  3. **Drop the skip, no other change** — measurement shows the test already passes at existing tolerances (`test_transformerencoder_fastpath`, which compares fastpath vs slowpath and not TF32 vs FP32; `test_variable_sequence`, whose tiny LSTM sizes don't dispatch through MFMA).

Also adds documentation: `notes/numerical_accuracy.rst` gets a "TensorFloat-32 (TF32) on AMD Instinct MI300 devices" section parallel to the existing MI200 reduced-precision section, and `notes/hip.rst`'s stale "TF32 is not supported on ROCm" line is replaced with a pointer to the new section.

Authored with Claude (claude.ai/code).

Fixes pytorch#155216.
Fixes pytorch#168693.
Fixes pytorch#168694.
Fixes pytorch#168739.
Fixes pytorch#168757.
Fixes pytorch#168763.
Fixes pytorch#168769.
Fixes pytorch#168770.
Fixes pytorch#168802.
Fixes pytorch#168803.
Fixes pytorch#168804.
Fixes pytorch#168805.
Fixes pytorch#168811.
Fixes pytorch#168867.
Fixes pytorch#168870.
Fixes pytorch#169392.

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

Removes 14 uses of `@skipIfRocmArch(MI300_ARCH)` and one `test_cuda=` pre-test skip covering TF32-sensitive tests skipped on MI300 by PR pytorch#166478, and replaces each with a disposition grounded in numerical measurement.

Background: the skips existed because the tests failed under hipBLASLt's FAST_TF32 (which maps to AMD CDNA3 XF32 matrix instructions) while passing on NVIDIA TF32. A standalone analysis harness at https://github.com/jeffdaily/tf32_analysis characterizes each failure and quantifies the AMD XF32 vs ideal NV-TF32 gap at the GEMM level, confirming that CDNA3's round-down accumulation is a documented hardware property (arXiv:2511.10909), not a hipBLASLt accuracy bug. Each test lands in one of three dispositions:

  1. **ROCm-conditional tolerance bump** — NV-TF32 passes the prior tolerance but AMD XF32 does not, so preserve CUDA coverage and relax only on ROCm (`test_addmm_sizes`, `test_broadcast_batched_matmul`, `test_compile_kernel_advanced`, `test_Conv2d_size_1_kernel`, `test_ConvTranspose2d_size_1_kernel`, `test_cdist_large`, `test_tensordot`, Linear no-bias module test).

  2. **`@with_ieee_matmul_precision`** — the test's intent is algorithmic correctness (not matmul precision) and TF32 noise is unrelated or amplified to the point where no sensible tolerance works (`test_old_cholesky`, `test_rnn_fused`, the three `affine_grid`/`grid_sample` tests). A new decorator in `common_utils.py` forces `torch.backends.{cuda,mkldnn}.matmul.fp32_precision = "ieee"` with save/restore, covering both CUDA TF32 and CPU mkldnn reduced-f32 matmul.

  3. **Drop the skip, no other change** — measurement shows the test already passes at existing tolerances (`test_transformerencoder_fastpath`, which compares fastpath vs slowpath and not TF32 vs FP32; `test_variable_sequence`, whose tiny LSTM sizes don't dispatch through MFMA).

Also adds documentation: `notes/numerical_accuracy.rst` gets a "TensorFloat-32 (TF32) on AMD Instinct MI300 devices" section parallel to the existing MI200 reduced-precision section, and `notes/hip.rst`'s stale "TF32 is not supported on ROCm" line is replaced with a pointer to the new section.

Authored with Claude (claude.ai/code).

Fixes pytorch#155216.
Fixes pytorch#168693.
Fixes pytorch#168694.
Fixes pytorch#168739.
Fixes pytorch#168757.
Fixes pytorch#168763.
Fixes pytorch#168769.
Fixes pytorch#168770.
Fixes pytorch#168802.
Fixes pytorch#168803.
Fixes pytorch#168804.
Fixes pytorch#168805.
Fixes pytorch#168811.
Fixes pytorch#168867.
Fixes pytorch#168870.
Fixes pytorch#169392.

Pull Request resolved: pytorch#180926
Approved by: https://github.com/albanD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep-going Don't stop on first failure, keep running tests until the end Merged module: rocm AMD GPU support for Pytorch open source rocm This tag is for PRs from ROCm team topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants