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 (: |
7caf072 to
7d8767e
Compare
| } | ||
| } | ||
|
|
||
| // Bind queue::copy with uint8_t so Count is interpreted as bytes. |
There was a problem hiding this comment.
nit of all nits:
this comment is accurate but made me do a doubletake on re-reading the code, because the grammar is a bit unclear: it's saying that we will use sycl_queue::copy with uint8_t so that count is the number of bytes. Saying Count is interpreted as bytes can easily be thought of as instead reinterpreting Count into bytes
just a simple rephrasing would do for both comments
| SyclQueue q, | ||
| object dst, | ||
| object src, | ||
| size_t byte_count, |
There was a problem hiding this comment.
the queue::copy is equivalent to handler::copy, which says in the table:
Copies count elements of type T from the pointer src to the pointer dest.
this means that count is expected to be an element count, not a byte count. It's only a byte count for byte-sized data.
Perhaps the best way to approach this: do not allow dtype to be None (including in the copy function itself), and just default dtype to "u1" for uint8_t, making it clear for users that in the default case, you are copying bytes
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!