Skip to content

Report a single-sequence cache's length on SequenceControl - #24952

Closed
metascroy wants to merge 1 commit into
offgraph-kv-mg-exportfrom
offgraph-kv-sequence-length
Closed

metascroy wants to merge 1 commit into
offgraph-kv-mg-exportfrom
offgraph-kv-sequence-length

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

BatchControl answers pos() for each sequence, but SequenceControl offered no way to ask where its one sequence stands; only SequenceCache, which a control plane does not include, had length(). This adds length() to the face. Every implementation (SequenceCache, MLXSequenceCache) already had it, so this only marks those overrides.

Test plan

cache_test.cpp: the control face reports the length through commits, rewinds and clears. MLX and CUDA weren't built locally; the change there is the override keyword.


Authored with Claude Code.

BatchControl answers pos() for each sequence, but SequenceControl offered no
way to ask where its one sequence stands; only SequenceCache, which a control
plane does not include, had length(). Add length() to the face. Every
implementation (SequenceCache and MLXSequenceCache) already had it, so this
only marks those overrides.
@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/24952

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 170 New Failures, 6 Unrelated Failures, 23 Unclassified Failures

As of commit ba42f2b 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:

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

Copy link
Copy Markdown
Contributor Author

Superseded: the native executor now serves sessions from a real multi-sequence ggml cache (#25007) instead of adapting the single-sequence cache, so this is no longer needed.

@metascroy metascroy closed this Nov 13, 2026
@metascroy
metascroy deleted the offgraph-kv-sequence-length branch November 13, 2026 00:58

This branch had an error being deployed

1 failed deployment
cadence — ba42f2bb Deployed Nov 12, 2026 by metascroy
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