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

Method constructor

tfjs-backend-webgpu/src/softmax_webgpu.ts:29–39  ·  view source on GitHub ↗
(outputShape: number[])

Source from the content-addressed store, hash-verified

27 workgroupSize: [number, number, number];
28
29 constructor(outputShape: number[]) {
30 this.outputShape = outputShape; // [rows, cols]
31 this.dispatchLayout = flatDispatchLayout(this.outputShape);
32 this.dispatch = [this.outputShape[0], 1, 1];
33 if (this.outputShape[1] >= 4096) {
34 this.workgroupSize = [256, 1, 1];
35 } else {
36 this.workgroupSize = [64, 1, 1];
37 }
38 this.shaderKey = 'softmax';
39 }
40
41 getUserCode(): string {
42 const userCode = `

Callers

nothing calls this directly

Calls 1

flatDispatchLayoutFunction · 0.90

Tested by

no test coverage detected