MCPcopy Create free account
hub / github.com/apache/tvm / dispose

Method dispose

web/src/webgpu.ts:482–498  ·  view source on GitHub ↗

* Dispose context.

()

Source from the content-addressed store, hash-verified

480 * Dispose context.
481 */
482 dispose() {
483 this.flushCommands();
484 this.canvasRenderManager?.dispose();
485 this.bufferTableFreeId = [];
486 while (this.bufferTable.length != 0) {
487 this.bufferTable.pop()?.destroy();
488 }
489 for (const buf of this.uniformBufferPool) {
490 buf.destroy();
491 }
492 this.uniformBufferPool.length = 0;
493 this.uniformBufferPoolSizes.length = 0;
494 while (this.readStagingBufferPool.length != 0) {
495 this.readStagingBufferPool.pop()?.buffer.destroy();
496 }
497 this.device.destroy();
498 }
499
500
501 /**

Callers

nothing calls this directly

Calls 2

flushCommandsMethod · 0.95
popMethod · 0.45

Tested by

no test coverage detected