[Mlir-commits] [mlir] [mlir] Add `MLIRContext::executeCriticalSection` and `Pass::getOpDependentDialects` methods. (PR #98953)
Fabian Mora
llvmlistbot at llvm.org
Mon Jul 15 15:49:03 PDT 2024
fabianmcg wrote:
> I have some concerns with the correctness of this all at the moment.
Me too, that's why I added the disclaimer saying I'm not sure it's safe -this spawned from a brief comment on discord. I should've been more explicit, but the reason I opened the PR is to get feedback(/pointers) on how to solve the issue of loading dialects based on an op.
Why loading dialects based on an op?
With @rengolin proposal of the cost model, it's likely we'll encounter situations in which the transformations to be applied are determined by the cost model and not known a priori. Another example, would be further configuring passes like `ConvertToLLVM` with options found in attributes, for example, if the target op is a `gpu.module` and the target attr is ROCDL, then populate those patterns.
For the sake of simplicity lets say that both of those cases require, loading dependent dialects and populating patterns.
Dynamically populating patterns based on an interface is already doable. Loading dialects not.
https://github.com/llvm/llvm-project/pull/98953
More information about the Mlir-commits
mailing list