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

Method flushCommands

web/src/webgpu.ts:468–477  ·  view source on GitHub ↗

* Flush all pending compute passes by finishing and submitting the * accumulated command encoder. * * Must be called before: * - GPU→CPU readback (deviceCopyFromGPU) * - CPU→GPU writes (deviceCopyToGPU, copyRawBytesToBuffer) * - GPU↔GPU copies (deviceCopyWithinGPU) * - Buffer de

()

Source from the content-addressed store, hash-verified

466 * - Queue sync (sync)
467 */
468 flushCommands(): void {
469 if (this.pendingEncoder) {
470 this.device.queue.submit([this.pendingEncoder.finish()]);
471 this.pendingEncoder = null;
472 this.pendingDispatchCount = 0;
473 // A compute submission is now the last queue operation, so the
474 // GPU→CPU copy fast path in sync() is no longer valid.
475 this.pendingGPUToCPUCopy = null;
476 }
477 }
478
479 /**
480 * Dispose context.

Callers 8

disposeMethod · 0.95
syncMethod · 0.95
copyRawBytesToBufferMethod · 0.95
submitShaderMethod · 0.95
deviceFreeDataSpaceMethod · 0.95
deviceCopyToGPUMethod · 0.95
deviceCopyFromGPUMethod · 0.95
deviceCopyWithinGPUMethod · 0.95

Calls 2

submitMethod · 0.80
finishMethod · 0.80

Tested by

no test coverage detected