You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arm backend: qdq folding support for remaining operators (#7340)
* Add TOSA table as custom edge op
Edge operators that are lowered to TOSA TABLEs are convereted to a
custom edge IR table-op.
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: I147008c30b9b46c7b8ae1a1c15bc540fea614a69
* Add support for concat q/dq folding
This is a special case where node.args can be lists with many incoming
dq-nodes.
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: Icf511a8bdeaaffb597b18455ab7f1fbd947ce3ca
* Increase q/dq folding coverage
Add support for q/dq folding of more operators such as hardtanh,
maxpool2d, mul, relu, select, sub, to_copy.
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: Ifdabda4c927dade41c000859054696844c546f7b
* Add support for sum q/dq folding
sum is retraced to an int64 dtype of operator after q/dq folding.
This patch adds a pass to manually force the dtype to be int8.
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: Ifa737a398c5a878d52cd76a2392499905da085ce
* Complete q/dq folding coverage
Add support for q/dq folding for the remaining supported ops in Arm
backend.
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: I9012b4a501ce018c9771c729706be3b031a5c7ae
* Remove is_quant_node from NodeVisitor.define_node
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: Ibb17add461dc79e022a7f4accde29f9f9d61b16d
* Fix pyre issues
Address issues from pyre and add similar # pyre-ignores as in
#7362.
Signed-off-by: Oscar Andersson <[email protected]>
Change-Id: I6feaa611dcd539b3b0d21a6a7dd696ef7db691ef
---------
Signed-off-by: Oscar Andersson <[email protected]>
self, graph_module: GraphModule, node: Node, arg_list: list[Node], i: int
91
+
) ->None:
92
+
input_qparams=None
93
+
nodes_to_remove=set()
94
+
forarginarg_list:
95
+
ifnotisinstance(arg, Node):
96
+
return
97
+
"""
98
+
Make sure arg has requires_grad set to False
99
+
For parameters that are not quantized, sometimes (i.e. convolution)
100
+
the Parameter(FakeTensor(...)) has requires_grad set to True, which
101
+
causes the retracing of the graph to fail with:
102
+
103
+
E RuntimeError: isDifferentiableType(variable.scalar_type()) INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/autograd/functions/utils.h":74, please report a bug to PyTorch.
# For parameters that are not quantized, sometimes (i.e. convolution)
106
-
# the Parameter(FakeTensor(...)) has requires_grad set to True, which
107
-
# causes the retracing of the graph to fail with:
108
-
#
109
-
# E RuntimeError: isDifferentiableType(variable.scalar_type()) INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/autograd/functions/utils.h":74, please report a bug to PyTorch.
0 commit comments