benchmark(run, dev, number = 10, repeat = 1) {
	        return __awaiter(this, void 0, void 0, function* () {
	            // Skip first run as it can involve GPU warmup and module loading time.
	            const perf = compact.getPerformance();
	            const results = [];
	            // run with new scope
	            this.withNewScope(run);
	            yield dev.sync();
	            for (let k = 0; k < repeat; ++k) {
	                const tstart = perf.now();
	                for (let i = 0; i < number; ++i) {
	                    this.withNewScope(run);
	                }
	                yield dev.sync();
	                const tend = perf.now();
	                results.push((tend - tstart) / number);
	            }
	            return results;
	        });
	    }
Benchmark stable execution of the run function.

@params run The run function
@params dev The device to sync during each run.
@number The number of times to compute the average.
@repeat The number of times to repeat the run.