torch-mlir/test/Conversion
zjgarvey 5e564b5864
Adds Some Quantization Support for AtenMatmulOp (#3147)
1. onnx.MatMulInteger now converts to aten.matmul instead of aten.mm
2. aten.matmul, for ranks >=2, now allows quantized inputs and will
lower to linalg::quantized_matmul or linalg::quantized_batch_matmul.
3. added AtenMatmulOp to the FuseQuantizeOps rewrite patters
QuantizeOperands, QuantizeTransposedOperands, and QuantizeAccumulator
4. added several tests, including some to test AtenMmOp with varying
quantization signed-ness.
5. a quantized matmul mat-vec test is added to verify the failure to
lower to linalg; cleaned of out-of-date code related to common
torch-mlir lowering xfails.
6. in debugging a real model with quantized matmuls, I found a bug on
the scalarize-shapes pass which resulted from the aten.full op folder
returning an incompatible result type. This is fixed by the small change
here to
[lib/Dialect/Torch/IR/TorchOps.cpp](https://github.com/llvm/torch-mlir/compare/main...zjgarvey:torch-mlir:MatMulIntegerFix?expand=1#diff-dc8ed165c207918e606490eee3984b1ad51d7034e6aac36fc046bf47f6f03f4f).
2024-04-15 16:06:47 -07:00
..
TorchConversionToMLProgram Bump LLVM and StableHLO (#2598) 2023-11-28 22:12:24 -08:00
TorchOnnxToTorch Adds Some Quantization Support for AtenMatmulOp (#3147) 2024-04-15 16:06:47 -07:00
TorchToArith [MLIR][TORCH]Add support lowing aten.Int.bool to arith (#3083) 2024-04-01 10:05:08 -07:00
TorchToLinalg [MLIR][Torch] Do not convert bias tensor to element type if NoneType (#3072) 2024-04-02 14:19:26 +05:30
TorchToSCF Fix SCF Forloop fails to convert to linalg when a tensor argument is supplied to the loop block (#3040) 2024-03-20 11:04:02 -07:00
TorchToStablehlo [Stablehlo] lowering aten.view to shape.num_elements + stablehlo.comp… (#3125) 2024-04-09 14:54:57 +08:00
TorchToTensor [onnx] Lowering for `onnx.shape` to `torch` and `tensor` (#2648) 2023-12-15 11:37:49 -08:00
TorchToTosa allow tosa.cast to convert from f32 to f16 (#2934) 2024-02-20 14:22:38 -08:00