TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
pytorch_quantization.tensor_quant Namespace Reference

Classes

class  FakeAffineTensorQuantFunction
 
class  FakeTensorQuantFunction
 
class  ScaledQuantDescriptor
 
class  TensorQuantFunction
 

Functions

def _tensor_quant (inputs, amax, num_bits=8, unsigned=False, narrow_range=True)
 

Variables

 QuantDescriptor = ScaledQuantDescriptor
 
 QUANT_DESC_8BIT_PER_TENSOR = QuantDescriptor(num_bits=8)
 
 QUANT_DESC_UNSIGNED_8BIT_PER_TENSOR = QuantDescriptor(num_bits=8, unsigned=True)
 
 QUANT_DESC_8BIT_CONV1D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(0))
 
 QUANT_DESC_8BIT_CONV2D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(0))
 
 QUANT_DESC_8BIT_CONV3D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(0))
 
 QUANT_DESC_8BIT_LINEAR_WEIGHT_PER_ROW = QuantDescriptor(num_bits=8, axis=(0))
 
 QUANT_DESC_8BIT_CONVTRANSPOSE1D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(1))
 
 QUANT_DESC_8BIT_CONVTRANSPOSE2D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(1))
 
 QUANT_DESC_8BIT_CONVTRANSPOSE3D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(1))
 
 tensor_quant = amp.promote_function(TensorQuantFunction.apply)
 
 fake_tensor_quant = amp.promote_function(FakeTensorQuantFunction.apply)
 
 fake_affine_tensor_quant = amp.promote_function(FakeAffineTensorQuantFunction.apply)
 

Function Documentation

◆ _tensor_quant()

def pytorch_quantization.tensor_quant._tensor_quant (   inputs,
  amax,
  num_bits = 8,
  unsigned = False,
  narrow_range = True 
)
private
Shared function body between TensorQuantFunction and FakeTensorQuantFunction
Here is the caller graph for this function:

Variable Documentation

◆ QuantDescriptor

pytorch_quantization.tensor_quant.QuantDescriptor = ScaledQuantDescriptor

◆ QUANT_DESC_8BIT_PER_TENSOR

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_PER_TENSOR = QuantDescriptor(num_bits=8)

◆ QUANT_DESC_UNSIGNED_8BIT_PER_TENSOR

pytorch_quantization.tensor_quant.QUANT_DESC_UNSIGNED_8BIT_PER_TENSOR = QuantDescriptor(num_bits=8, unsigned=True)

◆ QUANT_DESC_8BIT_CONV1D_WEIGHT_PER_CHANNEL

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_CONV1D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(0))

◆ QUANT_DESC_8BIT_CONV2D_WEIGHT_PER_CHANNEL

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_CONV2D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(0))

◆ QUANT_DESC_8BIT_CONV3D_WEIGHT_PER_CHANNEL

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_CONV3D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(0))

◆ QUANT_DESC_8BIT_LINEAR_WEIGHT_PER_ROW

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_LINEAR_WEIGHT_PER_ROW = QuantDescriptor(num_bits=8, axis=(0))

◆ QUANT_DESC_8BIT_CONVTRANSPOSE1D_WEIGHT_PER_CHANNEL

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_CONVTRANSPOSE1D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(1))

◆ QUANT_DESC_8BIT_CONVTRANSPOSE2D_WEIGHT_PER_CHANNEL

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_CONVTRANSPOSE2D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(1))

◆ QUANT_DESC_8BIT_CONVTRANSPOSE3D_WEIGHT_PER_CHANNEL

pytorch_quantization.tensor_quant.QUANT_DESC_8BIT_CONVTRANSPOSE3D_WEIGHT_PER_CHANNEL = QuantDescriptor(num_bits=8, axis=(1))

◆ tensor_quant

pytorch_quantization.tensor_quant.tensor_quant = amp.promote_function(TensorQuantFunction.apply)

◆ fake_tensor_quant

pytorch_quantization.tensor_quant.fake_tensor_quant = amp.promote_function(FakeTensorQuantFunction.apply)

◆ fake_affine_tensor_quant

pytorch_quantization.tensor_quant.fake_affine_tensor_quant = amp.promote_function(FakeAffineTensorQuantFunction.apply)