bug in cudaMemcpy3D bound checking?

When the destination array is smaller than the source array, cudaMemcpy3D() seems to check the source indices against the size of the destination array, potentially resulting in an error even if all indices involved in the copy operation fit into the allocated ranges. The attached file demonstrates the problem. Am I missing something obvious, or is this indeed a bug in cudaMemcpy3D?

My system:
Linux openSUSE-11.0 x86_64
Kernel 2.6.25.11
GeForce 8800 GTX
NVidia driver 177.13
CUDA-2.0beta2

Thanks & kind regards,
Markus
array.cpp (2.09 KB)

Could somebody at NVidia please comment on this? This issue actually renders the cudaMemcpy3D function useless when copying data between CUDA arrays of different size.

Thanks & kind regards,
Markus

The bug still exists in the final CUDA-2.0 release, verified on the following platforms:

*) Windows XP Professional 32bit
*) openSUSE-11.0 32bit
*) openSUSE-11.0 64bit

Is there any workaround (besides copying the data to linear memory and back to the smaller array)?

Thanks & kind regards,
Markus

I just checked with the new Linux driver 177.80 (openSUSE-11.0, x86_64), cudaMemcpy3D() is still broken. Is this a deprecated function? If it is, what should be used instead?

Kind regards,

Markus