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

carefully cache freshly-inferred edge for call-site inlining #51975

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Nov 1, 2023

Currently call-site inlining fails on freshly-inferred edge if its source isn't inlineable. This happens because such sources are exclusively cached globally. For successful call-site inlining, it's necessary to cache these locally also, ensuring the inliner can access them later.

To this end, the type of the cache_mode field of InferenceState has been switched to UInt8 from Symbol. This change allows it to encode multiple caching strategies. A new caching mode can be introduced, e.g. VOLATILE_CACHE_MODE, in the future.

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk aviatesk force-pushed the avi/callsite-inline-fresh-edge branch 3 times, most recently from c033de1 to f480b9a Compare November 2, 2023 00:53
Currently call-site inlining fails on freshly-inferred edge if its
source isn't inlineable. This happens because such sources are
exclusively cached globally. For successful call-site inlining, it's
necessary to cache these locally also, ensuring the inliner can access
them later.

To this end, the type of the `cache_mode` field of `InferenceState` has
been switched to `UInt8` from `Symbol`. This change allows it to
represent multiple caching strategies. A new caching mode can be
introduced, e.g. `VOLATILE_CACHE_MODE`, in the future.
@aviatesk aviatesk force-pushed the avi/callsite-inline-fresh-edge branch from f480b9a to 8415b88 Compare November 5, 2023 03:10
@oscardssmith oscardssmith merged commit 9c42df6 into master Nov 5, 2023
7 checks passed
@oscardssmith oscardssmith deleted the avi/callsite-inline-fresh-edge branch November 5, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants