Skip to content

[ROCm] Make test_conv_cuda_graph_new_shape deterministic - #202451

Closed
jeffdaily wants to merge 2 commits into
mainfrom
rocm-conv-graph-new-shape-deterministic
Closed

jeffdaily wants to merge 2 commits into
mainfrom
rocm-conv-graph-new-shape-deterministic

Conversation

@jeffdaily

@jeffdaily jeffdaily commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Linked issue or supporting maintainer

Follow-up to #201481 (author has write access).

BC-breaking?

No

Summary (human written only)

Test-only follow-up to #201481: pin the new graph-capture conv test to deterministic MIOpen solvers so it stops failing on the ROCm preview image. Details below.

Agent details (if applicable)

test_conv_cuda_graph_new_shape (from #201481) fails on the rocm-preview mi350 job for its transposed fp16 variants. Only grad_weight differs, and it is not the capture: replaying the same graph twice gives different results, and so do two eager calls. From ROCm 10.2 (MIOpen 3.6.2), MIOpen's default config for these small fp16 weight-gradient convs is the global split-K variant of ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC, whose reduction order is not fixed; ROCm 10.1 picked a non-split config of the same solver, which happened to be exact. The test compares two runs of a conv it never asked to be deterministic, at the fp16 default tolerance.

Passing deterministic=True to cudnn.flags makes MIOpen use a deterministic solver (CK ConvHipImplicitGemmGroupWrwXdlops), so replay, eager immediate and eager Find agree bit for bit. The capture failure #201481 fixes does not depend on deterministic, so the test still catches it. Loosening the tolerance instead would need about atol 0.2 for fp16 grad_weight.

Test Plan: on MI355X (gfx950), at the same commit, ROCm 10.2.0a20261014 and 10.3.0a20261027 fail 3 of 12 variants before this change and pass 12/12 after (3 runs each); ROCm 10.1 passes both before and after; against a torch without #201481 the changed test fails with the capture error.

python test/nn/test_convolution.py -k test_conv_cuda_graph_new_shape -v

Authored with Claude.

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

`test_conv_cuda_graph_new_shape` (from #201481) fails on the rocm-preview mi350 job for its transposed fp16 variants. Only `grad_weight` differs, and it is not the capture: replaying the same graph twice gives different results, and so do two eager calls. From ROCm 10.2 (MIOpen 3.6.2), MIOpen's default config for these small fp16 weight-gradient convs is the global split-K variant of `ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC`, whose reduction order is not fixed; ROCm 10.1 picked a non-split config of the same solver, which happened to be exact. The test compares two runs of a conv it never asked to be deterministic, at the fp16 default tolerance.

Passing `deterministic=True` to `cudnn.flags` makes MIOpen use a deterministic solver (CK `ConvHipImplicitGemmGroupWrwXdlops`), so replay, eager immediate and eager Find agree bit for bit. The capture failure #201481 fixes does not depend on deterministic, so the test still catches it. Loosening the tolerance instead would need about atol 0.2 for fp16 `grad_weight`.

Test Plan: on MI355X (gfx950), at the same commit, ROCm 10.2.0a20261014 and 10.3.0a20261027 fail 3 of 12 variants before this change and pass 12/12 after (3 runs each); ROCm 10.1 passes both before and after; against a torch without #201481 the changed test fails with the capture error.
```
python test/nn/test_convolution.py -k test_conv_cuda_graph_new_shape -v
```

Authored with Claude.
@pytorch-bot pytorch-bot Bot added module: rocm AMD GPU support for Pytorch topic: not user facing topic category labels Oct 28, 2026
@pytorch-bot

pytorch-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

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

🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:

  • Triviality
    • Adds deterministic=True to cudnn.flags in test_conv_cuda_graph_new_shape; not a skip, xfail, message update, or new assertion
    • No trivial class covers changing which MIOpen solvers an existing test exercises, and it touches no source code
  • Coverage and numerics
    • The test no longer runs the default solver path under capture, only deterministic ones; it now steers kernel selection
    • useImmediateMode in Conv_miopen.cpp ignores deterministic, so the capture fix is likely still covered, but a ROCm reviewer should confirm the narrowing
  • Correctness
    • Change is small and plausible; deterministic joins the algorithm cache key, so the new capture shape still misses the cache

reason: not_trivial
Reviewed commit: 6a59735 (NOT the current head 8b17e2a)

Inference job

🐛 Report a wrong verdict

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

@pytorchgreenlight pytorchgreenlight Bot added the GL/human GreenLight marked as needing human review label Oct 28, 2026
@jbschlosser

Copy link
Copy Markdown
Contributor

@pytorchbot merge

@jbschlosser jbschlosser added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 29, 2026
@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 29, 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

@jeffdaily

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorchgreenlight pytorchgreenlight Bot added GL/superseded GreenLight review is superseded by changes and removed GL/human GreenLight marked as needing human review labels Oct 29, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: New commits were pushed while merging. Please rerun the merge command.

Details for Dev Infra team

Raised by workflow job

@jeffdaily

Copy link
Copy Markdown
Collaborator Author

@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
)

## Linked issue or supporting maintainer

Follow-up to pytorch#201481 (author has write access).

## BC-breaking?

No

## Summary (human written only)

Test-only follow-up to pytorch#201481: pin the new graph-capture conv test to deterministic MIOpen solvers so it stops failing on the ROCm preview image. Details below.

## Agent details (if applicable)

`test_conv_cuda_graph_new_shape` (from pytorch#201481) fails on the rocm-preview mi350 job for its transposed fp16 variants. Only `grad_weight` differs, and it is not the capture: replaying the same graph twice gives different results, and so do two eager calls. From ROCm 10.2 (MIOpen 3.6.2), MIOpen's default config for these small fp16 weight-gradient convs is the global split-K variant of `ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC`, whose reduction order is not fixed; ROCm 10.1 picked a non-split config of the same solver, which happened to be exact. The test compares two runs of a conv it never asked to be deterministic, at the fp16 default tolerance.

Passing `deterministic=True` to `cudnn.flags` makes MIOpen use a deterministic solver (CK `ConvHipImplicitGemmGroupWrwXdlops`), so replay, eager immediate and eager Find agree bit for bit. The capture failure pytorch#201481 fixes does not depend on deterministic, so the test still catches it. Loosening the tolerance instead would need about atol 0.2 for fp16 `grad_weight`.

Test Plan: on MI355X (gfx950), at the same commit, ROCm 10.2.0a20261014 and 10.3.0a20261027 fail 3 of 12 variants before this change and pass 12/12 after (3 runs each); ROCm 10.1 passes both before and after; against a torch without pytorch#201481 the changed test fails with the capture error.
```
python test/nn/test_convolution.py -k test_conv_cuda_graph_new_shape -v
```

Authored with Claude.

Pull Request resolved: pytorch#202451
Approved by: https://github.com/jbschlosser
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 9, 2026
)

## Linked issue or supporting maintainer

Follow-up to pytorch#201481 (author has write access).

## BC-breaking?

No

## Summary (human written only)

Test-only follow-up to pytorch#201481: pin the new graph-capture conv test to deterministic MIOpen solvers so it stops failing on the ROCm preview image. Details below.

## Agent details (if applicable)

`test_conv_cuda_graph_new_shape` (from pytorch#201481) fails on the rocm-preview mi350 job for its transposed fp16 variants. Only `grad_weight` differs, and it is not the capture: replaying the same graph twice gives different results, and so do two eager calls. From ROCm 10.2 (MIOpen 3.6.2), MIOpen's default config for these small fp16 weight-gradient convs is the global split-K variant of `ConvAsmImplicitGemmGTCDynamicWrwXdlopsNHWC`, whose reduction order is not fixed; ROCm 10.1 picked a non-split config of the same solver, which happened to be exact. The test compares two runs of a conv it never asked to be deterministic, at the fp16 default tolerance.

Passing `deterministic=True` to `cudnn.flags` makes MIOpen use a deterministic solver (CK `ConvHipImplicitGemmGroupWrwXdlops`), so replay, eager immediate and eager Find agree bit for bit. The capture failure pytorch#201481 fixes does not depend on deterministic, so the test still catches it. Loosening the tolerance instead would need about atol 0.2 for fp16 `grad_weight`.

Test Plan: on MI355X (gfx950), at the same commit, ROCm 10.2.0a20261014 and 10.3.0a20261027 fail 3 of 12 variants before this change and pass 12/12 after (3 runs each); ROCm 10.1 passes both before and after; against a torch without pytorch#201481 the changed test fails with the capture error.
```
python test/nn/test_convolution.py -k test_conv_cuda_graph_new_shape -v
```

Authored with Claude.

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

Labels

ciflow/trunk Trigger trunk jobs on your pull request GL/superseded GreenLight review is superseded by changes 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.

4 participants