facebookresearch / CompilerGym

Reinforcement learning environments for compiler and program optimization tasks
https://compilergym.ai/
MIT License
906 stars 127 forks source link

[llvm] Add IR2Vec as an observation space #560

Open ChrisCummins opened 2 years ago

ChrisCummins commented 2 years ago

This adds support for IR2Vec to CompilerGym's LLVM environments.

Credit to co-author @anilavakundu!

This PR supersedes #615. Fixes #449.

codecov-commenter commented 2 years ago

Codecov Report

Merging #560 (adce428) into development (c5b9289) will decrease coverage by 0.34%. The diff coverage is n/a.

@@               Coverage Diff               @@
##           development     #560      +/-   ##
===============================================
- Coverage        88.75%   88.41%   -0.35%     
===============================================
  Files              115      115              
  Lines             7019     7019              
===============================================
- Hits              6230     6206      -24     
- Misses             789      813      +24     
Impacted Files Coverage Δ
compiler_gym/envs/compiler_env.py 88.39% <0.00%> (-3.96%) :arrow_down:
compiler_gym/views/observation.py 97.29% <0.00%> (-2.71%) :arrow_down:
compiler_gym/envs/llvm/datasets/cbench.py 79.42% <0.00%> (-1.09%) :arrow_down:
compiler_gym/service/connection.py 77.04% <0.00%> (-0.99%) :arrow_down:
compiler_gym/envs/gcc/service/gcc_service.py 96.70% <0.00%> (-0.37%) :arrow_down:
...loop_tool/service/loop_tool_compilation_session.py 90.47% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c5b9289...adce428. Read the comment docs.