mirror of https://github.com/llvm/torch-mlir
c8e062fb4e
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 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
TorchToTosa.cpp | ||
TosaLegalizeCommon.cpp | ||
TosaLegalizeUtils.cpp |