Sometimes I find that when I read device memory back to the host, that the last so many elements of the array are zeros, like it failed to read all the memory. Has anyone experienced this or know what might be causing it?
I thought maybe I had to restrict buffer size to < MAX_MEM_ALLOC_SIZE, but I’ve had this happen when the buffer size is less than this value.