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

Function searchSorted

tfjs-backend-webgpu/src/kernels/SearchSorted.ts:23–37  ·  view source on GitHub ↗
(args: {
  inputs: SearchSortedInputs,
  backend: WebGPUBackend,
  attrs: SearchSortedAttrs
})

Source from the content-addressed store, hash-verified

21import {SearchSortedProgram} from '../search_sorted_webgpu';
22
23export 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
39export const searchSortedConfig: KernelConfig = {
40 kernelName: SearchSorted,

Callers

nothing calls this directly

Calls 1

runWebGPUProgramMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…