-
Notifications
You must be signed in to change notification settings - Fork 14
[P0] Verify the clang++ version used in the test #18 #19
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
base: main
Are you sure you want to change the base?
[P0] Verify the clang++ version used in the test #18 #19
Conversation
|
Hi @yuqisun, so the apt-installed method works on your local machine/docker? |
Nope :(, revert just now, looks MLIR is not included in apt-install. Have to build by source code. |
What about |
Still doesn't work. We are depending on MLIRArithDialect, MLIRFuncDialect target which are not installed by apt. |
|
Hi @tancheng ,
Thanks, |
| -DLLVM_ENABLE_LLD=ON \ | ||
| -DMLIR_INSTALL_AGGREGATE_OBJECTS=ON \ | ||
| -DLLVM_ENABLE_RTTI=ON \ | ||
| -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this because Ninja cannot auto fix RPATH:
CMake Error at cmake/modules/AddLLVM.cmake:1029 (add_executable):
The install of the llvm-tblgen target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based or XCOFF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.
Call Stack (most recent call first):
cmake/modules/TableGen.cmake:181 (add_llvm_executable)
utils/TableGen/CMakeLists.txt:32 (add_tablegen)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also have DCMAKE_EXPORT_COMPILE_COMMANDS=ON for VS Code users (to avoid warning in the IDE for include paths), I just set it up with copilot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also mention we prefer the clang is also in llvm-19 version?
I am wondering, when we build LLVM-19.x from source, it is compiled using the built-in clang, which may not be llvm-19, right? Then if user install clang in llvm-19, should we update this
dataflow/test/c2llvm2mlir/test.mlir
Line 5 in ff914bc
| // RUN: clang++ -S -emit-llvm -o %t-kernel.ll kernel.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about now: Compile both clang and mlir and add note at the beginning of test.mlir to recommend user to add llvm-19 clang to PATH.
-DLLVM_ENABLE_PROJECTS="clang;mlir" --- To compile clang in llvm-19 but take more time.
.github/workflows/main.yml
Outdated
| # install clang for LLVM build | ||
| - name: install clang | ||
| run: sudo apt-get install -y clang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may already ask, but what is this clang version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default install version is 14.
… enable clang support in LLVM build
… in the IDE for include paths)
…g-version-used-in-the-test
|
|
||
| You can directly pull and use the pre-built Docker image: | ||
| ```sh | ||
| $ docker pull cgra/neura:v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image is pushing in progress:
The push refers to repository [docker.io/cgra/neura]
3b5d14681ffd: Pushing [==================================================>] 12.92GB
346f14bf17b9: Layer already exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uploaded to cgra/neura:v1.

Test to print LLVM version of Github Actions.