@hoff97/tensor-js
Version:
PyTorch like deep learning inferrence library
30 lines (29 loc) • 1.15 kB
TypeScript
import { DTypeGpu, GPUTensorConstructor, GPUTensorI } from '../../../tensor/gpu/interface';
import { GPUMemoryAllocator } from '../../../tensor/gpu/memory';
import { Operation } from '../operation';
export interface MatMulInfo {
shapeA?: readonly number[];
widthA?: number;
heightA?: number;
shapeB?: readonly number[];
widthB?: number;
heightB?: number;
shapeOutput?: readonly number[];
widthOutput?: number;
heightOutput?: number;
}
export interface MatMulInput {
A: GPUTensorI;
B: GPUTensorI;
}
export declare class MatMulOperation<GPUTensor extends GPUTensorI> extends Operation<GPUTensor, MatMulInfo, MatMulInput> {
protected maxIterations: number;
constructor(tensorConstructor: GPUTensorConstructor<GPUTensor>, dtype: DTypeGpu, allocator?: GPUMemoryAllocator);
getFragmentShader(info: MatMulInfo): string;
getTextureNames(): string[];
calc(input: MatMulInput): GPUTensor;
getOutputShape(input: MatMulInput): readonly number[];
compile(info: MatMulInfo): void;
getCompilationInfo(input: MatMulInput): MatMulInfo;
getInputInfoString(input: MatMulInput): string;
}