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
[SYCL][CUDA] Don't infer memcpy src/dst pitches from copied region (intel#3563)
Previously, when passing 0 for row/slice pitches for source and/or
destination to `commonEnqueueMemBufferCopyRect`, the function would
infer the row/slice pitches from the copied region.
This does not work when copying with an offset, as `cuMemcpy3DAsync`
checks whether the pitches are at least as large as the offset + copied
range, otherwise returning CUDA_ERROR_INVALID_VALUE.
For 1D / 2D copies, no / not all pitches are required, and can instead
be specified as 0. The mechanism is thus removed and replaced with
assertions to check that for 2D and 3D copies, non-zero pitches are
provided.
In some situations, a zero row/slice pitch is passed for source and/or
destination to `commonEnqueueMemBufferCopyRect`. In this case, the
pitches are inferred from the copied region. However, if source and/or
destination have offsets in the x or y dimension, those must be taken
into account as well (CUDA checks this, and will otherwise return
`CUDA_ERROR_INVALID_VALUE`).
0 commit comments