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

Function int

tfjs-backend-webgpu/src/kernel_utils/int.ts:23–27  ·  view source on GitHub ↗
(input: TensorInfo, backend: WebGPUBackend)

Source from the content-addressed store, hash-verified

21import {UnaryOpProgram} from '../unary_op_webgpu';
22
23export function int(input: TensorInfo, backend: WebGPUBackend): TensorInfo {
24 const program = new UnaryOpProgram(input.shape, UnaryOpType.TO_INT);
25 const output = backend.runWebGPUProgram(program, [input], 'int32');
26 return {dataId: output.dataId, shape: output.shape, dtype: output.dtype};
27}

Callers 1

castFunction · 0.90

Calls 1

runWebGPUProgramMethod · 0.80

Tested by

no test coverage detected