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

Method toRawBytes

web/src/runtime.ts:671–676  ·  view source on GitHub ↗

* Return a copied Uint8Array of the raw bytes in the Tensor. * @returns The result array.

()

Source from the content-addressed store, hash-verified

669 * @returns The result array.
670 */
671 toRawBytes(): Uint8Array {
672 if (this.device.deviceType != DeviceStrToEnum.cpu) {
673 throw new Error("Can only sync copy CPU array, use cpu_arr.copyfrom(gpu_arr) then sync instead.");
674 }
675 return this.ctx.tensorCopyToJSBytes(this) as Uint8Array;
676 }
677
678 /**
679 * Return a TypedArray copy of the Tensor, the specific type depends on

Callers 1

toArrayMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected