[Mlir-commits] [mlir] [mlir] Implement DestinationStyleOpInterface for scf::ForallOp (PR #66981)

Markus Böck llvmlistbot at llvm.org
Thu Sep 21 03:37:27 PDT 2023


================
@@ -3970,6 +3971,11 @@ struct FoldTensorCastProducerOp
     if (isa<InsertSliceOp>(op.getOperation()))
       return failure();
 
+    // scf::ForallOp also has its own folding logic taking the Types of its
+    // BlockArguments into consideration.
+    if (isa<scf::ForallOp>(op.getOperation()))
+      return failure();
+
----------------
zero9178 wrote:

These lines are problematic as the tensor dialect does not depend on the SCF dialect.
To make this matter even worse, the SCF dialect currently depends on the Tensor dialect,, creating a circular dependency between the two. 
This leads to `BUILD_SHARED_LIBS` to fail building as well as any downstream user dependending on the tensor dialect to get linker errors that they need to include SCF as well now.

I sadly know very little about the tensor dialect/bufferzization/all that stuff, but is this kind of layering really necesseray?

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


More information about the Mlir-commits mailing list