torch-mlir/lib
Hanumanth 7f9f99c6f8
Fix torchToTosa lowering for avgpool2d to handle unsupported parameters (#3822)
The existing TorchToTosa lowering logic for `torch.aten.avg_pool2d`
doesn't handle some unsupported properties well, leading to a silent
wrong answer(SWA) when we go through
`torch-backend-to-tosa-backend-pipeline.` For instance, with the
existing TOSA avgpool2d specification, we can not represent
`count_include_pad` and `divisor_override,` so during TorchToTosa
lowering, we silently ignore these properties which leads to SWA in some
cases—the fix captured in this change errors for unsupported scenarios.

For details on `count_include_pad` and `divisor_override,` please see
the below link.

https://pytorch.org/docs/stable/generated/torch.nn.AvgPool2d.html

---------

Co-authored-by: Hanumanth Hanumantharayappa <hhanuman@ah-hhanuman-l.dhcp.mathworks.com>
2024-11-01 08:25:59 -04:00
..
CAPI [ONNX] add int16 quantization support (#3446) 2024-06-12 10:37:22 +05:30
Conversion Fix torchToTosa lowering for avgpool2d to handle unsupported parameters (#3822) 2024-11-01 08:25:59 -04:00
Dialect support `aten._trilinear` and improve `einsum` decomposition (#3784) 2024-10-31 14:30:40 -05:00
RefBackend Add missing dependency to TorchMLIRRefBackend target (#3107) 2024-08-14 23:41:51 +08:00
CMakeLists.txt Link necessary op interface implementations (#3364) 2024-06-03 19:43:28 -05:00
InitAll.cpp [Stablehlo] legalize deprecated ops to stablehlo ops (#3543) 2024-07-17 00:05:11 +08:00