Skip to content

fix(cache): reset cache streaks before evaluating each step - #1117

Open
NgZiXin wants to merge 2 commits into
vipshop:mainfrom
NgZiXin:fix/continuous-cached-step-count
Open

NgZiXin wants to merge 2 commits into
vipshop:mainfrom
NgZiXin:fix/continuous-cached-step-count

Conversation

@NgZiXin

@NgZiXin NgZiXin commented Oct 1, 2026

Copy link
Copy Markdown

This extends #1114 to handle forced-compute steps that return before the consecutive-cache limit check.

With MC=1, a cache hit sets the counter to 1. If the next step is forced to compute by interleaved warmup or a dynamic computation mask, the counter remains 1 and incorrectly blocks the following cache opportunity.

The change resets each branch’s streak at the start of a step when the preceding step was not cached. It also simplifies hit counting to increment by one and removes the reset from the cap check.

Test coverage includes interleaved warmup, dynamic computation masks, both CFG execution orders, and repeated checks of the same step.

xuechengyao and others added 2 commits September 10, 2026 20:22
Reset per-branch streaks when the previous step was not cached.
Remove redundant cap resets and simplify hit counting.

Cover interleaved warmup, dynamic computation masks, both CFG
orders, and repeated cache checks in regression tests.

This branch has not been deployed

No deployments
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