(args: {inputs: SelectInputs, backend: WebGPUBackend})
| 21 | import {SelectProgram} from '../select_webgpu'; |
| 22 | |
| 23 | export function select(args: {inputs: SelectInputs, backend: WebGPUBackend}): |
| 24 | TensorInfo { |
| 25 | const {inputs, backend} = args; |
| 26 | const {condition, t, e} = inputs; |
| 27 | |
| 28 | const program = |
| 29 | new SelectProgram(condition.shape.length, t.shape, t.shape.length); |
| 30 | return backend.runWebGPUProgram( |
| 31 | program, [condition, t, e], upcastType(t.dtype, e.dtype)); |
| 32 | } |
| 33 | |
| 34 | export const selectConfig: KernelConfig = { |
| 35 | kernelName: Select, |
nothing calls this directly
no test coverage detected
searching dependent graphs…