-
Notifications
You must be signed in to change notification settings - Fork 30
Add wrapper for SYCL queue::memcpy(). #70
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
@@ -63,3 +63,4 @@ cdef class SyclQueue: | |||
cpdef SyclContext get_sycl_context (self) | |||
cpdef SyclDevice get_sycl_device (self) | |||
cdef DPPLSyclQueueRef get_queue_ref (self) | |||
cpdef memcpy (self, dest, src, int count) |
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.
Did you mean cdef
?
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.
For c
part of cpdef
to be efficient, dest
and src
need have type declarations. Looks like they can only be Memory
objects.
The method does not use self
at all, so should it be a static method of the class?
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.
The method uses self
in code DPPLQueue_memcpy(self.queue_ptr, c_dest, c_src, count)
.
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.
Perhaps it would be better to not expose memcpy
as a stand-alone symbol, but rather make it two method copyto
and copyfrom
of Memory
object. That way it could copy to/from another Memory object, or host memory of any object that supports a buffer protocol.
The It would make sense for But we still need a way to copy data from one
|
@oleksandr-pavlyk Additional features will be inpmelemted in another PR. The issue for it: #76 |
@oleksandr-pavlyk @PokhodenkoSA With the remaining enhancement being tracked in #76 can we merge this as it stands right now? |
Lets merge it. |
No description provided.