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

Method deviceFreeDataSpace

web/src/webgpu.ts:924–936  ·  view source on GitHub ↗
(ptr: GPUPointer)

Source from the content-addressed store, hash-verified

922 }
923
924 private deviceFreeDataSpace(ptr: GPUPointer): void {
925 const idx = ptr;
926 const buffer = this.bufferTable[idx];
927 this.bufferTable[idx] = undefined;
928 assert(buffer !== undefined);
929 this.bufferTableFreeId.push(idx);
930 this.currAllocatedBytes -= buffer.size;
931 // Flush any pending compute passes that may reference this buffer
932 // before destroying it, otherwise queue.submit() will fail with
933 // "buffer used in submit while destroyed".
934 this.flushCommands();
935 buffer.destroy();
936 }
937
938 private deviceCopyToGPU(
939 from: Pointer,

Callers 1

getDeviceAPIMethod · 0.95

Calls 2

flushCommandsMethod · 0.95
assertFunction · 0.90

Tested by

no test coverage detected