Convolution operator not marked as quantizable when padding
is defined in the class instantiation
#398
Labels
padding
is defined in the class instantiation
#398
Description of the bug:
A
torch.nn.Conv2d
class instance is not marked as quantizable when padding is defined in the instantiation.Minimal working example:
Actual vs expected behavior:
Expected:
Equally quantized models
Actual:
TinyConv1 has quantized parameters:
TinyConv2 does not:
Any other information you'd like to share?
The cause of this issue is that the test for identifying a
conv
node in the FX graph when applying quantization is too restrictive:ai-edge-torch/ai_edge_torch/quantize/pt2e_quantizer_utils.py
Lines 311 to 315 in d4e358e
When padding is defined in the instantiation,
n.target
becomes an instance oftorch._ops.OpOverload
, so this test fails even though it probably shouldn't.The text was updated successfully, but these errors were encountered: