Interface TensorFromGpuBufferOptions<T>

interface TensorFromGpuBufferOptions<T> {
    dataType?: T;
    dims: readonly number[];
    dispose?(): void;
    download?(): Promise<DataTypeMap[T]>;
}

Type Parameters

Hierarchy

  • Pick<Tensor, "dims">
  • GpuResourceConstructorParameters<T>
    • TensorFromGpuBufferOptions

Properties

Methods

Properties

dataType?: T

Describes the data type of the tensor.

dims: readonly number[]

Get the dimensions of the tensor.

Methods

  • an optional callback function that will be called when the tensor is disposed.

    If not provided, the tensor treat the GPU data as external resource.

    Returns void

  • an optional callback function to download data from GPU to CPU.

    If not provided, the tensor treat the GPU data as external resource.

    Returns Promise<DataTypeMap[T]>

Generated using TypeDoc