Skip to content

Enable tests with OpenCL GPU device - #2149

Draft
antonwolfy wants to merge 3 commits into
masterfrom
remove-wa-and-enable-opencl-gpu-tests
Draft

antonwolfy wants to merge 3 commits into
masterfrom
remove-wa-and-enable-opencl-gpu-tests

Conversation

@antonwolfy

Copy link
Copy Markdown
Contributor

TBD

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@antonwolfy antonwolfy self-assigned this Nov 5, 2024
@github-actions

github-actions Bot commented Nov 5, 2024

Copy link
Copy Markdown
Contributor

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

@antonwolfy
antonwolfy force-pushed the remove-wa-and-enable-opencl-gpu-tests branch from b26c4d4 to 26c1243 Compare December 13, 2024 14:11
@antonwolfy
antonwolfy force-pushed the remove-wa-and-enable-opencl-gpu-tests branch from 26c1243 to 45db894 Compare December 13, 2024 14:12
@coveralls

coveralls commented Dec 13, 2024 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 72.236%. remained the same
when pulling 06ee098 on remove-wa-and-enable-opencl-gpu-tests
into edb86e6 on master.

@antonwolfy antonwolfy mentioned this pull request Feb 15, 2025
3 of 6 tasks
@github-actions

github-actions Bot commented Mar 25, 2025 •

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.18.0dev0=py312he4f9c94_59 ran successfully.
Passed: 1197
Failed: 0
Skipped: 14

@github-actions

Copy link
Copy Markdown
Contributor

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

antonwolfy added a commit that referenced this pull request Nov 28, 2026
…cks (#3189)

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 |
github-actions Bot added a commit that referenced this pull request Nov 28, 2026
…cks (#3189)

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 |

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.

2 participants