Support: cache prebuilt runtime arena images#1193
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a global mutex-protected cache for prebuilt PTO2 runtime arena images keyed on resolved ring/scheduler configuration. On cache hits, cached bytes are uploaded directly to the device arena. A new ChangesPrebuilt Runtime Arena Cache and Pointer Rebind
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a caching mechanism for prebuilt runtime arena images on the host to avoid redundant rebuilds. It also adds a new function, runtime_rebind_device_pointers_from_layout, to refresh dynamic device addresses (such as shared memory and global memory heap bases) on the AICPU side when a cached image is reused. The review feedback points out a potential issue in this new function where sm_dev_base and gm_heap_dev_base are used without null checks, which could lead to undefined behavior or crashes if either pointer is null.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
6a5bb8d to
492a6f1
Compare
- Keep the cache on the DeviceRunner lifetime so host image and device arena bases stay bound together - Reuse cached runtime-arena images on bind hits and defer static size derivation to miss paths - Wire the cache hooks through onboard and sim HostApi for both a2a3 and a5
492a6f1 to
3e9bef3
Compare
Summary
Testing