Closed EllisLambda closed 10 months ago
We had better dive into this issue after PR https://github.com/buddy-compiler/buddy-benchmark/pull/73 and https://github.com/buddy-compiler/buddy-mlir/pull/187 are merged, since this issue depends on the previous PRs, but they haven't been fully settled. Other reviewers may find it hard to understand the background hided in a downstream file.
We had better dive into this issue after PR #73 and buddy-compiler/buddy-mlir#187 are merged, since this issue depends on the previous PRs, but they haven't been fully settled. Other reviewers may find it hard to understand the background hided in a downstream file.
The problem had been solved.
Is your feature request related to a problem? Please describe. I tried to use these CMake code for the BatchMatMulBroadcast.mlir in my PR to compile static library.
-fopenmp
could only be used in clang and I have ruled out the possibility that the problem arises from using clang instead of llc.Under normal circumstances, OpenMP requires dynamic library to start. I originally wanted to try statically linking the OpenMP library, gcc has libgomp.a and the compiler can do that, but I found that the Clang/LLVM official discourages this approach.
nm -n
shows that the entry name of the library is namedbatch_matmul_broadcast_64_omp..omp_par
, not starts with_mlir_ciface_
, also the C++ program cannot pass the Memref parameters to the MLIR function, I guess it should be called by the OpenMP dynamic library, but I can't find the way to use it.Describe the solution you'd like Discuss various possibilities to solve this problem. Perhaps correctly utilizing
OpenMP::OpenMP_CXX
in CMake is a good idea.