You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2373757
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cuda.core): add HOST_COPY_FN and pack_host_copy_args for GIL-free host copies (#3269)
* feat(cuda.core): add HOST_COPY_FN and pack_host_copy_args
HOST_COPY_FN is a CUhostFn that memcpys without the GIL.
pack_host_copy_args packs (dst, src, nbytes) and checks bounds, host
accessibility of Buffer memory resources, null addresses, and overlap
without calling the driver. The host callback resolver rejects
HOST_COPY_FN without a packed record.
* docs(cuda.core): document HOST_COPY_FN
Covers the shared per-context host function thread and chunk sizing.
* examples(cuda.core): add a chunked device-to-NumPy copy with HOST_COPY_FN
* fix(cuda.core): reject bool and scalar addresses in pack_host_copy_args
True packed as address 1, and a NumPy integer scalar or a ctypes scalar
exports the buffer protocol, so it packed the address of its own storage
instead of the address it holds. Raise TypeError and point to int(addr).
* docs(cuda.core): annotate pack_host_copy_args and complete its docs
Annotate dst and src as Buffer.fill does. List OverflowError, say a
bytearray must not be resized before the copy runs, and replace the Notes
claim that a host callback can enqueue work, which host_launch forbids.
Document the HOST_COPY_FN record error on the host callback update methods.
* test(cuda.core): extend pack_host_copy_args coverage
Pin the GPU-free path for a Buffer without a memory resource, cover the
src > dst overlap and its adjacent boundary, and check OverflowError for
out-of-range int addresses as well as nbytes.
0 commit comments