[Mlir-commits] [mlir] [OpenMP][MLIR] Add omp.distribute op to the OMP dialect (PR #67720)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Sep 28 11:45:36 PDT 2023


================
@@ -1053,6 +1053,22 @@ LogicalResult SimdLoopOp::verify() {
   return success();
 }
 
+//===----------------------------------------------------------------------===//
+// Verifier for Distribute construct [2.9.4.1]
+//===----------------------------------------------------------------------===//
+
+LogicalResult DistributeOp::verify() {
+  if (this->getChunkSize() && !this->getDistScheduleStatic())
+    return emitOpError() << "chunk size set without "
+                            "dist_schedule_static being present";
+
+  if (getAllocateVars().size() != getAllocatorsVars().size())
+    return emitError(
+        "expected equal sizes for allocate and allocator variables");
----------------
shraiysh wrote:

Please add an error testcase in `mlir/test/Dialect/OpenMP/invalid.mlir` for these messages.

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


More information about the Mlir-commits mailing list