Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue has enable profiling #531

Merged
merged 3 commits into from
Aug 18, 2021
Merged

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Aug 17, 2021

C-API function DPCTLQueue_HasEnableProfiling(QRef) that returns true if QRef references a sycl::queue that was created to have property sycl::property::queue::enable_profiling.

dpctl.SyclQueue acquired property dpctl.SyclQueue.has_enable_profiling.

This was used in dpctl.SyclQueue.__repr__ to echo properties of the queue instance.

This calls sycl::queue::has_property<sycl::property::queue::enable_profiling>()
Queries whether queue was constructed with said property.
If so, events from tasks submitted to this queue will have profiling info
@coveralls
Copy link
Collaborator

coveralls commented Aug 17, 2021

Coverage Status

Coverage increased (+0.02%) to 64.914% when pulling ad31122 on queue-has-enable-profiling into 8a55469 on master.

```
In [1]: import dpctl

In [2]: dpctl.SyclQueue()
Out[2]: <dpctl.SyclQueue at 0x7f8752c07b90>

In [3]: dpctl.SyclQueue(property='in_order')
Out[3]: <dpctl.SyclQueue at 0x7f87494f4870, property=['in_order']>

In [4]: dpctl.SyclQueue(property=['in_order'])
Out[4]: <dpctl.SyclQueue at 0x7f8753587f00, property=['in_order']>

In [5]: dpctl.SyclQueue(property=['in_order', 'enable_profiling'])
Out[5]: <dpctl.SyclQueue at 0x7f8734016eb0, property=['in_order', 'enable_profling']>
```
@oleksandr-pavlyk oleksandr-pavlyk merged commit 82ac451 into master Aug 18, 2021
@oleksandr-pavlyk oleksandr-pavlyk deleted the queue-has-enable-profiling branch August 18, 2021 00:09
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