MCPcopy Index your code
hub / github.com/apache/tvm / sync

Method sync

web/src/webgpu.ts:504–514  ·  view source on GitHub ↗

* Wait for all pending GPU tasks to complete

()

Source from the content-addressed store, hash-verified

502 * Wait for all pending GPU tasks to complete
503 */
504 async sync(): Promise<void> {
505 // Flush any batched compute passes before waiting on the queue.
506 this.flushCommands();
507 if (this.pendingGPUToCPUCopy) {
508 const p = this.pendingGPUToCPUCopy;
509 this.pendingGPUToCPUCopy = null;
510 await p;
511 } else {
512 await this.device.queue.onSubmittedWorkDone();
513 }
514 }
515
516 /**
517 * Obtain the runtime information in readable format.

Callers 1

initWebGPUMethod · 0.95

Calls 1

flushCommandsMethod · 0.95

Tested by

no test coverage detected