[Mlir-commits] [mlir] [mlir][tosa] Convert RESCALE op multiplier and shift from attributes to inputs (PR #129720)
Georgios Pinitas
llvmlistbot at llvm.org
Wed Mar 5 02:07:10 PST 2025
================
@@ -1389,8 +1389,24 @@ class RescaleConverter : public OpRewritePattern<tosa::RescaleOp> {
}
// The shift and multiplier values.
- SmallVector<int32_t> multiplierValues(op.getMultiplier());
- SmallVector<int8_t> shiftValues(op.getShift());
+ ElementsAttr shiftElems;
+ if (!matchPattern(op.getShift(), m_Constant(&shiftElems)))
+ return rewriter.notifyMatchFailure(
+ op, "tosa.rescale requires constant shift input values");
+
+ ElementsAttr multiplierElems;
----------------
GeorgeARM wrote:
Should the `ElementsAttr` be Dense just to be sure that this is in packed form?
https://github.com/llvm/llvm-project/pull/129720
More information about the Mlir-commits
mailing list