What are the initialised values of numba.cuda.device_array()?

The documentation for creating an empty array on the GPU with numba.cuda.device_array() describes the function as:

Allocate an empty device ndarray. Similar to numpy.empty().

From my own tests the created CUDA array is filled with zeros, which is unlike the behaviour of numpy.empty() that fills an array “without initializing entries”.

What are the initialised values of the array produced by numba.cuda.device_array()? Can I rely on them being zero every time?

PS I am unable to to include links to relevant documentations.

IIRC memory allocated with cuMemAlloc (which Numba’s default memory manager uses under the hood) is scrubbed for security reasons (i.e. not leaking information between users / processes).

However, this can’t be relied on in general because an external memory manager might be in use, which could well be providing allocations from a pool - there is nothing to prevent a pool allocator from reusing portions of the pool that have become non-zero.