Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions backends/arm/_passes/fold_qdq_with_annotated_qparams_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,6 @@ def fold_and_annotate_arg(
for arg in arg_list:
if not isinstance(arg, Node):
return
"""
Make sure arg has requires_grad set to False
For parameters that are not quantized, sometimes (i.e. convolution)
the Parameter(FakeTensor(...)) has requires_grad set to True, which
causes the retracing of the graph to fail with:
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.
E
E While executing %aten_convolution_default : [num_users=1] = call_function[target=executorch.exir.dialects.edge._ops.aten.convolution.default](args = (%quantized_decomposed_quantize_per_tensor_default, %b__frozen_param0, %p__param_constant1, [1, 1], [0, 0], [1, 1], False, [0, 0], 1), kwargs = {})
E Original traceback:
E File "/Users/perast01/src/executorch/backends/arm/test/ops/test_conv2d.py", line 110, in forward
E x = conv(x)
"""
if arg.op == "placeholder":
arg.meta["val"].requires_grad = False

arg_quant_params = None
if arg.target == dq_op:
Expand Down
Loading