-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature/add python object createion for unboxing sycl event and queue #1193
Feature/add python object createion for unboxing sycl event and queue #1193
Conversation
91e6a57
to
cccf948
Compare
cccf948
to
45c189d
Compare
b = func(a) | ||
|
||
assert b is not None | ||
assert b.sycl_queue is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also be able to assert b.sycl_queue == a.sycl_queue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fail then. I don't know how to add just one assert as expected failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why will it fail? The __eq__
of the dpctl.SyclQueue
class just calls the DPCTLQueue_Equal
function that should evaluate to true if the qref
pointers point to the same underlying sycl::queue
object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must be more specific. It suppose to be same object. Marked test as XFAIL.
|
||
assert q is not None | ||
assert isinstance(q, SyclQueue) | ||
assert id(q) == id(arr.sycl_queue) # this must work after dpjit fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the last assert is xfail right? The other asserts should pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, is there a way to achieve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will have to write two separate test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been thinking about what test should actually check and updated tests a little bit. So this one is always pass, and another one is failing. Thx
45c189d
to
159c698
Compare
57885a0
to
f46e145
Compare
a = dpnp.empty(10) | ||
b = func(a) | ||
|
||
assert a.sycl_queue == b.sycl_queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…reateion_for_unboxing_sycl_event_and_queue Feature/add python object createion for unboxing sycl event and queue ac05c1a
Add python object creation if
dpctl.SyclEvent
ordpctl.SyclQueue
where allocated in dpjit function.Closes: #1181
Closes: #1182
Closes: #1183