[PATCH] D152388: [mlir] Fix mlir-linalg-ods-yaml-gen
Andrey Turetskiy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 19:24:37 PDT 2023
aturetsk updated this revision to Diff 548029.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152388/new/
https://reviews.llvm.org/D152388
Files:
mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
Index: mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
===================================================================
--- mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
+++ mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
@@ -565,7 +565,7 @@
std::pair<int64_t, int64_t> getDpsInitsPositionRange() {{
int64_t getNumOperands = this->getNumOperands();
- return {{getNumOperands - 1, getNumOperands};
+ return {{getNumOperands - getOutputs().size(), getNumOperands};
}
// Generic methods.
Index: mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
===================================================================
--- mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
+++ mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
@@ -84,6 +84,10 @@
# ODS: buildStructuredOp($_builder, $_state, resultTensorTypes,
# ODS-NEXT: attributes, Test1Op::getRegionBuilder())
+# ODS: std::pair<int64_t, int64_t> getDpsInitsPositionRange() {
+# ODS-NEXT: int64_t getNumOperands = this->getNumOperands();
+# ODS-NEXT: return {getNumOperands - getOutputs().size(), getNumOperands};
+# ODS-NEXT: }
# IMPL-LABEL: void Test1Op::regionBuilder(ImplicitLocOpBuilder &b,
# IMPL-NEXT: Block &block, ArrayRef<NamedAttribute> attrs)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152388.548029.patch
Type: text/x-patch
Size: 1370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230808/da796ce5/attachment.bin>
More information about the llvm-commits
mailing list