Taking Runtime observation repeatedly gets slower over time
See original GitHub issue🐛 Bug
After creating an environment, taking the runtime observation from the same environment progressively takes more time to compute.
Log from the MRE below:
Completed in 61.9ms
Completed in 60.3ms
Completed in 92.3ms
Completed in 63.4ms
Completed in 60.7ms
Completed in 64.7ms
...
Completed in 223.1ms
Completed in 252.4ms
Completed in 237.7ms
Completed in 219.0ms
Completed in 221.4ms
Completed in 235.5ms
To Reproduce
Steps to reproduce the behavior:
- Create an environment.
- Repeatedly take the runtime observation.
import gym
import compiler_gym
from compiler_gym.util.timer import Timer
with gym.make('llvm-v0') as env:
env.reset(benchmark='benchmark://cbench-v1/bitcount')
while True:
with Timer(f'Completed'):
env.observation.Runtime()
Expected behavior
Taking the runtime observation repeatedly shouldn’t get slower progressively.
Environment
- CompilerGym: development branch
- How you installed CompilerGym (conda, pip, source): source
- OS: Ubuntu 18.04 LTS
- Python version: 3.9.6
- Build command you used (if compiling from source):
make bdist_wheel-linux
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Why do programs get slower with time? - Johnny's Software Lab
In this post we talk about the reasons why software becomes slower as new features are added or the data set size grows....
Read more >Why is my SQL Server Query Suddenly Slow? | How To Fix
The first task is to investigate what was happening on the SQL Server over the time the application was running abnormally slowly.
Read more >Why does runtime decrease the more times I execute a ...
Learn more about decreasing runtime. ... Some of the answer is the Just In Time compiler. ... Try measuring something that takes longer....
Read more >Is there a way to circumvent Python list.append() becoming ...
The reporter observes that appending complex objects (objects that aren't numbers or strings) to a list slows linearly as the list grows in...
Read more >Runtime slowdown when repeatedly fitting Prophet model in ...
Using Python, I noticed that when running a loop that fits a Prophet model in each iteration, each iteration seems to take an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @aymanizz, thanks for the report, and for the minimal repro script! I was able to successfully reproduce the problem on my end. Let me take a look a look at this next week and get back to you.
Cheers, Chris
#398 has been merged into development. Please update and let me know if you are able to reproduce the problem.
Cheers, Chris