fetchNDArrayCacheInternal(ndarrayCacheUrl, list, device) {
	        return __awaiter(this, void 0, void 0, function* () {
	            const perf = compact.getPerformance();
	            let tstart = perf.now();
	            let totalBytes = 0;
	            for (let i = 0; i < list.length; ++i) {
	                totalBytes += list[i].nbytes;
	            }
	            let fetchedBytes = 0;
	            let timeElapsed = 0;
	            const reportCallback = (iter) => {
	                // report
	                for (let j = 0; j < this.initProgressCallback.length; ++j) {
	                    let text = "Loading model [" + iter + "/" + list.length + "]: ";
	                    text += Math.ceil(fetchedBytes / (1024 * 1024)).toString() + " MB, ";
	                    text += Math.floor(fetchedBytes * 100 / totalBytes).toString() + "% complete (";
	                    text += timeElapsed + " secs)";
	                    this.initProgressCallback[j]({
	                        progress: fetchedBytes / totalBytes,
	                        timeElapsed: timeElapsed,
	                        text: text
	                    });
	                }
	            };
	            for (let j = 0; j < this.initProgressCallback.length; ++j) {
	                this.initProgressCallback[j]({
	                    progress: fetchedBytes / totalBytes,
	                    timeElapsed: 0,
	                    text: "Start to fetch params",
	                });
	            }
	            const cache = yield caches.open("tvmjs");
	            for (let i = 0; i < list.length; ++i) {
	                reportCallback(i);
	                fetchedBytes += list[i].nbytes;
	                const dataUrl = new URL(list[i].dataPath, ndarrayCacheUrl).href;
	                const request = new Request(dataUrl);
	                let buffer;
	                try {
	                    // use native cache
	                    let result = yield cache.match(request);
	                    if (result === undefined) {
	                        yield cache.add(request);
	                        result = yield cache.match(request);
	                    }
	                    if (result == undefined) {
	                        this.env.logger("Error: Cannot cache " + dataUrl + ", reloading will be slow");
	                        result = yield fetch(request);
	                    }
	                    buffer = yield result.arrayBuffer();
	                }
	                catch (err) {
	                    this.env.logger("Error: Cannot fetch " + dataUrl + " err= " + err);
	                    throw err;
	                }
	                const shardRecords = list[i].records;
	                for (let j = 0; j < shardRecords.length; ++j) {
	                    const rec = shardRecords[j];
	                    const cpu_arr = this.withNewScope(() => {
	                        return this.detachFromCurrentScope(this.empty(rec.shape, rec.dtype, this.cpu()));
	                    });
	                    const recSource = buffer.slice(rec.byteOffset, rec.byteOffset + rec.nbytes);
	                    // first sync copy to cpu.
	                    this.ctx.arrayDecodeStorage(cpu_arr, new Uint8Array(recSource), rec.format);
	                    // then async stream into GPU if needed
	                    if (device.deviceType == DeviceStrToEnum.cpu) {
	                        this.ndarrayCacheUpdate(rec.name, cpu_arr, false);
	                        cpu_arr.dispose();
	                    }
	                    else {
	                        // allocate a gpu arr and async copy to it.
	                        const gpu_arr = this.withNewScope(() => {
	                            return this.detachFromCurrentScope(this.empty(rec.shape, rec.dtype, device));
	                        });
	                        gpu_arr.copyFrom(cpu_arr);
	                        yield device.sync();
	                        this.ndarrayCacheUpdate(rec.name, gpu_arr, false);
	                        cpu_arr.dispose();
	                        gpu_arr.dispose();
	                    }
	                }
	                timeElapsed = Math.ceil((perf.now() - tstart) / 1000);
	            }
	            reportCallback(list.length);
	        });
	    }
Fetch list of NDArray into the NDArrayCache.

@param ndarrayCacheUrl The cache url.
@param list The list of array data.
@param device The device to store the data to.