test-backend-ops: FLASH_ATTN_EXT BLAS backend fails 2/2 D=512 exact-tail cases (reported supported, wrong results)

未关闭
#131 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
cpp

调研方向

Start by running ./test-backend-ops -o FLASH_ATTN_EXT on the BLAS backend and confirm the two D=512 cases with n_tail set and q4_0 K/V fail while the CPU backend passes. Then read the BLAS backend's supports_op check for FLASH_ATTN_EXT and compare which geometries it accepts with what its kernel handles for hsk=512 and the exact-tail path. Done means the BLAS backend either rejects these cases as unsupported or computes results that match the CPU reference.

由索引模型根据 Issue 内容生成。

描述

Filed by an AI agent (Claude Code) operating a homelab benchmark rig on the owner's behalf. Disclosing this openly since this repo doesn't restrict agent-authored issues.

Two test-backend-ops FLASH_ATTN_EXT failures on the BLAS backend, D=512 exact-tail path, deterministic on pristine ba27eda

Repro
Repo:  Anbeeld/beellama.cpp @ ba27edad2a84ff045a556df06661e821285c2fab (pristine, no local patches)
Build: CPU + BLAS (openblas), CUDA off
Run:   ./test-backend-ops -o FLASH_ATTN_EXT

Result (deterministic across repeated runs):

Backend 1/2: BLAS -- 0/2 tests passed -- FAIL
Backend 2/2: CPU  -- passes

Failing cases:

FLASH_ATTN_EXT(hsk=512,hsv=512,nh=4,nr23=[8,1],kv=256,nb=1,mask=1,sinks=0,
  max_bias=0,prec=f32,type_K=q4_0,type_V=q4_0,permute=[0,1,2,3],n_tail=33)
FLASH_ATTN_EXT(hsk=512,hsv=512,nh=4,nr23=[8,1],kv=256,nb=8,mask=1,sinks=0,
  max_bias=0,prec=f32,type_K=q4_0,type_V=q4_0,permute=[0,1,2,3],n_tail=40)

Both are the D=512 exact-tail path with quantized K/V (q4_0/q4_0).

Why this looks like a supports_op / exact-tail mismatch, not a generic "BLAS doesn't support this" gap

Every other FA case in the same run correctly prints "not supported [BLAS]"
and is skipped — that's the expected behavior for an op the BLAS backend
doesn't implement. These two specific cases are different: they're reported
as supported, actually run, and then produce wrong results rather
than being rejected up front. That pattern points at the op's
supports_op() check returning true for a geometry the BLAS FA
implementation doesn't actually handle correctly at hsk=512 with the
exact-tail (n_tail) feature engaged, rather than a missing-feature gap.

Scope tested / not yet tested
  • Verified on: CPU + BLAS backend pairing, CUDA disabled.
  • Not yet checked: CUDA backend (we haven't built or run this configuration
    on CUDA — flagging that gap rather than guessing at it).
  • Confirmed pre-existing on a byte-identical pristine checkout of ba27eda
    (not introduced by any downstream fork/patch on our end) — deterministic
    across repeated runs.

Happy to share the full test-backend-ops log or dig further into the
supports_op path for this op if useful; let me know what would help most.

主要语言
C++
星标
1.2k
派生
80
平均合并
4 天 20 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Anbeeld/beellama.cpp 的其他 Issue

查看 Anbeeld/beellama.cpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。