We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18b6455 commit 6d8023cCopy full SHA for 6d8023c
py/torch_tensorrt/dynamo/conversion/impl/quantize.py
@@ -66,7 +66,7 @@ def quantize(
66
if not isinstance(amax, trt.ITensor):
67
amax = to_torch(amax, None)
68
scale = torch.divide(amax, max_bound)
69
- scale = get_trt_tensor(ctx, scale, name + "_scale")
+ scale = get_trt_tensor(ctx, scale, name + "_scale", dtype=torch.float32)
70
else:
71
scale = impl.elementwise.div(
72
ctx,
@@ -76,7 +76,7 @@ def quantize(
76
amax,
77
max_bound,
78
)
79
80
81
# Add Q node
82
if num_bits == 8 and exponent_bits == 0:
@@ -96,7 +96,7 @@ def quantize(
96
q_output, scale, output_type=input_tensor.dtype
97
98
set_layer_name(dequantize_layer, target, name + "_dequantize", source_ir)
99
- dequantize_layer.precision = dtype
+ # dequantize_layer.precision = dtype
100
101
dq_output = dequantize_layer.get_output(0)
102
0 commit comments