(args: {
inputs: SearchSortedInputs,
backend: WebGPUBackend,
attrs: SearchSortedAttrs
})
| 21 | import {SearchSortedProgram} from '../search_sorted_webgpu'; |
| 22 | |
| 23 | export function searchSorted(args: { |
| 24 | inputs: SearchSortedInputs, |
| 25 | backend: WebGPUBackend, |
| 26 | attrs: SearchSortedAttrs |
| 27 | }): TensorInfo { |
| 28 | const {inputs, backend, attrs} = args; |
| 29 | const {sortedSequence, values} = inputs; |
| 30 | const {side} = attrs; |
| 31 | |
| 32 | const program = |
| 33 | new SearchSortedProgram([values.shape[0], values.shape[1]], side); |
| 34 | const uniformData = [{type: 'int32', data: [sortedSequence.shape[1]]}]; |
| 35 | return backend.runWebGPUProgram( |
| 36 | program, [sortedSequence, values], 'int32', uniformData); |
| 37 | } |
| 38 | |
| 39 | export const searchSortedConfig: KernelConfig = { |
| 40 | kernelName: SearchSorted, |
nothing calls this directly
no test coverage detected
searching dependent graphs…