Skip to content

[XPU] Relax Muon float32 tolerance in test_state_dict_with_cuda_params#183903

Draft
gplutop7 wants to merge 1 commit into
pytorch:mainfrom
gplutop7:gplutopx/muon-xpu-state-dict-tolerance-override
Draft

[XPU] Relax Muon float32 tolerance in test_state_dict_with_cuda_params#183903
gplutop7 wants to merge 1 commit into
pytorch:mainfrom
gplutop7:gplutopx/muon-xpu-state-dict-tolerance-override

Conversation

@gplutop7
Copy link
Copy Markdown

@gplutop7 gplutop7 commented May 15, 2026

Fixes:
intel/torch-xpu-ops#1973

This PR adds an XPU-specific tolerance override for Muon in optimizer tests.

The override is scoped to TestOptimRenewed.test_state_dict_with_cuda_params for torch.float32 on xpu only.

This accounts for small, expected XPU versus CPU float32 accumulation differences observed in state_dict parity checks, while keeping behavior unchanged for all other devices and dtypes.

Prerequisite
Before landing this PR, merge intel/torch-xpu-ops#3690 first.
That change is required so XPU test override naming matches DecorateInfo test-name matching.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 15, 2026

🔗 Helpful Links

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

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:

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

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 15, 2026

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Copy Markdown
Collaborator

@guangyey guangyey left a comment

Choose a reason for hiding this comment

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

cc @daisyden
I noticed that test_state_dict_with_cuda_params is marked as onlyCUDA. We need to include this PR when generalizing test_state_dict_with_cuda_params.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants