Skip to content

Commit 6f64121

Browse files
committed
fix return
1 parent 8ce5cde commit 6f64121

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torchao/quantization/quantize_/workflows/int8/int8_tensor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,14 @@ def from_hp(
155155
output_dtype=torch.int8,
156156
)
157157

158-
res = cls(
158+
return cls(
159159
int_data,
160160
scale,
161161
block_size,
162162
hp_tensor.dtype,
163163
act_quant_kwargs=act_quant_kwargs,
164164
activation_scale=activation_scale,
165165
)
166-
return res
167166

168167
def dequantize(self, output_dtype: Optional[torch.dtype] = None) -> torch.Tensor:
169168
"""Dequantize int8 tensor to floating point"""

0 commit comments

Comments
 (0)