MCPcopy Create free account
hub / github.com/tensorflow/tfjs / constructor

Method constructor

tfjs-backend-webgpu/src/concat_webgpu.ts:34–48  ·  view source on GitHub ↗
(shapes: Array<[number, number]>)

Source from the content-addressed store, hash-verified

32 offsetLength: number;
33
34 constructor(shapes: Array<[number, number]>) {
35 this.outputShape =
36 backend_util.computeOutShape(shapes, 1 /* axis */) as [number, number];
37 this.variableNames = shapes.map((_, i) => `T${i}`);
38 this.dispatchLayout = flatDispatchLayout(this.outputShape);
39 this.dispatch = computeDispatch(
40 this.dispatchLayout, this.outputShape, this.workgroupSize,
41 [this.workPerThread, 1, 1]);
42
43 this.offsetLength = shapes.length - 1;
44 for (let i = 0; i < this.offsetLength; i++) {
45 this.uniforms += `offset${i} : i32,`;
46 }
47 this.shaderKey = 'concat';
48 }
49
50 getUserCode(): string {
51 const snippets: string[] = [];

Callers

nothing calls this directly

Calls 2

flatDispatchLayoutFunction · 0.90
computeDispatchFunction · 0.90

Tested by

no test coverage detected