Skip to content

Commit c2c26d6

Browse files
fix ruff complaints
Signed-off-by: chichun-charlie-liu <[email protected]>
1 parent 9ddfa36 commit c2c26d6

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

fms_mo/dq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def run_dq(model_args, data_args, opt_args, fms_mo_args):
7171
use dynamo tracing instead of torchscript by default. if torchscript is needed, change
7272
1) config_kwarks and 2) use_dynamo in qmodel_prep()
7373
74-
"""
74+
"""
7575
# for attention or kv-cache quantization, need to use eager attention
7676
attn_bits = [
7777
fms_mo_args.nbits_bmm1,

fms_mo/fx/dynamo_utils.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,20 @@ def find_conv_on_shortcut_gm(gm: torch.fx.GraphModule, lut_fx_mod_name_to_org={}
339339
)
340340
if conv_mod.out_channels > conv_mod.in_channels: # see Note 2
341341
qconv_candidate.append(
342-
get_org_mod_name_of_fx_node(n_conv_i, gm, lut_fx_mod_name_to_org)
342+
get_org_mod_name_of_fx_node(
343+
n_conv_i, gm, lut_fx_mod_name_to_org
344+
)
343345
)
344346

345347
return qconv_candidate
346348

347349

348350
def find_1st_last_gm(
349-
gm, firstOps=None, lastOps=None, return_1st_last_sep=False, lut_fx_mod_name_to_org={}
351+
gm,
352+
firstOps=None,
353+
lastOps=None,
354+
return_1st_last_sep=False,
355+
lut_fx_mod_name_to_org={},
350356
):
351357
"""Identify the first and last layer of interests
352358
Usually only interested in Conv and Linear, but could be others as well
@@ -1005,7 +1011,9 @@ def cus_backend_model_analyzer(
10051011

10061012
# Check 3: single/double sided
10071013
qcfg["qsinglesided_name"] += add_prefix_to_list_or_dict(
1008-
find_single_sided_op_gm(gm_fx, lut_fx_mod_name_to_org=lut_fx_mod_name_to_org),
1014+
find_single_sided_op_gm(
1015+
gm_fx, lut_fx_mod_name_to_org=lut_fx_mod_name_to_org
1016+
),
10091017
prefix,
10101018
)
10111019

0 commit comments

Comments
 (0)