A GPU buffer allocation was too small and the copy operation afterwards would use a larger size, leading to an error (CUDA_ERROR_INVALID_VALUE).