Skip to content

Cached queue use filter string support - #1079

Merged
oleksandr-pavlyk merged 3 commits into
masterfrom
cached-queue-use-filter-string-support
Feb 21, 2023
Merged

oleksandr-pavlyk merged 3 commits into
masterfrom
cached-queue-use-filter-string-support

Conversation

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

Per discussion in gh-1076, this adds support for filter-string input in get_device_cached_queue utility function:

In [1]: import dpctl

In [2]: import dpctl._sycl_queue_manager as qm

In [3]: qm.__pyx_capi__
Out[3]:
{'get_current_queue': <capsule object "struct PySyclQueueObject *(int __pyx_skip_dispatch)" at 0x7fe2260bcc30>,
 'get_current_device_type': <capsule object "PyObject *(int __pyx_skip_dispatch)" at 0x7fe2260bcc60>,
 'get_current_backend': <capsule object "PyObject *(int __pyx_skip_dispatch)" at 0x7fe2260bcc90>,
 'get_device_cached_queue': <capsule object "PyObject *(PyObject *, int __pyx_skip_dispatch)" at 0x7fe2260bccc0>}

In [4]: qm.get_device_cached_queue("cpu")
Out[4]: <dpctl.SyclQueue at 0x7fe226945b80>

In [5]: qm.get_device_cached_queue("gpu")
Out[5]: <dpctl.SyclQueue at 0x7fe21c032ec0>

In [6]: quit
  • 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

```

In [1]: import dpctl

In [2]: import dpctl._sycl_queue_manager as qm

In [3]: qm.__pyx_capi__
Out[3]:
{'get_current_queue': <capsule object "struct PySyclQueueObject *(int __pyx_skip_dispatch)" at 0x7fe2260bcc30>,
 'get_current_device_type': <capsule object "PyObject *(int __pyx_skip_dispatch)" at 0x7fe2260bcc60>,
 'get_current_backend': <capsule object "PyObject *(int __pyx_skip_dispatch)" at 0x7fe2260bcc90>,
 'get_device_cached_queue': <capsule object "PyObject *(PyObject *, int __pyx_skip_dispatch)" at 0x7fe2260bccc0>}

In [4]: qm.get_device_cached_queue("cpu")
Out[4]: <dpctl.SyclQueue at 0x7fe226945b80>

In [5]: qm.get_device_cached_queue("gpu")
Out[5]: <dpctl.SyclQueue at 0x7fe21c032ec0>
```
@github-actions

Copy link
Copy Markdown

@coveralls

coveralls commented Feb 21, 2023 •

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage: 82.309% (+0.01%) from 82.296% when pulling 4329722 on cached-queue-use-filter-string-support into ec19e60 on master.

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.14.1dev2=py310h76be34b_36 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.14.1dev2=py310h76be34b_37 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@oleksandr-pavlyk
oleksandr-pavlyk merged commit eadc0bd into master Feb 21, 2023
@oleksandr-pavlyk
oleksandr-pavlyk deleted the cached-queue-use-filter-string-support branch February 21, 2023 22:02
@github-actions

Copy link
Copy Markdown

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.14.1dev2=py310h76be34b_37 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

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