Skip to content

Commit 9f56661

Browse files
committed
[Lint] rerun linter, fix errors
1 parent e30f89c commit 9f56661

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/qonnx/core/modelwrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def transform(
183183
if self.fix_float64:
184184
(transformed_model, model_was_changed) = DoubleToSingleFloat().apply(transformed_model)
185185

186-
if apply_to_subgraphs and not use_preorder_traversal:
186+
if apply_to_subgraphs and (use_preorder_traversal is False):
187187
transformed_model.transform_subgraphs(
188188
transformation, make_deepcopy, cleanup, apply_to_subgraphs, use_preorder_traversal
189189
)

src/qonnx/transformation/fixedpt_quantize.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,19 @@ def default_op_filter(op):
4141

4242
class FixedPointQuantizeParamsFromDict(Transformation):
4343
"""
44-
Quantize model parameters to a given fixed-point representation.
45-
The self.max_err dictionary stores the maximum error for each quantized input after calling.
46-
Parameters:
47-
fixedpt_dict: Dictionary containing tensor names and their corresponding target fixed-point
48-
data type or its canonical name
49-
rounding_mode: Rounding mode used for conversion into fixed point.
50-
Default is "ROUND",
51-
possible values: ["ROUND", "HALF_EVEN", "CEIL", "FLOOR", "UP", "DOWN", "HALF_UP", "HALF_DOWN"]
44+
Quantize model parameters to a given fixed-point representation.
45+
The self.max_err dictionary stores the maximum error for each quantized input after calling.
46+
Parameters:
47+
fixedpt_dict: Dictionary containing tensor names and their corresponding target fixed-point
48+
<<<<<<< HEAD
49+
data type or its canonical name
50+
=======
51+
data type or its canonical name
52+
>>>>>>> 7dfc4b8 ([Lint] rerun linter, fix errors)
53+
rounding_mode: Rounding mode used for conversion into fixed point.
54+
Default is "ROUND",
55+
possible values: ["ROUND", "HALF_EVEN", "CEIL", "FLOOR", "UP", "DOWN",
56+
"HALF_UP", "HALF_DOWN"]
5257
"""
5358

5459
def __init__(self, fixedpt_dict, rounding_mode="ROUND"):
@@ -66,7 +71,7 @@ def apply(self, model: ModelWrapper):
6671
if current_dtype.is_fixed_point():
6772
warn(
6873
f"Tensor {tname} is already a {current_dtype.get_canonical_name()} type. "
69-
f"Recasting to {tdtype.get_canonical_name()}"
74+
"Recasting to {tdtype.get_canonical_name()}"
7075
)
7176

7277
in1_t_new = self.round_func(in1_t.astype(np.float32) / tdtype.scale_factor()) * tdtype.scale_factor()

0 commit comments

Comments
 (0)