Skip to content

Reland [MLIR] Make resolveCallable customizable in CallOpInterface #107989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

xlauko
Copy link
Contributor

@xlauko xlauko commented Sep 10, 2024

Relands #100361 with fixed dependencies.

@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir mlir:bufferization Bufferization infrastructure mlir:async labels Sep 10, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 10, 2024

@llvm/pr-subscribers-mlir-bufferization
@llvm/pr-subscribers-mlir-async
@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Author: Henrich Lauko (xlauko)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/107989.diff

3 Files Affected:

  • (modified) mlir/lib/Dialect/Async/IR/CMakeLists.txt (+1)
  • (modified) mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt (+1-1)
  • (modified) mlir/lib/Transforms/Utils/CMakeLists.txt (+1)
diff --git a/mlir/lib/Dialect/Async/IR/CMakeLists.txt b/mlir/lib/Dialect/Async/IR/CMakeLists.txt
index db903a48c43196..e0e667500308ae 100644
--- a/mlir/lib/Dialect/Async/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Async/IR/CMakeLists.txt
@@ -8,6 +8,7 @@ add_mlir_dialect_library(MLIRAsyncDialect
   MLIRAsyncOpsIncGen
 
   LINK_LIBS PUBLIC
+  MLIRCallInterfaces
   MLIRControlFlowInterfaces
   MLIRFunctionInterfaces
   MLIRDialect
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
index f27d924416677a..50104e8f8346b4 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
@@ -27,6 +27,7 @@ add_mlir_dialect_library(MLIRBufferizationTransforms
   LINK_LIBS PUBLIC
   MLIRArithDialect
   MLIRBufferizationDialect
+  MLIRCallInterfaces
   MLIRControlFlowInterfaces
   MLIRFuncDialect
   MLIRFunctionInterfaces
@@ -42,4 +43,3 @@ add_mlir_dialect_library(MLIRBufferizationTransforms
   MLIRViewLikeInterface
   MLIRSupport
 )
-
diff --git a/mlir/lib/Transforms/Utils/CMakeLists.txt b/mlir/lib/Transforms/Utils/CMakeLists.txt
index b5788c679edc44..eb588640dbf83a 100644
--- a/mlir/lib/Transforms/Utils/CMakeLists.txt
+++ b/mlir/lib/Transforms/Utils/CMakeLists.txt
@@ -16,6 +16,7 @@ add_mlir_library(MLIRTransformUtils
 
   LINK_LIBS PUBLIC
   MLIRAnalysis
+  MLIRCallInterfaces
   MLIRControlFlowInterfaces
   MLIRFunctionInterfaces
   MLIRLoopLikeInterface

@joker-eph
Copy link
Collaborator

Why are these needed? In which situation do they fail? Is this a non-deterministic build failure? (if so can you post the error message).

@joker-eph
Copy link
Collaborator

Is this a follow-up to #100361 ? If so it has been reverted and you can incorporate these fixes when you reland it. Thanks!

(if a bot is broken: we need to either land such fix immediately or revert in the meantime to unbreak the CI)

@xlauko
Copy link
Contributor Author

xlauko commented Sep 10, 2024

@joker-eph yes, this was follow-up to #100361
To reland it should I just reapply the original commit?

@joker-eph
Copy link
Collaborator

The original commit, with the fixes :)

@xlauko xlauko changed the title [MLIR] Add missing MLIRCallInterfaces dependency to libraries. Re-apply [MLIR] Make resolveCallable customizable in CallOpInterface Sep 10, 2024
@xlauko xlauko changed the title Re-apply [MLIR] Make resolveCallable customizable in CallOpInterface Reland [MLIR] Make resolveCallable customizable in CallOpInterface Sep 10, 2024
@xlauko xlauko force-pushed the main branch 2 times, most recently from 657fe4e to 67383ff Compare September 10, 2024 11:48
Copy link

github-actions bot commented Sep 10, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

llvm#100361)

Allow customization of the `resolveCallable` method in the
`CallOpInterface`. This change allows for operations implementing this
interface to provide their own logic for resolving callables.

- Introduce the `resolveCallable` method, which does not include the
optional symbol table parameter. This method replaces the previously
existing extra class declaration `resolveCallable`.

- Introduce the `resolveCallableInTable` method, which incorporates the
symbol table parameter. This method replaces the previous extra class
declaration `resolveCallable` that used the optional symbol table
parameter.
@matthias-springer matthias-springer merged commit d1cad22 into llvm:main Sep 10, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:async mlir:bufferization Bufferization infrastructure mlir:core MLIR Core Infrastructure mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants