Repository navigation
test(paged): poisoned-write probe so trivial splitkv equality cannot pass - #17
Merged
Merged
Conversation
…pass SplitKvLegacyAndDirectAgreeBitwiseAtSameSplits compared two paths that both silently no-op when attn_partial is null, so the bitwise gate was vacuous while the allocation was missing (fixed in 1d772e1). Add SplitKvEntryActuallyWritesPartials: poison attn_partial + attn_buf, run each splitkv entry, and assert the used partial slots and the combine output were overwritten. Also tighten SplitKvChangesNumericsOnlySlightlyVersusSinglePass from a 5% relative tolerance to 2e-3 absolute — the loose bound absorbed the stale-read delta, letting the no-op state pass. Mutation check against pre-fix transformer.cpp: both gates go red. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
PR #16 修复
attn_partial未分配后,layer 级门禁SplitKvLegacyAndDirectAgreeBitwiseAtSameSplits仍有一个结构性缺陷:它只比较 legacy/direct 两条同样会静默空转的路径(partial_workspace == nullptr→ 两条 splitkv 入口都静默 return),"逐位相等"可以来自"两条路径同样坏"。本 PR 加固 layer 级测试,不再依赖路径间互相印证:
SplitKvEntryActuallyWritesPartials:先毒化attn_partial(-12345.25f哨兵,fp32 独占值)与attn_buf(7.0),各跑 legacy/direct × {2,4} splitkv decode,断言已用 partial 槽位与 combine 输出被真实覆写——kernel 空转则显式失败SplitKvChangesNumericsOnlyVersusSinglePass:5% 相对容差 →2e-3绝对容差(benchmark 等价记录实测 max|diff| ≈ 6e-5);旧容差宽到能吸收 attn_buf 陈旧读的差异Mutation check(核心证据)
将
src/transformer.cpp回退到分配修复前(acb91ef)重跑:SplitKvEntryActuallyWritesPartialsattn_partial == nullptr探针触发)SplitKvChangesNumericsOnlySlightlyVersusSinglePassSplitKvLegacyAndDirectAgreeBitwiseAtSameSplitsTest plan
PagedDispatchTest*14/14 通过(修复后代码)Generated with Devin