Skip to content

Conversation

@ShangkunLi
Copy link
Collaborator

In this pr:

  • promote live-in values in each bb to the block arguments
  • promote the func arguments to neura.constants so that we can predicate and map these func arguments

@ShangkunLi
Copy link
Collaborator Author

Hi @tancheng, it seems we don't have a unified version of clang right now, which is why this test failed. Do we need to build the latest version of clang in the workflow? Or just sync the clang version to 14 as mentioned in #19.

@tancheng
Copy link
Contributor

Hi @tancheng, it seems we don't have a unified version of clang right now, which is why this test failed. Do we need to build the latest version of clang in the workflow? Or just sync the clang version to 14 as mentioned in #19.

Error msg:

/home/runner/work/dataflow/dataflow/test/c2llvm2mlir/Output/test.mlir.script: line 1: /home/runner/work/dataflow/dataflow/llvm-project/build/./bin/clang++: No such file or directory

Why these tests succeed on current master? There should be clang++ installed in github action, right?

@ShangkunLi
Copy link
Collaborator Author

Hi @tancheng, it seems we don't have a unified version of clang right now, which is why this test failed. Do we need to build the latest version of clang in the workflow? Or just sync the clang version to 14 as mentioned in #19.

Error msg:

/home/runner/work/dataflow/dataflow/test/c2llvm2mlir/Output/test.mlir.script: line 1: /home/runner/work/dataflow/dataflow/llvm-project/build/./bin/clang++: No such file or directory

Why these tests succeed on current master? There should be clang++ installed in github action, right?

Because I changed the test/lit.cfg.in file to make tests use the clang built directly from source code, and I added the built scripts to build the clang in the latest commit.

In previous tests, clang++ uses the clang installed in github action.

I prefer to use the clang built from the same source code as the mlir to keep consistency, WDYT? (Let's see how many hours it would take to build both clang & mlir and then make a decision)

@ShangkunLi ShangkunLi marked this pull request as ready for review July 21, 2025 05:19
@tancheng
Copy link
Contributor

Hi @tancheng, it seems we don't have a unified version of clang right now, which is why this test failed. Do we need to build the latest version of clang in the workflow? Or just sync the clang version to 14 as mentioned in #19.

Error msg:

/home/runner/work/dataflow/dataflow/test/c2llvm2mlir/Output/test.mlir.script: line 1: /home/runner/work/dataflow/dataflow/llvm-project/build/./bin/clang++: No such file or directory

Why these tests succeed on current master? There should be clang++ installed in github action, right?

Because I changed the test/lit.cfg.in file to make tests use the clang built directly from source code, and I added the built scripts to build the clang in the latest commit.

In previous tests, clang++ uses the clang installed in github action.

I prefer to use the clang built from the same source code as the mlir to keep consistency, WDYT? (Let's see how many hours it would take to build both clang & mlir and then make a decision)

3h looks fine to me.. Then what should I do on my local docker? Do I need to install a specific llvm/clang version to build mlir? Or do i need that specific llvm/clang to run our test?

@ShangkunLi
Copy link
Collaborator Author

Hi @tancheng, it seems we don't have a unified version of clang right now, which is why this test failed. Do we need to build the latest version of clang in the workflow? Or just sync the clang version to 14 as mentioned in #19.

Error msg:

/home/runner/work/dataflow/dataflow/test/c2llvm2mlir/Output/test.mlir.script: line 1: /home/runner/work/dataflow/dataflow/llvm-project/build/./bin/clang++: No such file or directory

Why these tests succeed on current master? There should be clang++ installed in github action, right?

Because I changed the test/lit.cfg.in file to make tests use the clang built directly from source code, and I added the built scripts to build the clang in the latest commit.
In previous tests, clang++ uses the clang installed in github action.
I prefer to use the clang built from the same source code as the mlir to keep consistency, WDYT? (Let's see how many hours it would take to build both clang & mlir and then make a decision)

3h looks fine to me.. Then what should I do on my local docker? Do I need to install a specific llvm/clang version to build mlir? Or do i need that specific llvm/clang to run our test?

Use this cmake cripts to build the clang. And then use the clang++ in build/bin/clang++ instead.

git clone https://github.com/llvm/llvm-project.git
cd llvm-project
git checkout 6146a88
mkdir build && cd build
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir;clang" \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="Native" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="-std=c++17 -frtti" \
-DLLVM_ENABLE_LLD=ON \
-DMLIR_INSTALL_AGGREGATE_OBJECTS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

cmake --build . --target check-mlir
cmake --build . --target check-clang

@tancheng
Copy link
Contributor

Hi @tancheng, it seems we don't have a unified version of clang right now, which is why this test failed. Do we need to build the latest version of clang in the workflow? Or just sync the clang version to 14 as mentioned in #19.

Error msg:

/home/runner/work/dataflow/dataflow/test/c2llvm2mlir/Output/test.mlir.script: line 1: /home/runner/work/dataflow/dataflow/llvm-project/build/./bin/clang++: No such file or directory

Why these tests succeed on current master? There should be clang++ installed in github action, right?

Because I changed the test/lit.cfg.in file to make tests use the clang built directly from source code, and I added the built scripts to build the clang in the latest commit.
In previous tests, clang++ uses the clang installed in github action.
I prefer to use the clang built from the same source code as the mlir to keep consistency, WDYT? (Let's see how many hours it would take to build both clang & mlir and then make a decision)

3h looks fine to me.. Then what should I do on my local docker? Do I need to install a specific llvm/clang version to build mlir? Or do i need that specific llvm/clang to run our test?

Use this cmake cripts to build the clang. And then use the clang++ in build/bin/clang++ instead.

git clone https://github.com/llvm/llvm-project.git
cd llvm-project
git checkout 6146a88
mkdir build && cd build
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir;clang" \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="Native" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="-std=c++17 -frtti" \
-DLLVM_ENABLE_LLD=ON \
-DMLIR_INSTALL_AGGREGATE_OBJECTS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

cmake --build . --target check-mlir
cmake --build . --target check-clang

Plz update README.md then.

@tancheng tancheng added the new feature New feature or request label Jul 21, 2025
@ShangkunLi ShangkunLi merged commit 8ff1cec into coredac:main Jul 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants