Skip to content
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

[mlir rebase] Add MLIR config and react to MLIR name changes #1090

Merged
merged 3 commits into from
Mar 27, 2020

Conversation

sscalpone
Copy link
Member

@sscalpone sscalpone commented Mar 27, 2020

Similar to #1085. Now use the MLIR package to set up paths
for include files and libraries. Three MLIR names changed:

  • VectorOpsDialect to VectorDialect
  • AffineOpsDialect to AffineDialect
  • createVectorizePass to createSuperVectorizePass

Also, resolves the merge conflict in #1085.

Note, when building out of tree, supply MLIR_DIR to cmake:

cmake -DMLIR_DIR=/.../install/lib/cmake/mlir ...

Similar to #1085.  Now use the MLIR package to set up paths
for include files and libraries.  Three MLIR names changed:
 * VectorOpsDialect to VectorDialect
 * AffineOpsDialect to AffineDialect
 * createVectorizePass to createSuperVectorizePass
@sscalpone sscalpone requested a review from jeanPerier March 27, 2020 04:26
Copy link
Collaborator

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating #1085, build fine against LLVM head from this morning for me.

@sscalpone sscalpone requested a review from DavidTruby March 27, 2020 14:54
@tskeith
Copy link
Collaborator

tskeith commented Mar 27, 2020

This doesn't build for me. I'm getting this:

CMake Error at CMakeLists.txt:70 (find_package):
  Could not find a package configuration file provided by "MLIR" with any of
  the following names:

    MLIRConfig.cmake
    mlir-config.cmake

I'm using the latest on the f18 branch from flang-compiler/f18-llvm-project. There is no lib/cmake/mlir in the install.

Can you update the build instructions?

@sscalpone
Copy link
Member Author

Can you update the build instructions?

Jean is updating f18-llvm-project.

@jeanPerier
Copy link
Collaborator

I'm using the latest on the f18 branch from flang-compiler/f18-llvm-project. There is no lib/cmake/mlir in the install.

I have actually updated it a few hours ago already, can you check with git log --pretty=oneline -n 1 or similar that your f18-lvm-project f18 head is:

b3cc5dcef0f29f166fe33022858205a1243abd80 [MCInstPrinter] Add parameter `Address` to MCInstPrinter::printAliasInstr. NFC

LLVM=<LLVM_BUILD_DIR>/lib/cmake/llvm cmake -DLLVM_DIR=$LLVM ...
LLVM=<LLVM_BUILD_DIR>/lib/cmake/llvm \
MLIR=<LLVM_BUILD_DIR>/lib/cmake/mlir \
cmake -DLLVM_DIR=$LLVM -DMLIR_DIR=$MLIR ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above 3 lines can be replaced by,

cmake -DCMAKE_PREFIX_PATH=<LLVM_BUILD_DIR>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @isuruf. I'll update the instructions in a subsequent PR, along with .drone.io files. The reason for delay is because I'd like to check this method in my own build farm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. See https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure for more info on why it works. You can also use cmake --debug-find with 3.17.0 and cmake will tell you which paths that it tried.

@sscalpone sscalpone merged commit 116f643 into master Mar 27, 2020
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Apr 9, 2020
…lang-compiler/f18#1090)

[mlir rebase] Add MLIR config and react to MLIR name changes

Similar to flang-compiler/f18#1085.  Now use the MLIR package to set up paths for include files and libraries.  Three MLIR names changed:
 * VectorOpsDialect to VectorDialect
 * AffineOpsDialect to AffineDialect
 * createVectorizePass to createSuperVectorizePass

Update README.md to explain how to link with MLIR. Update the example gcc to version 8.3.

Update drone.io config to define -DMLIR_DIR

Co-authored-by: Jean Perier <jperier@nvidia.com>

Original-commit: flang-compiler/f18@116f643
Reviewed-on: flang-compiler/f18#1090
@sscalpone sscalpone deleted the sjs-follow-mlir branch April 12, 2020 18:51
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this pull request Oct 7, 2022
…lang-compiler/f18#1090)

[mlir rebase] Add MLIR config and react to MLIR name changes

Similar to flang-compiler/f18#1085.  Now use the MLIR package to set up paths for include files and libraries.  Three MLIR names changed:
 * VectorOpsDialect to VectorDialect
 * AffineOpsDialect to AffineDialect
 * createVectorizePass to createSuperVectorizePass

Update README.md to explain how to link with MLIR. Update the example gcc to version 8.3.

Update drone.io config to define -DMLIR_DIR

Co-authored-by: Jean Perier <jperier@nvidia.com>

Original-commit: flang-compiler/f18@116f643
Reviewed-on: flang-compiler/f18#1090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants