asyncLoadWebGPUPiplines(mod) {
	        return __awaiter(this, void 0, void 0, function* () {
	            if (this.lib.webGPUContext == undefined)
	                throw Error("WebGPU not initialied");
	            const webgpuContext = this.lib.webGPUContext;
	            this.beginScope();
	            const fmap_str = mod.getFunction("webgpu.get_fmap", true)();
	            let fmap = JSON.parse(fmap_str);
	            fmap.length;
	            const fGetShader = this.detachFromCurrentScope(mod.getFunction("webgpu.get_shader"));
	            const fUpdatePrebuild = this.detachFromCurrentScope(mod.getFunction("webgpu.update_prebuild"));
	            this.endScope();
	            const perf = compact.getPerformance();
	            const tstart = perf.now();
	            let tlastReport = tstart;
	            let finishCounter = 0;
	            const fmapEntries = Object.entries(fmap);
	            let allEvents = Promise.resolve();
	            for (const [key, finfo] of fmapEntries) {
	                const code = fGetShader(key);
	                support.assert(key == finfo.name);
	                const event = webgpuContext.createShaderAsync(finfo, code).then((func) => {
	                    this.beginScope();
	                    fUpdatePrebuild(key, func);
	                    this.endScope();
	                }).then(() => {
	                    finishCounter += 1;
	                    const tend = perf.now();
	                    // skip report if gap is smaller than 1000
	                    if ((tend - tlastReport) < 1000 && finishCounter != fmapEntries.length) {
	                        return;
	                    }
	                    tlastReport = tend;
	                    const timeElapsed = Math.ceil((perf.now() - tstart) / 1000);
	                    // report
	                    for (let j = 0; j < this.initProgressCallback.length; ++j) {
	                        const progress = finishCounter / fmapEntries.length;
	                        let text = "Loading GPU shader modules [" + finishCounter + "/" + fmapEntries.length + "]: ";
	                        text += Math.floor(progress * 100).toString() + "% complete (";
	                        text += timeElapsed + " secs)";
	                        this.initProgressCallback[j]({
	                            progress: progress,
	                            timeElapsed: timeElapsed,
	                            text: text
	                        });
	                    }
	                });
	                allEvents = Promise.all([allEvents, event]).then(() => { });
	            }
	            yield allEvents;
	            support.assert(finishCounter == fmapEntries.length);
	        });
	    }
Asynchrously load webgpu pipelines when possible.
@param mod The input module.