Repository navigation
[Ascend] Extend eager runtime support for Ouro - #211
Open
KrystalRay wants to merge 13 commits into
Open
KrystalRay wants to merge 13 commits into
KrystalRay wants to merge 13 commits into
Conversation
added 13 commits
November 24, 2026 00:44
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Prefer ascend_eager for compatible NPU attention and let the serving CLI default to auto on NPU. Keep backend capabilities and explicit choices on the shared selection path. (cherry picked from commit 0b772e24f31d6db3fb01ff42e255af164cf18100)
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Check exact packed versus per-query logits with real Ouro weights at aligned and unaligned chunk boundaries. Document why cross-chunk BF16 tests use a separate comparison. (cherry picked from commit 0bffe84)
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Reuse runner completion events for workspaces and retain pending adaptive exit scores without pinning readback slots across preemption. Cover real NPU scheduling and HTTP priority admission, and document eager workspace costs. Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
Signed-off-by: KrystalRay <keeleiray@gmail.com>
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.
Purpose
Extend the single-device Ascend eager backend introduced in #168 for Ouro-1.4B and Ouro-2.6B. Following the platform integration approach in #171, this PR uses the shared Stage/Loop scheduler and exit policies for BF16 greedy decoding with
last_exitedpaged KV.Ascend Prefix Cache is tracked separately under RFC #172.
Scope
autoattention selection for NPU serving, preferringascend_eagerwith a compatible Torch fallback.ouroand synchronous or asynchronousouro_delayed. Prefill runs all four loops.Test Plan
Current base
4821d47, merge heade59e3f2. The merge verification covers CPU regressions for input preparation, serving, workspace lifecycle, prefill, KV, speculation, and backend selection.The full Ascend-marked suite ran on
e1fb5b1against basece200f0on 910B3 with CANN 9.0 and Torch-NPU 2.10.pytest --run-npu -m npuselection covering workspace event ownership, adaptive-exit parity, observed 3→4 recurrent padding, resident and offloaded preemption, packed prefill and incremental KV, and synchronous speculation.Test Result
e59e3f2.e1fb5b1.e1fb5b1, including all five real-checkpoint HTTP variants.32424ea. One2fe107, a standalone workspace retires its previous NPU consumer before reuse, and seven adaptive requests complete across at least six suspensions with a pool of five gate readback slots. Restored requests preserve their exit depths.32424eaused four fixed GSM8K prompts and 24 output tokens per request. Both block and pipeline self-speculation exercised actual draft rejection and matched ordinary four-loop output token for token on that cohort. On 910B3, a change in the number of BF16Linearrows between block verification and serial decode can shift near-tied logits by one ULP and change the greedy token.Ouro-2.6B adaptive-exit quality screen
The earlier BF16 greedy GSM8K-87 run used the same exit implementation, three demonstrations, strict answer scoring, and up to eight requests per cohort. Adaptive runs used
min_loops=2andmax_loops=4.ouroouro_delayedThese scores describe the fixed 87-question cohort. See the Ascend Ouro recipe for configurations and validation scope.
AI assistance was used for implementation, test automation, and drafting this description.