Skip to content

Add a execution_status method for the SyclEventRaw class #522

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

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR adds the execution_status method which returns the value of the 'event_status_type' enumeration.

@@ -202,3 +206,18 @@ cdef class SyclEventRaw(_SyclEventRaw):
"SyclEventRef",
&_event_capsule_deleter
)

def execution_status(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should be a read-only property.

In [2]: dpctl.SyclEventRaw().execution_status
Out[2]: <function SyclEventRaw.execution_status>

In [3]: dpctl.SyclEventRaw().execution_status()
Out[3]: <event_status_type.complete: 4>

So one would use In[2] rather than In[3].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def execution_status(self):
@property
def execution_status(self):

@oleksandr-pavlyk oleksandr-pavlyk merged commit 9343ca3 into IntelPython:refactor/SyclEvent Aug 13, 2021
vlad-perevezentsev added a commit to vlad-perevezentsev/dpctl that referenced this pull request Aug 23, 2021
@vlad-perevezentsev vlad-perevezentsev deleted the cython_getstatus branch June 20, 2023 10:54
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