MCPcopy
hub / github.com/tensorflow/tfjs / WebGPUProgram

Interface WebGPUProgram

tfjs-backend-webgpu/src/webgpu_program.ts:27–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27export interface WebGPUProgram {
28 // Whether to use atomic built-in functions.
29 atomic?: boolean;
30 // dispatch specifies geometry of thread groups - derived from dispatchLayout.
31 dispatch: [number, number, number];
32 // dispatchLayout enumerates how tensor dimensions are distributed among
33 // dispatch x,y,z dimensions.
34 dispatchLayout: {x: number[], y?: number[], z?: number[]};
35 // By default, the output data component is 1.
36 outputComponent?: number;
37 outputShape: number[];
38 pixelsOpType?: PixelsOpType;
39 // The unique key to distinguish different shader source code.
40 shaderKey: string;
41 // Whether to use output size for bounds checking.
42 size?: boolean;
43 uniforms?: string;
44 variableNames: string[];
45 // Describe each variable's component and must have one-one mapping with
46 // variableNames. If not set, all variables component will be same with output
47 // component member.
48 variableComponents?: number[];
49 // workgroupSize.x * workgroupSize.y * workgroupSize.z = the number of threads
50 // in a thread group. Individual dimensions determines thread layout within
51 // the group.
52 workgroupSize: [number, number, number];
53 // Size of register cache in one dimension (assumes square cache).
54 // Each thread writes to workPerThread * workPerThread locations in the output
55 // buffer.
56 workPerThread?: number;
57 pipeline?: GPUComputePipeline|Promise<GPUComputePipeline>;
58 getUserCode: () => string;
59}
60
61export const compileProgram =
62 (device: GPUDevice, program: WebGPUProgram, inputsData: InputInfo[],

Callers

nothing calls this directly

Implementers 15

ResizeNearestNeigborBackpropProgramtfjs-backend-webgpu/src/resize_nearest
PoolWithFilterSizeEqualsOneProgramtfjs-backend-webgpu/src/pool_filtersiz
TransformProgramtfjs-backend-webgpu/src/transform_webg
ReduceProgramtfjs-backend-webgpu/src/reduce_webgpu.
ArgMinMaxProgramtfjs-backend-webgpu/src/argminmax_webg
StridedSliceProgramtfjs-backend-webgpu/src/strided_slice_
FlipLeftRightProgramtfjs-backend-webgpu/src/flip_left_righ
Dilation2DBackpropInputProgramtfjs-backend-webgpu/src/dilation_backp
Dilation2DBackpropFilterProgramtfjs-backend-webgpu/src/dilation_backp
GatherProgramtfjs-backend-webgpu/src/gather_webgpu.
OneHotProgramtfjs-backend-webgpu/src/onehot_webgpu.
UnaryOpProgramtfjs-backend-webgpu/src/unary_op_webgp

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…