torch-mlir/lib/Conversion
Sayan Saha 2b01f8b7f3
[Tosa] : Add support for negative indices in index.tensor and index.Tensor_hacked_twin for TorchToTosa lowering. (#3790)
1. Negative indices for tensor indexing is handled by wrapping around
the index values by checking their values at run time. Without the fix,
there was a runtime error.
2. Added a lit test to lock down the behavior.
3. Updated the `xfails_set` for `fx_importer_tosa` config to lockdown
the behavior with e2e test as well.

"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY."
2024-10-25 15:37:19 -07:00
..
TorchConversionToMLProgram [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
TorchOnnxToTorch Added support for Maxpool (Autopad) (#3774) 2024-10-23 13:04:50 +00:00
TorchToArith [TorchToArith] Add a lowering for `torch.add.float_int` (#3594) 2024-08-07 11:55:27 -05:00
TorchToLinalg [TorchToLinalg] Use Op with native channel order for quantized conv2d (#3807) 2024-10-22 20:26:16 +02:00
TorchToSCF [NFC] Change to *cast instead of .*cast variants (#3405) 2024-05-30 23:45:13 -07:00
TorchToStablehlo [stablehlo] support aten.view.dtype lowering (#3778) 2024-10-10 15:50:17 +08:00
TorchToTMTensor AtenCumprodOp (#3737) 2024-09-26 18:17:22 -04:00
TorchToTensor [NFC] Remove unused header files (#3386) 2024-05-30 14:30:36 +08:00
TorchToTosa [Tosa] : Add support for negative indices in index.tensor and index.Tensor_hacked_twin for TorchToTosa lowering. (#3790) 2024-10-25 15:37:19 -07:00
Utils [LINALG] Add complex tensor support for `create[Zero|One]InitTensor` utility (#3777) 2024-10-09 16:15:08 +05:30
CMakeLists.txt [torch] Improve shape inference for `torch-to-linalg` path for reshapes (#3055) 2024-03-26 12:41:40 -07:00
PassDetail.h Minor fixes for `ConvertTorchConversionToMLProgram`. (#1991) 2023-04-04 09:09:58 -07:00
Passes.cpp Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00