[Mlir-commits] [mlir] [mlir] Declare promised interfaces for all dialects (PR #78368)
Mehdi Amini
llvmlistbot at llvm.org
Tue Mar 12 21:12:53 PDT 2024
================
@@ -8,8 +8,11 @@
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
+#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
+#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
----------------
joker-eph wrote:
Fundamentally in-tree: adding a promise **requires** the dialect to know about the interface class.
That means if you want to have an interface for the Transform dialect, and implement it for other in-tree dialects, these dialects must be able to know about this interface to declare the promise.
So this:
> The issue I see is that we don't want Tensor/IR, or any other dialect definition for that matter, to depend on the Transform dialect.
Is an impossible requirement if "depend on the Transform dialect" implies "can't include the interface declaration from the Transform dialect".
The only option to fullfill your criteria is to entirely delete the Transform interface implementation for these dialects from the repo and consider that the Transform dialect can't implement interfaces for these dialects. I don't think this is what you want though.
https://github.com/llvm/llvm-project/pull/78368
More information about the Mlir-commits
mailing list