(
{inputs, attrs, backend}:
{inputs: UnaryInputs, attrs: StepAttrs, backend: WebGPUBackend})
| 22 | import {UnaryOpProgram} from '../unary_op_webgpu'; |
| 23 | |
| 24 | export function step( |
| 25 | {inputs, attrs, backend}: |
| 26 | {inputs: UnaryInputs, attrs: StepAttrs, backend: WebGPUBackend}): |
| 27 | TensorInfo { |
| 28 | const {x} = inputs; |
| 29 | const program = |
| 30 | new UnaryOpProgram(x.shape, UnaryOpType.STEP, 'stepAlpha : f32,'); |
| 31 | const uniformData = [{type: 'float32', data: [attrs.alpha]}]; |
| 32 | return backend.runWebGPUProgram(program, [x], x.dtype, uniformData); |
| 33 | } |
| 34 | |
| 35 | export const stepConfig: KernelConfig = { |
| 36 | kernelName: Step, |
nothing calls this directly
no test coverage detected
searching dependent graphs…