[Mlir-commits] [llvm] [mlir] [TOSA] Add Tosa_Shape type and ConstShapeOp (PR #122547)
Jonas Rickert
llvmlistbot at llvm.org
Thu Mar 20 09:16:49 PDT 2025
jorickert wrote:
Is there a helper to create `ConstShapeOp `or `Tosa_Shape `types in C++?
I'm updating some patterns for tosa.tile and having to write something like the following snippet is quite wordyIMO:
```
auto constantShapeOp = rewriter.create<ConstShapeOp>(
getLoc(),
shapeType::get(getContext(), rank),
DenseIntElementsAttr::get(
RankedTensorType::get({rank}, rewriter.getIndexType()),
multiplies));
```
https://github.com/llvm/llvm-project/pull/122547
More information about the Mlir-commits
mailing list