task: syclqueue.copy() method#2273
Conversation
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2273/index.html |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_50 ran successfully. |
1e48eb4 to
ae492b5
Compare
16cfb22 to
36cddbc
Compare
36cddbc to
4a0516d
Compare
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_51 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_52 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_53 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_50 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_51 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_52 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_50 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_51 ran successfully. |
|
@antonwolfy @ndgrigorian @vlad-perevezentsev ready for review |
|
Array API standard conformance tests for dpctl=0.22.0dev1=py310h93fe807_51 ran successfully. |
|
@jharlow-intel |
|
@ndgrigorian merged master into this branch, let me know what else you might need to help push this review along |
|
@ndgrigorian @antonwolfy ping (: |
| return ERef | ||
|
|
||
|
|
||
| cdef DPCTLSyclEventRef _copy_impl( |
There was a problem hiding this comment.
this and _memcpy_impl are effectively the same thing, but one calls C-API for sycl_queue::copy and the other sycl_queue::memcpy. It may be worth considering if we can refactor even more, passing the function pointers to an impl func
|
|
||
| return SyclEvent._create(ERef) | ||
|
|
||
| cpdef copy(self, dest, src, size_t count): |
There was a problem hiding this comment.
one of the advantages of copy vs memcpy is that copy permits typed pointers instead of only void.
We could have an optional arg that passes a numpy style dtype str (see WorkGroupMemory implementation) and checks that both pointers are appropriately sized within the type itself, before passing the the void ptr copies
If not in this PR, a TODO for it would be nice, as somewhere down the line I believe we need dpctl.dtype/dpctl.types to handle our various typing issues on Cython/Python level
This PR adds the python interface to the sycl runtimes copy methods and tests. I tried to follow the format of memcpy best I could
I used an LLM primarily to generate this, and then reviewed it and tweaked it by hand. My first time contributing a new method to DPCTL so apologies if I overlooked some obvious mistakes in it. I'm here to learn!