Skip to content

[mlir] Consider mlir-linalg-ods-gen as a tablegen tool in build #76843

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MikeHolman
Copy link
Member

@MikeHolman MikeHolman commented Jan 3, 2024

There is a bit of an issue with how mlir-linalg-ods-yaml-gen is classified in the MLIR build. Due to it being a tool, it is excluded from the install when using -DLLVM_BUILD_TOOLS=OFF. However, it is a necessary component of the build, so it can cause build issues with users of the installed LLVM, and so I think it should not be excluded.

It is a tablegen-like tool, so my solution is to reclassify it that way in the build.

This change resolves #76813, which was an issue in my first patch that was inadvertently causing double linking of Support.

I locally repro'd and confirmed that this fixes the build issue with failing configuration.

@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Jan 3, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 3, 2024

@llvm/pr-subscribers-mlir-linalg
@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Author: Michael Holman (MikeHolman)

Changes

Resolves #76813

This was inadvertently causing double linking of Support.

Locally repro'd and confirmed that this fixes the build issue with failing configuration.


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

1 Files Affected:

  • (modified) mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt (-5)
diff --git a/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt b/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
index 2b2024da6409ac..f698469ebf05bd 100644
--- a/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
+++ b/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
@@ -1,8 +1,3 @@
-set(LLVM_LINK_COMPONENTS
-  Core
-  Support
-  )
-
 set(LIBS
   MLIRIR
   MLIRSupport

@MikeHolman MikeHolman changed the title Fix link issue in mlir-linalg-ods-gen [mlir] Fix link issue in mlir-linalg-ods-gen Jan 3, 2024
@llvmbot llvmbot added cmake Build system in general and CMake in particular mlir:linalg labels Jan 3, 2024
MikeHolman referenced this pull request Jan 3, 2024
There is a bit of an issue with how `mlir-linalg-ods-yaml-gen` is
classified in the MLIR build. Due to it being a tool, it is excluded
from the install when using `-DLLVM_BUILD_TOOLS=OFF`. However, it is a
necessary component of the build, so it can cause build issues with
users of the installed LLVM, and so I think it should not be excluded.

It is a tablegen-like tool, so my solution is to reclassify it that way
in the build.
@MikeHolman MikeHolman changed the title [mlir] Fix link issue in mlir-linalg-ods-gen [mlir] Consider mlir-linalg-ods-gen as a tablegen tool in build Mar 13, 2024
@MikeHolman
Copy link
Member Author

@stellaraccident Would you mind taking another look at this? I have the change in my fork so kind of have been lazy about trying to get it checked in, but definitely would like to get this change in at some point.

@joker-eph
Copy link
Collaborator

However, it is a necessary component of the build, so it can cause build issues with users of the installed LLVM, and so I think it should not be excluded.

I don't follow: I understand this tool as a tool internal to Linalg development, when is it needed by a user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular mlir:core MLIR Core Infrastructure mlir:linalg mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LinalgNamedStructuredOps fails with CommandLine Error: Option 'debug-counter' registered more than once!
3 participants