Repository navigation
Conversation
osabnis
force-pushed
the
ov-repeat-zero-dims
branch
from
November 28, 2026 23:37
0f88141 to
dd82178
Compare
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.
Overview
gemma-4-26B-A4B fails on GPU when processing a ubatch without outputs. The MoE expert scales are repeated (
ggml_repeat_4d) to the number of output tokens, which is 0 there. The currentREPEATtranslation rejects an output dimension of 0, and the batchedGET_ROWStakes its data slice from the tiled tensor, whose batch is empty.This change adds support for both operations in this scenario.
Changes
REPEATto accept a destination dimension of size 0.GET_ROWSto take the slice from theTileinput, before the tiling, when the data is aTilethat repeats one slice along axis 1 only (get_batch_tile_source()).test_repeatcase that repeats to an empty dimension ({1, 1, 0, 1}).test_repeat_empty:REPEATto an empty dimension followed byCONCATwith a non-empty tensor. It runs the whole graph (run_whole_graph()) instead of comparing node by node, because node by node an emptyREPEAToutput compares equal even when the backend fails to compute it.Results
Backend operator tests
Tested on GPU (Intel Arc Pro B70):
test_repeat_empty-o CONCAT-o REPEATModel validation
Tested with gemma-4-26B-A4B-it using:
REPEAT input shape ... cannot tile.Requirements