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

Function complexAbs

tfjs-backend-webgpu/src/kernels/ComplexAbs.ts:35–50  ·  view source on GitHub ↗
(
    args: {inputs: ComplexAbsInputs, backend: WebGPUBackend})

Source from the content-addressed store, hash-verified

33}
34
35export function complexAbs(
36 args: {inputs: ComplexAbsInputs, backend: WebGPUBackend}): TensorInfo {
37 const {inputs, backend} = args;
38 const {x} = inputs;
39
40 const xData = backend.tensorMap.get(x.dataId);
41
42 const program = new ComplexAbsProgram(x.shape);
43 const programInputs = [
44 makeComplexComponentTensorInfo(x, xData.complexTensorInfos.real),
45 makeComplexComponentTensorInfo(x, xData.complexTensorInfos.imag),
46 ];
47
48 return backend.runWebGPUProgram(
49 program, programInputs, programInputs[0].dtype);
50}
51
52export const complexAbsConfig: KernelConfig = {
53 kernelName: ComplexAbs,

Callers

nothing calls this directly

Calls 3

runWebGPUProgramMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…