Closed
No-op: onnxruntime-genai#2188 is C++ runtime only, nothing to propagate to the Python builder#383
Conversation
Copilot
AI
changed the title
[WIP] Propagate changes from pull request #2188
No-op: onnxruntime-genai#2188 is C++ runtime only, nothing to propagate to the Python builder
Jun 17, 2026
This was referenced Jun 17, 2026
Closed
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.
The task was to propagate onnxruntime-genai#2188 ("Fix Gemma4 multimodal processing") into
mbext. After analyzing the upstream diff, no changes are required: the PR modifies only the C++ runtime, whichmbextdoes not mirror.Findings
src/config.{cpp,h},src/models/embeddings.{cpp,h},src/models/multi_modal.{cpp,h},src/models/gemma4_multimodal_processor.cpp. Nobuilder.py/ Python changes.mbextmirrors only the Python model builder (src/python/py/models/→modelbuilder/), per the README. The three upstream fixes are all runtime-level:pixel_valuesfloat32-stride trim (NaN fix) — C++memcpy.pixel_position_idsextraction — C++ToBeAssigned()temporary-lifetime bug.per_layer_inputsembedding→decoder forwarding — C++ pipeline wiring + genai_config schema reads.per_layer_inputsexists nowhere in the upstream Python builder (GitHub code search returns only the C++ files). The runtime support landed ahead of any builder, so there is no Python layout that emits it to propagate.modelbuilder/builders/gemma.py(_make_ple_pre_computation/_make_ple_layer_block), computed internally in a monolithic decoder and covered by existingtests/fast/test_random_gemma4.pyPLE tests. It does not depend on the new runtimeper_layer_inputsboundary.Recommendation
Close the tracking issue as not applicable to the Python builder.
A separate, larger effort could add decoder-side
per_layer_inputsas a model input under--exclude_embeds(withdecoder.inputs.per_layer_inputs/embedding.outputs.per_layer_inputsin genai_config), but that would putmbextahead of upstream rather than propagating #2188, and there is no Gemma4 embedding-model producer or test harness here to validate it. Happy to scope that as a follow-up if desired.