-
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
Proper DpctlSyclQueue support #963
Conversation
720deaf
to
84766b2
Compare
5789133
to
5b176d0
Compare
@mingjie-intel can you please review? |
I don't get the exact purpose of this PR. Does it adds some new functionality? Anyway, I don't see any tests for implemented code. E.g. |
7c9a4ff
to
0160b3b
Compare
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.
Looks good.
At this point there are no user-visible changes. It only changes the implementation inside numba-dpex of the The next set of changes to use the new type inside numba-dpex and avoid extra queue creation will be the next PR. The changes here should also make it simpler to implement the changes in your dpnp overload PR.
I am working on adding a test case. |
e0ddad8
to
9f06447
Compare
@AlexanderKalistratov I have added a unit test. Could you please review again? The test evaluates if the |
- The DpctlSyclQueue is no longer a numba OpaqueType. It is reimplemented as a StructType that stores the native queue_ref pointer and the parent PyObject pointer. - Introduce C runtime helper functions for boxing/unboxing a dpctl.SyclQueue
- Added a test to see if the Numba native object created for a dpctl.SyclQueue is usable inside the compiler. The test extracts the queue_ref pointer from the dpctl.SyclQueue PyObject during unboxing and stores it in a native struct. The test verifies that the queue_ref pointer is valid and can be passed to a C function call generated in the compiled LLVM module.
Proper DpctlSyclQueue support 46c09ff
Re-implementation of the
DpctlSyclQueue
type in numba-dpex.DpctlSyclQueue
is no longer a numbaOpaqueType
. It is reimplemented as aStructType
that stores the nativequeue_ref
pointer and the parentPyObject
pointer.dpctl.SyclQueue
Fixes #930