[code-reflection] Integrated: Cache kernel call sites based on lambdaOp location
Gary Frost
gfrost at openjdk.org
Wed Dec 24 13:09:43 UTC 2025
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.
-------------
Commit messages:
- Cachekernel call sites based on lambdaOp location
Changes: https://git.openjdk.org/babylon/pull/786/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=786&range=00
Stats: 66 lines in 6 files changed: 13 ins; 30 del; 23 mod
Patch: https://git.openjdk.org/babylon/pull/786.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/786/head:pull/786
PR: https://git.openjdk.org/babylon/pull/786
More information about the babylon-dev
mailing list