torch-mlir/lib/Conversion/TorchToLinalg
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 Re-enable custom op support 2022-08-16 22:49:08 +05:30
DataMovement.cpp [MLIR][TORCH] Patch up Ops and their lowerings to deal with +ve `dim` 2023-04-14 13:12:56 +05:30
IndirectDataMovement.cpp [MLIR][TORCH] Patch up Ops and their lowerings to deal with +ve `dim` 2023-04-14 13:12:56 +05:30
Linear.cpp [MLIR][TORCH] Add support for non-unit stride for conv backward 2023-04-04 17:53:27 +05:30
Pooling.cpp Fix default value of `stride` in 2d pooling ops in linalg and tosa (#2065) 2023-04-27 08:31:36 -07:00
PopulatePatterns.h Re-enable custom op support 2022-08-16 22:49:08 +05:30
Random.cpp build: update llvm tag to 798fa4b4 (#1684) 2022-12-07 12:20:41 -08:00
Reduction.cpp Update to LLVM 3157f03a349cfc852cdd994675eaa9652caa2e3a (#2060) 2023-04-25 08:52:46 -07:00
TensorConstructors.cpp Fix creation of empty tensor in decomposition for randn ops (#2043) 2023-04-19 08:25:39 -07:00
TensorScalarInterop.cpp build: update llvm tag to 798fa4b4 (#1684) 2022-12-07 12:20:41 -08:00
TorchToLinalg.cpp build: update llvm tag to 6f46ff37 (#1448) 2022-10-05 08:28:06 -05:00
Uncategorized.cpp Fix deprecation warnings for `isOneValue` and `getAllOnesValue` (#1928) 2023-03-10 09:50:56 -08:00
Utils.cpp [MLIR][TORCH] Add support for non-unit stride for conv backward 2023-04-04 17:53:27 +05:30
Utils.h [MLIR][TORCH] Add support for non-unit stride for conv backward 2023-04-04 17:53:27 +05:30