/// <summary>
        /// Populate the cache with on device data.
        /// Blocking read if `blocking` is true (default)
        /// </summary>
        public bool PrepareCacheForAccess(bool blocking = true)
        {
            // non-blocking, schedule download for later
            if (!blocking && m_TensorOnDevice != null && m_Cache == null)
            {
                if (!m_TensorOnDevice.ScheduleAsyncDownload(length))
                {
                    return(false);
                }
            }

            // blocking, have to get data now!
            if (m_Cache == null)
            {
                if (m_TensorOnDevice != null)
                {
                    m_Cache = m_TensorOnDevice.Download(shape);
                }
                else
                {
                    m_Cache = new float[length];
                }
                m_CacheIsDirty = false;
            }

            return(true);
        }