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

Method constructor

tfjs-backend-webgpu/src/top_k_webgpu.ts:41–49  ·  view source on GitHub ↗
(shape: number[])

Source from the content-addressed store, hash-verified

39 size = true;
40
41 constructor(shape: number[]) {
42 this.outputShape = shape;
43 this.dispatchLayout = flatDispatchLayout(this.outputShape);
44 this.dispatch = computeDispatch(
45 this.dispatchLayout, this.outputShape, this.workgroupSize);
46 this.uniforms = `inputSize : i32, firstPass : i32, negativeInf : f32,
47 dir : i32, inc : i32,`;
48 this.shaderKey = 'swap';
49 }
50
51 getUserCode(): string {
52 const userCode = `

Callers

nothing calls this directly

Calls 2

flatDispatchLayoutFunction · 0.90
computeDispatchFunction · 0.90

Tested by

no test coverage detected