torch-mlir/lib/Conversion/TorchToTosa
Ramiro Leal-Cavazos c8e062fb4e
Fix default value of `stride` in 2d pooling ops in linalg and tosa (#2065)
When the user does not specify the `stride` value in 2d pooling ops,
`stride` is given the value of an empty list. However, the current
lowerings for pooling ops assumed that the `stride` operand would
always be a list of two ints, leading to crashes when that was not the
case. This commit fixes the crashes by setting the value of `stride`
to `kernel_size` when `stride` is the empty list, since this is the
default `stride` value specified in PyTorch docs. See:
https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html#torch.nn.MaxPool2d
2023-04-27 08:31:36 -07:00
..
CMakeLists.txt Fix a few missing dependencies. (#2014) 2023-04-11 11:18:49 -07:00
TorchToTosa.cpp Fix default value of `stride` in 2d pooling ops in linalg and tosa (#2065) 2023-04-27 08:31:36 -07:00
TosaLegalizeCommon.cpp Fix sign-compare warnings in TosaLegalizeCommon.cpp (#1794) 2023-01-12 11:23:30 -08:00
TosaLegalizeUtils.cpp [TOSA] Add todtype f32 to i64 (#2012) 2023-04-07 09:40:56 -07:00