-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add Observations to Loop Optimizations Environment #570
Add Observations to Loop Optimizations Environment #570
Conversation
Codecov Report
@@ Coverage Diff @@
## development #570 +/- ##
===============================================
+ Coverage 88.17% 88.20% +0.02%
===============================================
Files 114 114
Lines 6708 6708
===============================================
+ Hits 5915 5917 +2
+ Misses 793 791 -2
Continue to review full report at Codecov.
|
examples/loop_optimizations_service/service_py/loops_opt_service.py
Outdated
Show resolved
Hide resolved
@ChrisCummins, I addressed the comments and enabled Programl observation (also moved However, I am currently printing programl observation as a Json string. Is that how the originl CompilerGym LLVM environments print Programl observation? |
Thanks! And yep,
This is exactly what the LLVM environment does: CompilerGym/compiler_gym/envs/llvm/service/Observation.cc Lines 101 to 111 in 11784d4
However, since merging #531, this could be made more efficient for the LLVM environment by embedding the ProgramGraph protocol buffer directly in the observation, removing the need to do a JSON serialize/deserialize. I haven't got around to doing that refactor yet though. Cheers, |
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 agree with your TODO list in the PR message about adding some extra test cases to cover these new observations. Otherwise, LGTM!
bca30ef
to
c04cb0b
Compare
examples/loop_optimizations_service/service_py/loops_opt_service.py
Outdated
Show resolved
Hide resolved
0a9413d
to
0a40983
Compare
compiler_gym::third_party::autophase:compute_autophase | ||
compiler_gym::third_party::programl:compute_programl |
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.
Building on Linux is failing as I get this error (see CI log here):
-- Configuring done
CMake Error at build_tools/cmake/cg_macros.cmake:281 (add_dependencies):
The dependency target
"compiler_gym__third_party__autophase_compute_autophase" of target
"examples__loop_optimizations_service__service_py__loops_opt_service" does
not exist.
Call Stack (most recent call first):
build_tools/cmake/cg_py_library.cmake:78 (cg_add_data_dependencies)
examples/loop_optimizations_service/service_py/CMakeLists.txt:8 (cg_py_library)
CMake Error at build_tools/cmake/cg_macros.cmake:281 (add_dependencies):
The dependency target
"compiler_gym__third_party__programl_compute_programl" of target
"examples__loop_optimizations_service__service_py__loops_opt_service" does
not exist.
Call Stack (most recent call first):
build_tools/cmake/cg_py_library.cmake:78 (cg_add_data_dependencies)
examples/loop_optimizations_service/service_py/CMakeLists.txt:8 (cg_py_library)
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Error: Process completed with exit code 1.
I tried many times to fix it, and with the issue that CMake configuration takes multiple hours (see #595 ), it was really difficult to solve it. So I merged for now and will fix it later.
ProGraml
I created a smallcompute_programl.cc
program. I tried first to place it inexternal/programl
but was getting build errors, so I temporarily placed it in the loop opt example directory.Issues:
compute_autophase
separately before we can run our example:TODO (before merging):
compute_autophase
compute_programl
to a suitable directory