Skip to content
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

CompilerGym v0.2.3 #630

Merged
merged 273 commits into from
Mar 18, 2022
Merged

CompilerGym v0.2.3 #630

merged 273 commits into from
Mar 18, 2022

Conversation

ChrisCummins
Copy link
Contributor

This release brings in deprecating changes to the core env.step() routine, and lays the groundwork for enabling new types of compiler optimizations to be exposed through CompilerGym. Many thanks to code contributors: @mostafaelhoushi, @sogartar, @KyleHerndon, @uduse, @parthchadha, and @xtremey!

Highlights of this release include:

  • Added a new TextSizeInBytes observation space for LLVM (#575).
  • Fixed a bug in which temporary directories created by the LLVM environment were not cleaned up (#592).
  • [Backend] The function createAndRunCompilerGymService now returns an int, which is the exit return code (#592).
  • Improvements to the examples documentation (#548) and FAQ (#586)

Deprecations and breaking changes:

  • CompilerEnv.step no longer accepts a list of actions (#627). A new method, CompilerEnv.multistep provides this functionality. This is to provide compatibility with environments whose action spaces are lists. To update your code, replace any calls to env.step() which take a list of actions to use env.multistep(). Thanks @sogartar!
  • The arguments observations and rewards to step() have been renamed observation_spaces and reward_spaces, respectively (#627).
  • Reward.id has been renamed Reward.name (#565, #612). Thanks @parthchadha!
  • The backend protocol buffer schema has been updated to natively support more types of observation and action, and to support nested spaces (#531). Thanks @sogartar!

Full Changelog: v0.2.2...v0.2.3

sahirgomez1 and others added 21 commits March 16, 2022 12:20
CompilerEnv.step() currently accepts two types for the "action"
argument: a scalar action, or an iterable of actions. This kind of
type overloading does not work for list types.

This adds a new method, CompilerEnv.multistep(), that explicitly takes
takes an iterable sequence of actions. If you want to run multiple
actions in a single step, call this new method. Calling
CompilerEnv.step() with a list of actions still works, though with a
deprecation warning. In the v0.2.4 release support for lists of
actions in CompilerEnv.step() will be removed.

Fixes #610.
This makes the following changes:

- Changes env.step() `action` to accept only a single action, with a
deprecation warning if a list of actions are provided.

- Renames env.step() `observations` to `observation_spaces`. The old
parameter name is still accepted with a deprecation warning.

- Renames env.step() `rewards` to `reward_spaces`. The old parameter
name is still accepted with a deprecation warning.
Using setup.py to install dependencies causes issues with some
packages, like TensorFlow.
Add missing BUILD file for //compiler_gym/third_party/programl.
The makefile integration test is hardcoded to require llvm-11.
[examples] Split Makefile to be standalone and improve readme.
…n-list

Split CompilerEnv.step() into two methods for singular or lists of actions (take 2)
…pec-errors

[core] Better error message is proto is invalid.
@ChrisCummins ChrisCummins added this to the v0.2.3 milestone Mar 18, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 18, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2022

Codecov Report

Merging #630 (57724e1) into stable (100967a) will increase coverage by 1.97%.
The diff coverage is 91.31%.

@@            Coverage Diff             @@
##           stable     #630      +/-   ##
==========================================
+ Coverage   86.53%   88.50%   +1.97%     
==========================================
  Files         113      115       +2     
  Lines        6393     7066     +673     
==========================================
+ Hits         5532     6254     +722     
+ Misses        861      812      -49     
Impacted Files Coverage Δ
compiler_gym/envs/gcc/gcc_rewards.py 100.00% <ø> (ø)
compiler_gym/envs/llvm/llvm_env.py 88.18% <ø> (+0.90%) ⬆️
compiler_gym/leaderboard/llvm_instcount.py 92.78% <ø> (ø)
compiler_gym/random_replay.py 0.00% <0.00%> (ø)
compiler_gym/service/proto/__init__.py 100.00% <ø> (ø)
compiler_gym/third_party/inst2vec/rgx_utils.py 86.53% <ø> (ø)
compiler_gym/util/executor.py 74.43% <0.00%> (ø)
compiler_gym/util/flags/benchmark_from_flags.py 80.00% <ø> (ø)
compiler_gym/views/observation.py 100.00% <ø> (ø)
compiler_gym/wrappers/datasets.py 95.91% <ø> (ø)
... and 68 more

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 faca594...57724e1. Read the comment docs.

@ChrisCummins ChrisCummins merged commit 3afdfbe into stable Mar 18, 2022
@ChrisCummins ChrisCummins deleted the release/v0.2.3 branch March 18, 2022 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants