MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / fake_tensor_quant

Function fake_tensor_quant

tools/pytorch-quantization/src/tensor_quant.cpp:33–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33at::Tensor fake_tensor_quant(at::Tensor inputs, at::Tensor amax, int num_bits = 8,
34 bool is_unsigned = false, bool narrow_range = true) {
35 TORCH_CHECK(inputs.is_cuda());
36 TORCH_CHECK(amax.numel(), 1);
37 return fake_tensor_quant_cuda(inputs.contiguous(), amax.contiguous(), num_bits, is_unsigned, narrow_range);
38}
39
40at::Tensor fake_tensor_quant_with_axis(at::Tensor inputs, at::Tensor amax, int axis,
41 int num_bits = 8, bool is_unsigned = false,

Callers 2

_compute_amax_mseFunction · 0.90
_quant_forwardMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected