MCPcopy Index your code
hub / github.com/tensorflow/tfjs / select

Function select

tfjs-backend-webgpu/src/kernels/Select.ts:23–32  ·  view source on GitHub ↗
(args: {inputs: SelectInputs, backend: WebGPUBackend})

Source from the content-addressed store, hash-verified

21import {SelectProgram} from '../select_webgpu';
22
23export 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
34export const selectConfig: KernelConfig = {
35 kernelName: Select,

Callers

nothing calls this directly

Calls 2

upcastTypeFunction · 0.90
runWebGPUProgramMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…