Skip to content

bugfix: clarify linear state cache allocation failure message.#1302

Open
Kang-Meng wants to merge 1 commit intojd-opensource:mainfrom
Kang-Meng:bugfix_add_check
Open

bugfix: clarify linear state cache allocation failure message.#1302
Kang-Meng wants to merge 1 commit intojd-opensource:mainfrom
Kang-Meng:bugfix_add_check

Conversation

@Kang-Meng
Copy link
Copy Markdown
Collaborator

No description provided.

@XuZhang99 XuZhang99 changed the title fix: clarify linear state cache allocation failure message. bugfix: clarify linear state cache allocation failure message. Apr 17, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a validation check in LLMEngine::estimate_kv_cache_capacity to ensure that the linear state cache can be reserved when linear_slot_size is greater than zero. It adds a CHECK_GT assertion that provides a descriptive error message and a suggested limit for max_seqs_per_batch if the reservation fails. I have no feedback to provide.

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.

3 participants