-
Notifications
You must be signed in to change notification settings - Fork 29
Implementing USM memory management #34
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
… the class to use.
…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.
New line at EOF.
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.
Main: pass context to Memory constructor.
dppl/_memory.pyx
Outdated
if (ptr_type == "shared"): | ||
p = DPPLmalloc_shared(nbytes, q.get_queue_ref()) | ||
elif (ptr_type == "host"): | ||
p = DPPLmalloc_host(nbytes, q.get_queue_ref()) | ||
elif (ptr_type == "device"): | ||
p = DPPLmalloc_device(nbytes, q.get_queue_ref()) |
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.
Need better solution. Polymorphism?
@@ -0,0 +1,106 @@ | |||
##===------------- backend.pyx - DPPL interface ------*- Cython -*-------===## |
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.
New name for the file needed.
} | ||
|
||
extensions = [ | ||
Extension('dppl._sycl_core', [os.path.abspath('dppl/sycl_core.pyx'),], |
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.
Rename sycl_core.pyx
to _sycl_core.pyx
. #38
@diptorupd I have fixed all critical remarks. Could you please review it? |
Looks good. Thanks :). Let's merege |
Closes #27.
Cython module created.
Need refactoring for matching new requirements.
Contains changes from #30.