-
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
Change CompilerEnv.step to accept a single action #606
Conversation
Codecov Report
@@ Coverage Diff @@
## development #606 +/- ##
===============================================
- Coverage 88.25% 87.73% -0.52%
===============================================
Files 114 114
Lines 6708 6718 +10
===============================================
- Hits 5920 5894 -26
- Misses 788 824 +36
Continue to review full report at Codecov.
|
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.
Hi @sogartar,
I agree that CompilerEnv.step should accept a single action, but there's a couple of things we need to do before we make this change:
- We need to add a deprecation warning on
env.step([1, 2, 3])
, and cut a release of CompilerGym with this warning so that users get advance notice that their code will break. - We need to add a new way for specifying a list of actions to run in a single step. The benefit of
env.step(actions)
overfor a in actions: env.step(a)
is that the former can be executed in a single RPC invocation, significantly reducing the overhead of round trips to the backend, and removing the need to calculate observation/rewards for each individual step. We measured speedups of ~3x on typical LLVM workloads using this (more details here).
I have a draft PR for (2) already work-in-progress. If you're happy for me to, I can pull in some of your other fixes from this commit and send you the PR when ready.
I made a tracking issue for this, #610.
Cheers,
Chris
I will add the multistep to this
That is OK. In this PR I change a lot of tests to not use mltistep actions. These pieces would have to be reverted. |
Thanks! I cherry-picked your commit into #606 and selectively reverted some of the test refactors. It's still WIP, need to figure out the best way for wrappers to interact with multiple different step() implementations. Cheers, |
Superseded by #627. |
No description provided.