(outputShape: number[])
| 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 = ` |
nothing calls this directly
no test coverage detected