Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24636
Note: Links to docs will display an error until the docs builds have been completed. ❌ 135 New Failures, 7 Unrelated Failures, 10 Unclassified FailuresAs of commit b2aebff with merge base c7f7931 ( 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. |
This was referenced Nov 5, 2026
This was referenced Nov 5, 2026
metascroy
force-pushed
the
offgraph-kv-engine-options
branch
from
November 5, 2026 22:29
4b5de65 to
0c97fdf
Compare
metascroy
force-pushed
the
offgraph-kv-native-export
branch
from
November 5, 2026 22:29
01fcf32 to
05200ca
Compare
metascroy
force-pushed
the
offgraph-kv-engine-options
branch
from
November 11, 2026 18:05
0c97fdf to
4ec9257
Compare
metascroy
force-pushed
the
offgraph-kv-native-export
branch
from
November 11, 2026 18:05
05200ca to
655cb68
Compare
kiymetakdemir
approved these changes
Nov 11, 2026
| virtual std::unique_ptr<EngineContext> create_context_with_options( | ||
| std::shared_ptr<const Program> program, | ||
| std::shared_ptr<const Package> package, | ||
| const EngineOptions& options); |
Contributor
There was a problem hiding this comment.
EngineOptions reads like the generic form of GgmlEngineOptions. Maybe EngineContextOptions, to match EngineContext?
This was referenced Nov 12, 2026
EngineHost::create_context_with_options takes named string options for one context, such as the registry key of a KV cache the caller installed. The default implementation rejects any option, so engines opt in to the options they understand; create_context and its callers are unchanged.
metascroy
force-pushed
the
offgraph-kv-native-export
branch
from
November 14, 2026 00:18
655cb68 to
c3d3ba5
Compare
metascroy
force-pushed
the
offgraph-kv-engine-options
branch
from
November 14, 2026 00:18
4ec9257 to
b2aebff
Compare
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Adds
EngineHost::create_context_with_options(program, package, options), whereEngineOptionsis astd::map<std::string, std::string>of named load-time settings for one context. The next PR uses it to pass the registry key of a KV cache the caller installed (llm_cache_registry_key).The default implementation throws
std::invalid_argumenton any option and otherwise callscreate_context, so each engine opts in to the options it understands.create_contextand its callers (Session, Module) are unchanged.An option can bind caller-owned state, like a KV cache, into several contexts. The doc comment says those contexts aren't isolated from each other: the caller must serialize their executables as if they shared one context.
This PR doesn't depend on the two below it; it's stacked to keep the series linear.
Test plan
run_hf_llm_ggml, and rannative_ggml_engine_test: 36 passed.GpuUnavailableOnCpuVariantfails as it does onmain, because this build has Metal enabled.