Help wanted: CUDA error: an illegal memory access was encountered

No, the download! call is synchronizing and catches whatever errors might have happened before.

Try removing @inbounds and running with CUDAnative/CuArrays master branches, they will report exceptions with accurate stack traces. Or run under cuda-memcheck.