From 1d713b3e51de5ca94c8d54b53fc03d84117339a8 Mon Sep 17 00:00:00 2001 From: manyizhang <56545151+manyizhang@users.noreply.github.com> Date: Wed, 26 Nov 2025 19:32:21 +0800 Subject: [PATCH] Eliminate duplicate bias addition in linear function --- inference_lib/src/fp_quant/module/pseudoquant_linear_fns.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/inference_lib/src/fp_quant/module/pseudoquant_linear_fns.py b/inference_lib/src/fp_quant/module/pseudoquant_linear_fns.py index ea4e2d4..6e6a1b1 100644 --- a/inference_lib/src/fp_quant/module/pseudoquant_linear_fns.py +++ b/inference_lib/src/fp_quant/module/pseudoquant_linear_fns.py @@ -152,8 +152,6 @@ def forward( y = torch.nn.functional.linear(x_flat_dq, weight_dq, bias) y = y.unflatten(dim=0, sizes=x.shape[:-1]) - if bias is not None: - y += bias ctx.x_shape = x.shape ctx.dtype = dtype