Visitar URL original
[Native] Gather the rows of x[:, rows] in the ggml engine by metascroy · Pull Request #25008 · pytorch/executorch · GitHub
Skip to content

[Native] Gather the rows of x[:, rows] in the ggml engine - #25008

Draft
metascroy wants to merge 1 commit into
offgraph-kv-ggml-cell-cachefrom
offgraph-kv-ggml-index-rows
Draft

metascroy wants to merge 1 commit into
offgraph-kv-ggml-cell-cachefrom
offgraph-kv-ggml-index-rows

Conversation

@metascroy

@metascroy metascroy commented Nov 13, 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

Hugging Face selects the rows a logits_to_keep index tensor names as hidden[:, rows] over a [1, T, D] hidden state, which exports as aten.index.Tensor with a None before the index. The ggml engine gathered rows only of a matrix with one index tensor. It now takes that case too: over a leading size-1 dimension it gathers rows of the [T, D] matrix and keeps the leading 1. The indices are still checked on the host.

Test plan

A new engine test gathers two rows of a [1, 6, 8] input and rejects an out-of-range row. The C++ test harness gains an optional-tensor-list argument to build it.


Authored with Claude Code.

Hugging Face selects the rows a logits_to_keep index tensor names as
hidden[:, rows] over a [1, T, D] hidden state, which exports as
aten.index.Tensor with a None before the index. The ggml engine gathered
rows only of a matrix with one index tensor. It now takes that case too:
over a leading size-1 dimension it gathers rows of the [T, D] matrix and
keeps the leading 1. The indices are still checked on the host.
@pytorch-bot

pytorch-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 137 New Failures, 7 Unrelated Failures, 10 Unclassified Failures

As of commit c0d7b51 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 13, 2026
This was referenced Nov 13, 2026

This branch had an error being deployed

1 failed deployment
cadence — c0d7b519 Deployed Nov 13, 2026 by metascroy via hifi1s-build / hifi1s #38148
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