Skip to content

[Native] Share the off-graph cache geometry with other callers - #24954

Draft
metascroy wants to merge 1 commit into
offgraph-kv-mg-exportfrom
offgraph-kv-shared-cache-geometry
Draft

metascroy wants to merge 1 commit into
offgraph-kv-mg-exportfrom
offgraph-kv-shared-cache-geometry

Conversation

@metascroy

@metascroy metascroy commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Stack

Off-graph KV cache for the native ggml engine, through serving Muse Glimmer on it. Review bottom-up; each PR builds and passes its tests on its own.

Summary

The native LLM runner derived the off-graph KV cache a method needs in code private to the runner: layers from the update_and_attend calls, windows from the package metadata. This moves it to the header-only backends/native/runtime/OffGraphCache.h, along with the token bound that sizes a ring layer, so a serving executor builds the same cache. The runner's behavior is unchanged.

Test plan

The runner still verifies golden samples of a sliding-window package and a Muse Glimmer slice.


Authored with Claude Code.

@pytorch-bot

pytorch-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24954

Note: Links to docs will display an error until the docs builds have been completed.

❌ 135 New Failures, 3 Cancelled Jobs, 1 Pending, 7 Unrelated Failures, 10 Unclassified Failures

As of commit 8654920 with merge base c7f7931 (image):

NEW FAILURES - The following jobs have failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 12, 2026
@metascroy
metascroy force-pushed the offgraph-kv-shared-cache-geometry branch from 370c1ae to 03f97b0 Compare November 13, 2026 00:57
@metascroy
metascroy changed the base branch from offgraph-kv-sequence-batch-control to offgraph-kv-mg-export November 13, 2026 00:57
The native LLM runner derived the off-graph KV cache a method needs, its
layers from the update_and_attend calls and their windows from the package
metadata, in code private to the runner. Move it to the header-only
backends/native/runtime/OffGraphCache.h, with the token bound that sizes a
ring layer, so a serving executor builds the same cache. The runner is
unchanged in behavior.

This branch had an error being deployed

1 failed deployment
cadence — 8654920f Deployed Nov 14, 2026 by metascroy via hifi-build / hifi4 #38319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant