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

inference: fixes cache lookup with extended lattice elements #53953

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

aviatesk
Copy link
Sponsor Member

@aviatesk aviatesk commented Apr 4, 2024

The previous local cache lookup system wasn't working well for caches with extended lattice elements that are transformed from the caller context to the callee context by matching_cache_argtypes. To address this, the current commit moves the call to matching_cache_argtypes right before cache_lookup, instead of within the InferenceResult constructor.

Note that this adjustment leads to given_argtypes being allocated even when there's a cache hit, potentially affecting performance negatively. I'm looking to further optimize matching_cache_argtypes in an upcoming commit.

@aviatesk
Copy link
Sponsor Member Author

aviatesk commented Apr 4, 2024

@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/cache-lookup-extended-lattice branch from c65542c to 5975795 Compare April 5, 2024 15:42
@aviatesk
Copy link
Sponsor Member Author

aviatesk commented Apr 5, 2024

@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/cache-lookup-extended-lattice branch from 5975795 to f36db1b Compare April 6, 2024 08:57
@aviatesk
Copy link
Sponsor Member Author

aviatesk commented Apr 6, 2024

@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/cache-lookup-extended-lattice branch from f36db1b to 6e0c259 Compare April 6, 2024 14:12
@aviatesk
Copy link
Sponsor Member Author

aviatesk commented Apr 6, 2024

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

@aviatesk aviatesk force-pushed the avi/cache-lookup-extended-lattice branch from 6e0c259 to 13e854f Compare April 6, 2024 14:23
@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/cache-lookup-extended-lattice branch from 13e854f to 435cef5 Compare April 8, 2024 03:54
The previous local cache lookup system wasn't working well for caches
with extended lattice elements that are transformed from the caller
context to the callee context by `matching_cache_argtypes`. To address
this, the current commit moves the call to `matching_cache_argtypes`
right before `cache_lookup`, instead of within the `InferenceResult`
constructor.

Note that this adjustment leads to `given_argtypes` being allocated even
when there's a cache hit, potentially affecting performance negatively.
I'm looking to further optimize `matching_cache_argtypes` in an upcoming
commit.
@aviatesk aviatesk force-pushed the avi/cache-lookup-extended-lattice branch from 435cef5 to a5356a4 Compare April 8, 2024 08:25
@aviatesk aviatesk merged commit 0e28cf6 into master Apr 8, 2024
7 checks passed
@aviatesk aviatesk deleted the avi/cache-lookup-extended-lattice branch April 8, 2024 10:46
aviatesk added a commit to JuliaDiff/Diffractor.jl that referenced this pull request Apr 9, 2024
aviatesk added a commit that referenced this pull request Apr 9, 2024
External abstract interpreters (mainly Diffractor) may want to
ir-interpret top-level code chunk.
aviatesk added a commit to JuliaDiff/Diffractor.jl that referenced this pull request Apr 9, 2024
aviatesk added a commit to JuliaDiff/Diffractor.jl that referenced this pull request Apr 9, 2024
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.

2 participants