google / google/gematria

Improve the density of runtime annotations collected.

Open
#242 0 comments 0 reactions 1 assignee Claimed by @virajbshah View on GitHub
Dominant language
Python
Stars
95
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Gematria models show an improvement in performance on tricky code snippets when runtime annotations are enabled, but not to the degree we would have liked to see.

This is suspected to be a result of poor density of runtime annotations - i.e. very many (pseudo-)basic blocks with instructions that evidently cache miss don't have the corresponding cache miss annotation, because cache misses caused by those instruction are "missed" while sampling.

In attempt to get more samples, so far we've tried to:
- change the sampling frequency (`perf record -F`),
- change the number of events counted before a sample is recorded (`perf record -c`).

But it might take some more investigating/experimenting with `perf` to try to record a satisfactory amount of samples. To illustrate, `perf record -c 1 ...` **should** record as many samples every single sample, but might not be doing so because we were also counting `CYCLES` events, and doing so at that frequency might have adverse effects on how many samples we end up collecting.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.