[Mlir-commits] [mlir] [mlir][tosa] Convert RESCALE op multiplier and shift from attributes to inputs (PR #129720)

Luke Hutton llvmlistbot at llvm.org
Wed Mar 5 03:19:48 PST 2025


================
@@ -107,6 +107,45 @@ void mlir::tosa::computeMultiplierAndShift(double scale, int32_t &multiplier,
   }
 }
 
+// Return a const value for array of int8 vec
+Value mlir::tosa::getConstTensorInt8(OpBuilder &builder, Location loc,
+                                     ArrayRef<int8_t> vec) {
+  int64_t count = vec.size();
+  assert(count > 0);
----------------
lhutton1 wrote:

nit: could we add a message to these asserts using `... && "<reason>"`

https://github.com/llvm/llvm-project/pull/129720


More information about the Mlir-commits mailing list