torch-mlir/test/Conversion
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
..
TorchConversionToMLProgram Bump LLVM and StableHLO (#2598) 2023-11-28 22:12:24 -08:00
TorchOnnxToTorch Added support for Maxpool (Autopad) (#3774) 2024-10-23 13:04:50 +00:00
TorchToArith [torch-mlir] bump stablehlo/llvm version (#3471) 2024-06-18 16:59:53 -07:00
TorchToLinalg [TorchToLinalg] Use Op with native channel order for quantized conv2d (#3807) 2024-10-22 20:26:16 +02:00
TorchToSCF Bump llvm to f9031f00f2c9 (#3672) 2024-08-28 11:29:10 -07:00
TorchToStablehlo Bump llvm/llvm-project@b6603e1bf1 (#3697) 2024-09-10 08:57:15 -07:00
TorchToTensor [onnx] Lowering for `onnx.shape` to `torch` and `tensor` (#2648) 2023-12-15 11:37:49 -08:00
TorchToTosa Fix torchToTosa lowering for avgpool2d to handle unsupported parameters (#3822) 2024-11-01 08:25:59 -04:00