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

Reduce size of in-memory benchmark caches #299

Merged
merged 9 commits into from
Jun 23, 2021

Conversation

ChrisCummins
Copy link
Contributor

@ChrisCummins ChrisCummins commented Jun 22, 2021

  • Limit the size of the LLVM benchmark cache at 128 items, with random eviction.
  • Reduce the size of the in-memory Benchmark protocol buffer cache from 512MB to 256MB.
  • Change the type of the StartSessionRequest.benchmark field from a string to a Benchmark message.
  • Add an always_send_benchmark_on_reset option to ConnectionSettings that forces the environment to always send the full Benchmark data to the backend service on every reset(). This is useful for cases where benchmarks are rarely repeated, e.g. for training loops with very large datasets.
  • Only run LLVM initialization once.
  • Some small improvements to service logging.

@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 Jun 22, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2021

Codecov Report

Merging #299 (4fafbe6) into development (89c7897) will decrease coverage by 0.02%.
The diff coverage is 61.53%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #299      +/-   ##
===============================================
- Coverage        82.43%   82.41%   -0.03%     
===============================================
  Files               87       87              
  Lines             4766     4776      +10     
===============================================
+ Hits              3929     3936       +7     
- Misses             837      840       +3     
Impacted Files Coverage Δ
...mpiler_gym/service/runtime/compiler_gym_service.py 21.56% <0.00%> (-0.44%) ⬇️
compiler_gym/envs/compiler_env.py 85.78% <85.71%> (-0.01%) ⬇️
compiler_gym/service/connection.py 74.11% <100.00%> (+0.09%) ⬆️

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 89c7897...4fafbe6. Read the comment docs.

Rather than limiting the size of the LLVM benchmark cache by the
number of bytes in the serialized bitcodes, use a simple counter to
keep track of how many items are cached, and evict 50% of them when a
fixed limit is reached (by default, 128 items).
@ChrisCummins ChrisCummins merged commit ccd6ba7 into facebookresearch:development Jun 23, 2021
@ChrisCummins ChrisCummins deleted the leak-debug branch June 23, 2021 15:15
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.

3 participants