Skip to content

Drop OpenCL GPU from test_sycl_queue.py and tighten its placement checks - #3189

Open
antonwolfy wants to merge 5 commits into
masterfrom
drop-opencl-gpu-sycl-queue-tests
Open

antonwolfy wants to merge 5 commits into
masterfrom
drop-opencl-gpu-sycl-queue-tests

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #2149.

This PR revisits the scope of dpnp/tests/test_sycl_queue.py:

  • OpenCL GPU devices stay excluded, now by policy: Level Zero is the GPU backend users target, and running on OpenCL GPU is a rare case. The CMPLRLLVM-55640 workaround comment is gone, and the backend check is == "opencl" instead of the substring test in "opencl".
  • Inputs are built on a queue of their own per device (valid_queues) instead of the device's cached queue, which device=SyclDevice and the default device both resolve to. assert_sycl_queue_equal also checks queue identity through get_execution_queue, so a result moved to the default queue now fails even when only one device is available. With only the CPU visible, a mutant that moves unary function results to the default device passed all of test_1in_1out before and fails 53 of its cases now. test_array_copy and the from_dlpack tests stay on devices: device= selects the cached queue by design, and DLPack carries only the device.
  • Placement checks are stricter: the tests that also run with device=None, test_random, test_random_state and TestToDevice::test_basic now check the result's queue, not only its device.
  • Cross-device tests check values: the input is a strided view with an offset, and the result is compared with the source array or with the result computed on the source device. A cross-context copy is staged through the host, and nothing checked its values before: a mutant that skips or shifts that copy in asarray passed and now fails 23 or 28 cases.
  • test_interp also covers one-sided left/right.

Local results, same counts as master:

Devices Passed Skipped
One (OpenCL CPU) 770 17
Two (L0 GPU + OpenCL CPU) 1551 34
  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

… test_sycl_queue.py

Level Zero is the GPU backend users target, so OpenCL GPU devices stay out of the tested devices, now by policy rather than as the CMPLRLLVM-55640 workaround.

When the default device is the only one, inputs share the default queue and a dropped placement passes unnoticed, so those tests are skipped. Tests marked with the new `single_device` marker still run: they use a second queue on the same device or an in-order or profiling queue.
@github-actions

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/3189/index.html

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.22.0dev2=np2py314h8d9cdd5_11 ran successfully.
Passed: 1491
Failed: 0
Skipped: 6

@coveralls

coveralls commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 84.269%. remained the same — drop-opencl-gpu-sycl-queue-tests into master

test_left_right_args now passes only left or only right, and xp no longer spans all of x, so left and right are actually used. This covers the one-sided branch of the interpolate extension, which test_sycl_queue.py no longer reaches on a single-device host.
Comment thread dpnp/tests/test_sycl_queue.py Resolved
Comment thread dpnp/tests/test_sycl_queue.py Resolved
@antonwolfy antonwolfy changed the title Drop OpenCL GPU and skip queue checks with only the default device in test_sycl_queue.py Drop OpenCL GPU from test_sycl_queue.py and tighten its placement checks Nov 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants