-
Notifications
You must be signed in to change notification settings - Fork 29
Sycl wrappers #30
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
Sycl wrappers #30
Conversation
5dcf799
to
3af9b6e
Compare
c2479a0
to
7c325f1
Compare
…erfaces. - Separates out the queue manager from the sycl queue interface wrapper. - Added API to get context, device froma Sycl queue. - Added C-API wrappers for sycl device, queue, context interfaces exposing some of the API functionalities. More can be added as needed. - The dppl extension now defines extension types for sycl quque, device, context to mimic the C API. - Sycl queues are now returned to callers as a SyclQueue extension type rather than a Py_capsule.
7c325f1
to
5d81879
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.
DPPL_API
missings are most important. Please, modify and I will check on Windows.
In other places I am expecting only comments on my review notes.
In the whole looks good for me.
|
||
void error_reporter (const std::string & msg) | ||
{ | ||
throw std::runtime_error("Error: " + msg); |
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.
If the library provides C interface then all exceptions should not cross the boundary of C API. So all exceptions must be caught inside the library.
Just a point to discuss. Write your thoughts please if you are disagree.
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.
Again #35
New line at EOF.
This PR adds wrappers for sycl::context and sycl::device classes. In addition, the Sycl queue manager is separated out from the wrapper for sycl::queue. In the Cython extension, we now have three new extension types: SyclQueue, SyclDevice, SyclContext. The SyclQueue class replaces the previous use of a Py_Capsule to store the DPPLSyclQueueRef pointer.
The changes in this PR lay the groundwork for adding the next set of changes needed to move Numba from OpenCL to Sycl.
Still needs unit tests and more documentation, but is otherwise ready for review.