[Mlir-commits] [mlir] [mlir][mesh] Add collective communication operations (PR #71960)
Mehdi Amini
llvmlistbot at llvm.org
Wed Nov 15 01:30:47 PST 2023
================
@@ -129,6 +207,327 @@ MeshShardingAttr::verify(function_ref<InFlightDiagnostic()> emitError,
return success();
}
+//===----------------------------------------------------------------------===//
+// collective communication ops
+//===----------------------------------------------------------------------===//
+
+namespace {
+
+template <typename Op>
+LogicalResult verifyMeshSymbolUses(Op op, SymbolTableCollection &symbolTable) {
+ FlatSymbolRefAttr symbolAttr = op.getMeshAttr();
+ if (!symbolAttr) {
+ return op.emitError() << "Unspecified \"mesh\" symbol attribute.";
+ }
+ SymbolTableCollection symbolTableCollection;
+ mesh::ClusterOp mesh =
+ symbolTableCollection.lookupNearestSymbolFrom<mesh::ClusterOp>(
+ op.getOperation(), symbolAttr);
----------------
joker-eph wrote:
This will be costly, what about `verifySymbolUses`?
https://github.com/llvm/llvm-project/pull/71960
More information about the Mlir-commits
mailing list