Skip to content

test: skip failing torch-xpu-ops UT cases in P0 scope - #5110

Open
libohao1201 wants to merge 4 commits into
mainfrom
libo/skip-third-party-inline
Open

test: skip failing torch-xpu-ops UT cases in P0 scope#5110
libohao1201 wants to merge 4 commits into
mainfrom
libo/skip-third-party-inline

Conversation

@libohao1201

@libohao1201 libohao1201 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Skip 110 failing P0-scope UT cases by injecting unittest.skip on the exact generated test methods after instantiation — no change to skip_list_common.py.

Each skip carries its tracking issue link, so the skip reason points directly at the owning issue.

Approach

For each test file, after instantiate_device_type_tests(...) (or instantiate_parametrized_tests(...) for XCCL), a small helper iterates a class -> {exact_method_name: issue_url} map and applies unittest.skip(reason) to the matching generated methods. The helper is wrapped in a function so no TestCase-bound loop variable leaks into module globals (which would otherwise cause pytest to re-collect the class).

Files changed

File Cases skipped
test/xpu/test_ops_xpu.py 61
test/xpu/test_unary_ufuncs_xpu.py 31
test/xpu/test_optim_xpu.py 11
test/xpu/distributed/test_c10d_xccl.py 6
test/xpu/test_shape_ops_xpu.py 1
Total 110

Validation

  • All 5 files compile (py_compile).
  • End-to-end pytest --collect-only / run confirms the targeted methods are collected exactly once and reported SKIPPED with the issue link as reason.

Skip 110 UT cases by injecting unittest.skip on the
exact generated test methods after instantiation, instead of editing
skip_list_common.py. Each skip carries its tracking issue link.

Files: test_ops_xpu.py (61), test_unary_ufuncs_xpu.py (31),
test_optim_xpu.py (11), distributed/test_c10d_xccl.py (6),
test_shape_ops_xpu.py (1).
@github-actions github-actions Bot added disable_e2e Disable all e2e test jobs for the PR disable_distributed Disable distributed UT test jobs for the PR disable_build Disable source code build for CI test, use nightly wheel labels Aug 26, 2026
@libohao1201

Copy link
Copy Markdown
Contributor Author

@copilot https://gh.io/copilot-coding-agent-docs https://gh.io/copilot-coding-agent-docs https://gh.io/copilot-coding-agent-docs The Python lint (flake8/ruff) check failed. Please fix the lint errors in this PR.

Important: Do NOT update the plan in the PR description directly. Use reply comments to update the status.

Lint job log: https://github.com/intel/torch-xpu-ops/actions/runs/32924365796

Instructions:

Review the lint failure log via the link above
Fix all lint errors in the relevant source files
Ensure both Python lint and Clang format checks pass
Use reply comments to report progress - do NOT modify the PR description plan directly

Co-authored-by: libohao1201 <30426700+libohao1201@users.noreply.github.com>

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@copilot https://gh.io/copilot-coding-agent-docs https://gh.io/copilot-coding-agent-docs https://gh.io/copilot-coding-agent-docs The Python lint (flake8/ruff) check failed. Please fix the lint errors...

Addressed in 2e7c190. I fixed the PYFMT issues reported by run 32924365796 by adding the formatter-required blank lines before the new helper functions and correcting the import order in test_optim_xpu.py. Local validation: python -m py_compile on the 5 touched test files, git diff --check, secret scan, and automated code review all passed.

@mengfei25

mengfei25 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Could we skip them here as well, similar to how they are handled in skip_list_common.py? or another file, similar as other skips?
Maintaining two different skipping mechanisms might make the code harder to maintain down the road.
What do you think?

libohao1201 and others added 2 commits August 28, 2026 05:58
Re-ran the 110 P0 skip-scope cases on main (torch 2.15 dev). Remove the
skip for the 39 cases that no longer need it:
- 33 now pass on main (27 in test_ops_xpu.py + all 6 in test_c10d_xccl.py)
- 6 in test_ops_xpu.py are already covered by existing skip_list entries

Remaining injected skips: 71 (test_ops_xpu 28, test_unary_ufuncs 31,
test_optim 11, test_shape_ops 1). test_c10d_xccl skip block removed.

Note: test_python_ref__refs_true_divide_xpu_complex32 passes on main via
PR #5083; ensure this branch is rebased onto main before merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disable_build Disable source code build for CI test, use nightly wheel disable_distributed Disable distributed UT test jobs for the PR disable_e2e Disable all e2e test jobs for the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants