Skip to content

memory : return an error instead of aborting on multi-range on-device state save - #28209

Draft
vahpetr wants to merge 1 commit into
ggml-org:masterfrom
vahpetr:abort-fix-pr
Draft

memory : return an error instead of aborting on multi-range on-device state save#28209
vahpetr wants to merge 1 commit into
ggml-org:masterfrom
vahpetr:abort-fix-pr

Conversation

@vahpetr

@vahpetr vahpetr commented Sep 1, 2026

Copy link
Copy Markdown

state_write in llama-memory-recurrent.cpp calls GGML_ABORT when an on-device sequence state spans more than one cell range, which takes the whole process down. The single-range limit is real (#23520), but a fragmented state should be recoverable, not fatal.

This replaces the abort with a throw — state_seq_get_size / state_seq_get_data already catch it and return 0. Unchanged for the common single-range case. The abort only shows up with on-device state usage (e.g. #28118) at -np > 1.

@vahpetr
vahpetr requested review from a team and ggerganov as code owners September 1, 2026 21:45
@ggml-gh-bot

ggml-gh-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Hi @vahpetr, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • PR Template not respected: Please respect the template when creating a new pull request. Make sure to fill out all required sections.

  • Multiple open PRs from a new contributor: We limit new contributors (those without a previously merged PR) to 1 open PR at a time. You currently have 2 open PRs.


Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@ggml-gh-bot ggml-gh-bot Bot added the draft PR will be changed to draft by github-actions bot label Sep 1, 2026
@github-actions
github-actions Bot marked this pull request as draft September 1, 2026 21:50
@github-actions github-actions Bot removed the draft PR will be changed to draft by github-actions bot label Sep 1, 2026
… state save

state_write aborted the process when an on-device sequence state spans more than one
cell range. Throw instead; state_seq_get_size/get_data already catch and return 0.
@vahpetr

vahpetr commented Sep 1, 2026

Copy link
Copy Markdown
Author

used an assistant to help locate the abort and draft the change; I reviewed and understand it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant