Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/issues/eb4aa30dc76da044 # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers # Add shared-prefix attention execution with stable prefix/suffix state merging Open · #20 · open 2026-10-22 17:08 UTC Imported from GitHub aien-dev/CUDApp#20, by drakestapleton drakestapleton wrote on 2026-10-22 17:08 UTC ## Problem Existing paged/GQA/split attention and shared-prefix staging do not by themselves prove shared-prefix reads are amortized across requests. Reuse those pieces and add composable attention states. ## Implementation Represent immutable shared KV pages and per-request suffixes; batch distinct queries against the common prefix. Return output plus log-sum-exp (LSE) for each partition and merge with stable max-rescaled weights. Never reuse one request's attention output for a different query. ## Acceptance - For two partitions, implement O=(exp(lp-m)Op+exp(ls-m)Os)/(exp(lp-m)+exp(ls-m)), m=max(lp,ls), and the corresponding merged LSE. - Validate GQA head mapping, masks/positions, empty prefix/suffix, unequal suffixes, long contexts, page sharing/refcounts and extreme logits. - Compare to unsplit attention under the declared numerical contract; mathematical exactness is not a bitwise guarantee. - Mutants for missing LSE weighting, wrong head/page/position and stale shared pages fail. - Measure prefix-read estimates, gather/merge overhead and end-to-end latency over supported batch sizes, prefix lengths and sharing ratios. - Select the shared path only above measured break-even; preserve the ordinary attention path. Research: Hydragen (https://doi.org/10.48550/arXiv.2402.05099 ) and FlashInfer (https://doi.org/10.48550/arXiv.2501.01005 ). Their original GPU gains are not GB10 predictions. ## Evidence and closure Review baseline: `232332422bfdc31c8918085b50f13c1e18ab702e`; re-inspect the current tree and reuse existing work before editing. Coordinate with #5 and #6 and the serving/chip-window owner; host work can proceed independently of hardware scheduling. This issue does not authorize interrupting the live motor or switching kernel drivers. Publish exact source/pin SHAs, build and binary hashes, commands, exit codes, hardware/driver identity, raw logs and relevant negative controls under evidence/. Separate host, simulator and GB10 results. Hardware acceptance needs a real coordinated GB10 run on the final integrated artifact. Keep CUDA userspace dependencies out of the deployed runtime. Do not close on a branch push, simulator-only hardware result or PR merge alone. Experimental issues may close with a reproducible negative result and explicit decision; do not claim an optimization shipped unless its integration gates pass. No comments. Sign in to comment