Repository navigation
SYCL backend (2/6): CI on the SYCL CPU device - #993
Merged
Merged
Conversation
Builds TIGRE with TIGRE_BACKEND=sycl on ubuntu-latest and windows-latest and runs pytest on the SYCL CPU device (Intel OpenCL CPU runtime), with the oneAPI DPC++ compiler from conda-forge. Runs when Common/, the build or the workflow change, and on demand.
The sdist header list in setup.py named only Common/CUDA headers, so a source distribution would not have Common/SYCL (including page_locking.hpp). The list now includes every .cpp/.hpp in Common/SYCL. MANIFEST.in includes those files for PEP 517 builders (uv build --sdist) that do not pass "sdist" as sys.argv[1].
test_pytorch_bindings.py is a CPU-only check of the autograd bindings (Ax and Atb are replaced by a dense matrix). Without torch, pytest.importorskip skips the whole module as one test, so the six tests are not collected. The main suite runs first, without torch: importing torch into the same process as the Intel OpenCL runtime aborts on Windows in numpy.linalg.svd. The six binding tests then run in their own process after a CPU-wheel install.
Member
|
Thanks, merged. Two small things for a later PR: could you add sycl to the push branches, so merges of master into sycl get tested, and a concurrency group like tests.yml has? The include_headers addition in setup.py also looks redundant now that MANIFEST.in includes Common/SYCL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Second of six PRs for the SYCL backend (#885). 1/6 is #902. This one adds a CI workflow for the SYCL build and makes the sdist include the SYCL sources. It is 3 commits on top of 1/6.
.github/workflows/sycl.ymlbuilds TIGRE withTIGRE_BACKEND=syclon ubuntu-latest and windows-latest and runspyteston the SYCL CPU device. GitHub-hosted runners have no GPU, so the tests markedgpurun on the CPU device. The oneAPI DPC++ compiler 2025.2 and the Intel OpenCL CPU runtime come from conda-forge, through micromamba.Common/**,setup.py,pyproject.toml,Python/tigre/utilities/cuda_interface/**or the workflow change, on pull requests and pushes to master, and on demand (workflow_dispatch).TIGRE_REPEAT_CALLS=50, because the default of 2000 calls intest_ax_repeatable.pytakes long on the CPU device.numpy.linalg.svd. The six CPU-only tests intest_pytorch_bindings.pyrun afterwards in their own process, with the CPU wheel of torch. Without torch,pytest.importorskipskips that whole module as one test.setup.py: the sdist header list only hadCommon/CUDAheaders. It now also lists the.cpp/.hpp/.hfiles inCommon/SYCL, so an sdist builds withTIGRE_BACKEND=sycl.MANIFEST.in: addsrecursive-includelines forCommon/CUDAandCommon/SYCL, for PEP 517 builders (e.g.uv build --sdist) that don't go throughpython setup.py sdist. The file keeps its current content. It needs no line forhead.mat, since it is now inside the package.The
Common/SYCLcode and the Python files are not touched, and neither isCommon/CUDA. The pending-extension scaffolding from 1/6 (SYCL_PENDING,_import_extension, theconftest.pyskips) stays until 5/6. The workflow trigger on pushes namesmaster, so pushes tosyclitself don't start it, only pull requests do.Which parts of TIGRE does it touch?
Common/CUDA)CI workflow and packaging only (
.github/workflows/sycl.yml,setup.py,MANIFEST.in).Checklist
TIGRE.bibupdated (n/a)changelog.md(docs and changelog come in 6/6)Test environment
sycl(52ddd9b): both jobs passed, ubuntu-latest and windows-latest.pytest147 passed, 114 skipped (most skips are tests that need extensions added in 3/6 to 5/6);pytest -m extended7 passed, 20 skipped. These counts are lower than the ones in SYCL backend (1/6): build switch, device list and forward projectors #902 (166 passed) because upstream reorganized its tests.