import { backend_util, TensorInfo } from '@tensorflow/tfjs-core';
import { WebGPUProgram } from '@tensorflow/tfjs-backend-webgpu/dist/webgpu_program';
import { WebGPUBackend } from '@tensorflow/tfjs-backend-webgpu';
import { DeviceInformation } from './deviceInfo';
export interface ReduceParams {
    reductionOp: 'mean' | 'sum';
    elementwise?: boolean;
    forceWorkgroupSize?: number;
}
export declare function createReduceInfo(inputs: TensorInfo[], axis: number | number[]): backend_util.ReduceInfo;
export declare class ReduceProgram implements WebGPUProgram {
    atomic: boolean;
    outputShape: number[];
    shaderKey: string;
    dispatchLayout: {
        x: number[];
    };
    dispatch: [number, number, number];
    workgroupSize: [number, number, number];
    variableNames: string[];
    uniforms: string;
    inputShape: number[];
    size: boolean;
    packed: boolean;
    outputComponent: number;
    variableComponents?: number[];
    elementwise: boolean;
    subgroups: boolean;
    subgroupBuiltins: boolean;
    deviceInfo: DeviceInformation;
    params: ReduceParams;
    utilityFunctions?: string;
    constructor(deviceInfo: DeviceInformation, reduceInfo: backend_util.ReduceInfo, params: ReduceParams, packed: boolean);
    protected getWriteSnippet(): string;
    protected getPreprocessSnippet(): string;
    protected getPostprocessSnippet(): string;
    protected getReadSnippet(): string;
    getUserCode(): string;
}
export declare function reduce(program: ReduceProgram, inputs: TensorInfo[], backend: WebGPUBackend, extraUniforms?: {
    type: string;
    data: number[];
}[], output?: TensorInfo): TensorInfo;
