Add test_sycl_extension from test_cpp_extensions_aot for XPU#2927
Add test_sycl_extension from test_cpp_extensions_aot for XPU#2927astachowiczhabana wants to merge 11 commits intomainfrom
Conversation
Add a self-contained wrapper that builds the AOT C++ extensions in setUpClass and runs test_sycl_extension on XPU. Register the new test file in skip_list_common.py so it is picked up by run_test_with_skip.py in CI.
There was a problem hiding this comment.
Pull request overview
This PR adds an XPU-specific test wrapper intended to exercise the upstream-style AOT C++/SYCL extension build and run test_sycl_extension as part of XPU CI.
Changes:
- Add
test/xpu/test_cpp_extensions_aot_xpu.pyto attempt building the SYCL AOT extension insetUpClassand run a basicsigmoid_addcorrectness check on XPU. - Register the new test file in the XPU test runner’s
skip_dictso it is executed in XPU CI.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
test/xpu/test_cpp_extensions_aot_xpu.py |
New wrapper test that attempts to build and import torch_test_cpp_extension.sycl before running an XPU correctness assertion. |
test/xpu/skip_list_common.py |
Adds the new test file to the XPU CI test list (skip_dict). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Catch ModuleNotFoundError instead of broad ImportError - Remove try/except around build so failures surface as test errors - Defer sys.path insertion from import time to setUpClass
|
@astachowiczhabana , could you help add a dedicated section to the workflow for this case? Since we are suffering from a Windows CI issue, the test script of this PR cannot be verified. But a dedicated section like https://github.com/intel/torch-xpu-ops/blob/main/.github/workflows/_windows_ut.yml#L238-L251 before https://github.com/intel/torch-xpu-ops/blob/main/.github/workflows/_windows_ut.yml#L238C14-L238C37 could help workaround the Windows CI issue first to verify this PR. |
|
Thx @EikanWang for the review. I've added a dedicated "Run CPP Extensions AOT SYCL UT" step in |
Performance outliers, please check!
|
…test_xpu, add oneAPI env vars
Performance outliers, please check!
|
dvrogozh
left a comment
There was a problem hiding this comment.
Why do we duplicate the test which is available in pytorch upstream? Is this a workaround for Windows CI?
Performance outliers, please check!
|
We don't have Windows tests in upstream |
|
Hi @astachowiczhabana , seems the new added test case failed on Linux https://github.com/intel/torch-xpu-ops/actions/runs/22493742531/job/65192747065?pr=2927#step:4:3946, please double check it |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@chuanqi129 Thanks for catching that. The test is no longer failing on Ubuntu — I've removed it from skip_list_common in the latest commit (adc0bdb), so it won't be picked up by the Ubuntu CI runner anymore. The test will now only run on Windows via the dedicated "Run CPP Extensions AOT SYCL UT" step in _windows_ut.yml. We only need this test on Windows to verify that the upstream fix (pytorch/pytorch#175333) resolves the oneAPI 2025.3 build issue there. We don't need it on Ubuntu because test_sycl_extension already passes there in upstream CI. Once pytorch/pytorch#175333 is merged, we'll work on enabling Windows XPU CI in upstream as well. |
Performance outliers, please check!
|
Fixes #2574
Adds
test_sycl_extensionfrom upstreamtest_cpp_extensions_aot.pyto XPU CI.Unlike other
_xputests that import upstream classes viaXPUPatchForImport, this test requires AOT C++ extensions to be compiled first. The wrapper handles this by building them insetUpClass(mirroring upstreamrun_test.pylogic), so no CI changes are needed.Changes:
test/xpu/test_cpp_extensions_aot_xpu.py— self-contained wrapper that builds extensions and runstest_sycl_extensiontest/xpu/skip_list_common.py— register new test fileDisable_e2e
Disable_distributed