pytorch - 💡(How to fix) Fix Many test failures when run in "Sandcastle" config and expected test failures

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

Some tests, e.g. https://github.com/pytorch/pytorch/blob/main/test/test_ops.py#L763 are decorated with onlyCUDA or onlyOn(["cuda", "xpu"]) ( test_compare_cpu)

The used OPs DB marks some as xfail: https://github.com/pytorch/pytorch/blob/eaa777900b14e1aa6ffc1959cbcdb055d5de3e75/torch/testing/_internal/common_methods_invocations.py#L26135

When IS_SANDCASTLE is set the only* decorator will pass the test which makes them be considered a failure as it didn't fail, see https://github.com/pytorch/pytorch/blob/eaa777900b14e1aa6ffc1959cbcdb055d5de3e75/torch/testing/_internal/common_device_type.py#L1572-L1577

This causes a large number of failures.

Versions

PyTorch 2.12.0-rc9

cc @seemethere @malfet @pytorch/pytorch-dev-infra @mruberry

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix Many test failures when run in "Sandcastle" config and expected test failures