Skip to content

[inductor] Loosen fp16 grad tolerance for special.i1/i1e on XPU (mirr… - #194566

Closed
xuhancn wants to merge 1 commit into
pytorch:mainfrom
xuhancn:fix/194155-xpu-bessel-i1
Closed

xuhancn wants to merge 1 commit into
pytorch:mainfrom
xuhancn:fix/194155-xpu-bessel-i1

Conversation

@xuhancn

@xuhancn xuhancn commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

…or CUDA)

#189872 added the fp16 grad-tolerance override for special.i1/special.i1e under inductor_override_kwargs["cuda"], which makes the newly enabled fp16 gradient checks pass on CUDA. The same eager-vs-inductor intermediate-precision gap exists on XPU, but the xpu dict was missed, so test_comprehensive_special_i1_xpu_float16 and test_comprehensive_special_i1e_xpu_float16 fail on main.

This change mirrors the CUDA entries in the XPU dict with the same grad_atol=1e-5 and grad_rtol=1e-2 values.

Test Plan:

lintrunner -a test/inductor/test_torchinductor_opinfo.py

I authored this with the assistance of an AI coding assistant.,

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

@xuhancn xuhancn added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category ciflow/xpu Run XPU CI tasks labels Aug 24, 2026
@pytorch-bot

pytorch-bot Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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 5da143a with merge base e62d18e (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.

@xuhancn
xuhancn requested a review from guangyey August 24, 2026 12:31
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 26, 2026

@guangyey guangyey left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!

@guangyey
guangyey requested a review from jansel September 3, 2026 03:17
@guangyey

guangyey commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

…or CUDA)

pytorch#189872 added the fp16 grad-tolerance override for special.i1/special.i1e under inductor_override_kwargs["cuda"], which makes the newly enabled fp16 gradient checks pass on CUDA. The same eager-vs-inductor intermediate-precision gap exists on XPU, but the xpu dict was missed, so test_comprehensive_special_i1_xpu_float16 and test_comprehensive_special_i1e_xpu_float16 fail on main.

This change mirrors the CUDA entries in the XPU dict with the same grad_atol=1e-5 and grad_rtol=1e-2 values.

Test Plan:

lintrunner -a test/inductor/test_torchinductor_opinfo.py

I authored this with the assistance of an AI coding assistant.,
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased fix/194155-xpu-bessel-i1 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout fix/194155-xpu-bessel-i1 && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the fix/194155-xpu-bessel-i1 branch from a435a7d to 5da143a Compare September 3, 2026 03:19
@xuhancn

xuhancn commented Sep 4, 2026

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

Sanskaaar1 pushed a commit to Sanskaaar1/pytorch that referenced this pull request Sep 8, 2026
pytorch#194566)

…or CUDA)

pytorch#189872 added the fp16 grad-tolerance override for special.i1/special.i1e under inductor_override_kwargs["cuda"], which makes the newly enabled fp16 gradient checks pass on CUDA. The same eager-vs-inductor intermediate-precision gap exists on XPU, but the xpu dict was missed, so test_comprehensive_special_i1_xpu_float16 and test_comprehensive_special_i1e_xpu_float16 fail on main.

This change mirrors the CUDA entries in the XPU dict with the same grad_atol=1e-5 and grad_rtol=1e-2 values.

Test Plan:

lintrunner -a test/inductor/test_torchinductor_opinfo.py

I authored this with the assistance of an AI coding assistant.,

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

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks Merged module: inductor 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

Status: No status

Development

Successfully merging this pull request may close these issues.

DISABLED test_comprehensive_special_i1_xpu_float16 (__main__.TestInductorOpInfoXPU)

6 participants