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