From 08bbd50a58bcdb956737d1f81b3d491daf1edfb7 Mon Sep 17 00:00:00 2001 From: Brian Hirsh Date: Fri, 6 Dec 2024 07:10:06 -0800 Subject: [PATCH] avoid .to() followed by inplace mutation to appease export [ghstack-poisoned] --- torchao/dtypes/uintx/plain_layout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchao/dtypes/uintx/plain_layout.py b/torchao/dtypes/uintx/plain_layout.py index ed171634cd..5295dc1726 100644 --- a/torchao/dtypes/uintx/plain_layout.py +++ b/torchao/dtypes/uintx/plain_layout.py @@ -264,5 +264,5 @@ def _linear_int8_act_int8_weight_impl(input_tensor, weight_tensor, bias): output_dtype = input_tensor.dtype y = y.to(output_dtype) if bias is not None: - y += bias + y = y + bias return y