Created
February 6, 2025 23:09
-
-
Save wecing/3123c1a85c6e52794b034d7f7247148e to your computer and use it in GitHub Desktop.
compile MLIR with cmake / bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd llvm-project | |
| # bazel | |
| cd utils/bazel | |
| bazel build @llvm-project//mlir/... # --action_env=BAZEL_CXXOPTS='-std=c++17' | |
| # cmake - see https://mlir.llvm.org/getting_started/ | |
| mkdir build | |
| cd build | |
| cmake -G Ninja ../llvm \ | |
| -DLLVM_ENABLE_PROJECTS=mlir \ | |
| -DLLVM_BUILD_EXAMPLES=ON \ | |
| -DLLVM_TARGETS_TO_BUILD="Native;NVPTX;AMDGPU" \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_ENABLE_ASSERTIONS=ON | |
| cmake --build . --target check-mlir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment