-
Notifications
You must be signed in to change notification settings - Fork 130
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
[WIP] Trying to Dump IR or Line Numbers of Loops #493
Conversation
Codecov Report
@@ Coverage Diff @@
## development #493 +/- ##
===============================================
- Coverage 87.93% 87.43% -0.51%
===============================================
Files 111 113 +2
Lines 6182 6397 +215
===============================================
+ Hits 5436 5593 +157
- Misses 746 804 +58
Continue to review full report at Codecov.
|
Hey @mostafaelhoushi, I have seen similar errors before. I think the problem is that there is some library missing in the linker flags for LLVM I define here which causes the required https://github.com/ChrisCummins/bazel_llvm/blob/development/10.0.0/BUILD#L477-L672 To be honest, in the one time I encountered a similar problem, I ended up working around it rather than fixing it, because the debugging loop was so slow 😬 I might get a bit of time towards the start of next week to try and see if I can fix it. If not, is there an alternative API you can call to dump the line numbers? Cheers, |
@mostafaelhoushi you may find that this kind of error goes away when building with cmake (#498) rather than my janky bazel integration. It isn't yet a full replacement for the bazel build but this may be enough to unblock you. Cheers, |
Perfect! I will try it with the docker. Thanks Chris! |
I have good news. And then CMake made it easier for me to debug the build error. It turned out that we need to build LLVM in debug mode or add Instead of having to modify the build of LLVM, I was able to invoke So now, we can dump the loop with both bazel and CMake! I will clean up the code and update this PR. |
Fantastic work @mostafaelhoushi! This is a great example of the value of being able to customize the LLVM build that CompilerGym uses. Nice! cc @sogartar |
Will close this PR as I am working on another branch to dump loop data |
I have been trying to print line numbers of loops, or print the IR content of loops (in order to extract loop features separately) using these statements:
but they all lead to this error:
I have tried to add
libLLVMRuntimeDyld
as a TARGET to the build system as shown in this pull request but it didn't work. Perhaps I have added it the wrong way. Can @ChrisCummins please take a look?