[code-reflection] Integrated: Cache kernel call sites based on lambdaOp location
Gary Frost
gfrost at openjdk.org
Wed Dec 24 13:09:44 UTC 2025
On Wed, 24 Dec 2025 13:04:01 GMT, Gary Frost <gfrost at openjdk.org> wrote:
> Recently discovered a bug with MINIMIZE_COPIES turned on (Game of life)
>
> First time we saw the compute dispatch we located the compute entrypoint which had no pre/post access.
>
> We then created compute and kernel callgraphs and injected pre/post mutate calls in the whole compute callgraph (including the lambda) we were processing.
>
> On the first call the kernel executed just fine.
>
> On subsequent compute calls we tried to crack the compute lambda again...
> This time we tripped over the now 'mutated' lambda (with pre/post access mutations)
>
> Turned out that we were doing more work than needed on each dispatch.
>
> So now we cache the callsite and only look through the model to crack the lambda and process the callgraphs once.
>
> So this turned out to be not only more correct (and stable) it also brought a not insignificant perf gain.
This pull request has now been integrated.
Changeset: 2ac0eff7
Author: Gary Frost <gfrost at openjdk.org>
URL: https://git.openjdk.org/babylon/commit/2ac0eff7345088426dd22ac577cedb9b3ae7753c
Stats: 66 lines in 6 files changed: 13 ins; 30 del; 23 mod
Cache kernel call sites based on lambdaOp location
-------------
PR: https://git.openjdk.org/babylon/pull/786
More information about the babylon-dev
mailing list