Is this a assert a bug?

I am using the following code link where it uses the convert_fx from torch.ao.quantization.quantize_fx

However, the following assertion is fired:

_lower_to_native_backend.py", line 606, in _lower_static_weighted_ref_module
    assert(len(ref_node.args) == 1)
AssertionError

When I comment out this assert everthing seems to work fine. The question is if this assert is correct?

Hi Ali,

Would you mind sharing two things that would help us debug?

  1. What op is “ref_node” when it fails? (print(ref_node))
  2. What are the args of “ref_node”? (print(ref_node.args))

Thanks,
-Andrew