[Mlir-commits] [mlir] [mlir][tosa] Make Convolution Zero Points Inputs (PR #122939)
Luke Hutton
llvmlistbot at llvm.org
Thu Jan 30 08:35:48 PST 2025
================
@@ -150,10 +145,58 @@ mlir::tosa::buildConvOpQuantizationAttr(OpBuilder &builder, Value input,
weightZp = weightPerAxisQType.getZeroPoints().front();
}
- return builder.getAttr<tosa::ConvOpQuantizationAttr>(inputZp, weightZp);
+ return std::make_pair(inputZp, weightZp);
}
- return nullptr;
+ return std::nullopt;
+}
+
+std::pair<Value, Value>
+mlir::tosa::createZPsAsConst(OpBuilder &builder, Value input, Value weight) {
----------------
lhutton1 wrote:
Other ops have `zero_points` on input/output or in the case of matmul: `a` and `b`. I think this is okay for now but just noting we may need to clean this function up later on down the line
https://github.com/llvm/llvm-project/pull/122939
More information about the Mlir-commits
mailing list