]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
Added a cudaMemcpy2DAsync fast path to ggml_cuda_cpy (llama/25057)
authorGaurav Garg <redacted>
Sat, 27 Jun 2026 12:16:21 +0000 (17:46 +0530)
committerGeorgi Gerganov <redacted>
Fri, 10 Jul 2026 10:06:42 +0000 (13:06 +0300)
commit868367609fee2ac579b4befb142c4a05c9a68a72
treee44357c79a1173e22f9c059c1e582c23cdf08686
parenta4ac1c0369528779be436dd707682307258b4ea0
Added a cudaMemcpy2DAsync fast path to ggml_cuda_cpy (llama/25057)

* [CUDA] Added a cudaMemcpy2DAsync fast path to ggml_cuda_cpy

Add a CUDA ggml_cpy fast path for same-type, same-shape strided copies that are just 2D pitched block copies.
When tensors are not fully contiguous but each row is contiguous, it now uses cudaMemcpy2DAsync instead of the slow element-wise scalar copy kernel.

This fixes the GDN recurrent snapshot update with -np 4, where rollback slots are separated by cache stride gaps.

* Add new tests that execute the new optimized strided copy path

* Return unsupported for strided copy in OpenVINO, as new tests are failing
ggml/src/ggml-cuda/cpy.cu
ggml/src/ggml-openvino/ggml-openvino.cpp