Skip to content

[Kunlunxin] _scaled_dot_product_flash_attention 在 XPU 编译期 matmul 维度推断错 + uni_sram 超限 #6471

Description

@Al2O3Al2O3

环境

  • FlagGems: 5.4.0rc2.post3+gebd729e3b
  • triton-xpu: 3.6.0
  • 后端: _kunlunxin
  • 场景: Qwen3.6-35B-A3B, vLLM (vllm-plugin-FL 0.2.2-rc2), TP=4, 昆仑芯 XPU

问题

_scaled_dot_product_flash_attention 在 XPU 编译期出现 matmul 维度推断错误 + uni_sram 资源超限。

文件:flag_gems/ops/flash_kernel.py(约 716 行),经由 flash_api.py / attention.py

'linalg.matmul' op inferred input/output operand #2 has shape's
 dimension #0 to be 96, but found 128
out of resource: uni_sram, PassManager::run failed
('TiledMatmulPostProcess' pass)

在多模态视觉塔 SDPA(profile_runembed_multimodal_process_image_input)触发。
受影响函数:_scaled_dot_product_flash_attention

复现

在昆仑芯 XPU 上用上述模型起 vLLM,视觉塔 SDPA 走 FlagGems 即崩。
临时绕过:VLLM_FL_FLAGOS_BLACKLIST 加入
_scaled_dot_product_flash_attention,_flash_attention_forward 退回原生 SDPA。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1Priority 1 - highbugSomething isn't workingflagos2.2-rc2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions