[Mlir-commits] [mlir] [mlir][spirv] Add TOSA graph constant marking (PR #201095)
Davide Grohmann
llvmlistbot at llvm.org
Tue Jun 2 06:16:54 PDT 2026
================
@@ -450,6 +450,13 @@ LogicalResult replaceRescale(tosa::RescaleOp op, tosa::RescaleOpAdaptor adaptor,
template <typename SourceOp>
LogicalResult replaceConstant(SourceOp op, typename SourceOp::Adaptor adaptor,
Type type, ConversionPatternRewriter &rewriter) {
+ if (auto graphConstantId = op->template getAttrOfType<IntegerAttr>(
+ graphARMGraphConstantIdAttrName)) {
+ rewriter.replaceOpWithNewOp<spirv::GraphConstantARMOp>(
+ op, type, rewriter.getI32IntegerAttr(graphConstantId.getInt()));
+ return success();
+ }
----------------
davidegrohmann wrote:
Done in a slightly different way
https://github.com/llvm/llvm-project/pull/201095
More information about the Mlir-commits
mailing list