Skip to content
Snippets Groups Projects
Commit 7a53d26d authored by Axel Farrugia's avatar Axel Farrugia
Browse files

[Fix] Remove redundant code

parent aab3e328
No related branches found
No related tags found
No related merge requests found
...@@ -38,23 +38,6 @@ class CppElemWise(ExportNodeCpp): ...@@ -38,23 +38,6 @@ class CppElemWise(ExportNodeCpp):
# else: # else:
# self.attributes["coef_value"] = node.get_operator().get_output(0)[0] # self.attributes["coef_value"] = node.get_operator().get_output(0)[0]
## Set the scaling type
if self.attributes["coef_value"] != 1:
self.attributes["rescaling"] = "FixedPointScaling"
elif self.attributes["shift_value"] != 0:
self.attributes["rescaling"] = "SingleShiftScaling"
## Get the scaling values
for prod in node.get_parents():
if prod is not None:
if prod.type() == "Producer":
if prod.attributes().has_attr("quantization.ptq.ShiftAmount"):
self.attributes["shift_value"] = prod.attributes().quantization.ptq.ShiftAmount
# elif prod.attributes().has_attr("quantization.ptq.CompensationCoeff"):
# self.attributes["coef_value"] = prod.attributes().quantization.ptq.CompensationCoeff
else:
self.attributes["coef_value"] = prod.get_operator().get_output(0)[0]
## Set the scaling type ## Set the scaling type
if self.attributes["coef_value"] != 1: if self.attributes["coef_value"] != 1:
self.attributes["rescaling"] = "FixedPointScaling" self.attributes["rescaling"] = "FixedPointScaling"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment