已关闭
[Bug]: Use LA in vllm-omni failed for Wan2.2 #68
Canlin Guo创建于  4月7日关闭于  5月25日
Canlin Guo
Canlin Guo
4月7日 创建

在提交新问题之前,请确保您已经在社区中搜索过相关问题,并使用了社区中提供的资源/工具后,仍未找到满意的解决方式。

⚠️ 安全信息提醒:请仔细检查提供的文本内容,确保其不包含敏感数据信息,包括但不限于:

  • API 令牌或密钥
  • 密码或身份验证凭证
  • 私有网址或接口地址
  • 个人或机密数据
  • ...

在分享配置信息或代码示例时,请将敏感信息脱敏处理,或使用 <TOKEN> 等占位符替代原有内容。

环境信息

vllm-omni v0.18.0
CANN 8.5.0
mindie-sd main

🐛 问题描述

MINDIE_SD_FA_TYPE=ascend_laser_attention python image_to_video.py   --model Wan-AI/Wan2.2-I2V-A14B-Diffusers   --image cherry_blossom.jpg   --prompt "Cherry blossoms swaying gently in the breeze, petals falling, smooth motion"   --negative-prompt "<optional quality filter>"   --height 720   --width 1280   --num-frames 60   --guidance-scale 4.0   --num-inference-steps 20   --flow-shift 12.0   --fps 16    --output i2v_output.mp4  --use-hsdp --ulysses-degree 8
ERROR 04-07 06:05:59 [diffusion_worker.py:481]   File "/root/vllm-workspace/vllm-omni/vllm_omni/diffusion/attention/backends/abstract.py", line 99, in forward
ERROR 04-07 06:05:59 [diffusion_worker.py:481]     return self.forward_npu(query, key, value, attn_metadata)
ERROR 04-07 06:05:59 [diffusion_worker.py:481]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-07 06:05:59 [diffusion_worker.py:481]   File "/root/vllm-workspace/vllm-omni/vllm_omni/diffusion/attention/backends/flash_attn.py", line 202, in forward_npu
ERROR 04-07 06:05:59 [diffusion_worker.py:481]     output = attention_forward(
ERROR 04-07 06:05:59 [diffusion_worker.py:481]              ^^^^^^^^^^^^^^^^^^
ERROR 04-07 06:05:59 [diffusion_worker.py:481]   File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/mindiesd/layers/flash_attn/attention_forward.py", line 85, in attention_forward
ERROR 04-07 06:05:59 [diffusion_worker.py:481]     return attn_func(query, key, value, attn_mask, scale)
ERROR 04-07 06:05:59 [diffusion_worker.py:481]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-07 06:05:59 [diffusion_worker.py:481]   File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/mindiesd/layers/flash_attn/ascend_laser_attention.py", line 111, in forward_attn_bnsd
ERROR 04-07 06:05:59 [diffusion_worker.py:481]     _, output1 = ops.laser_attention(
ERROR 04-07 06:05:59 [diffusion_worker.py:481]                  ^^^^^^^^^^^^^^^^^^^^
ERROR 04-07 06:05:59 [diffusion_worker.py:481]   File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/mindiesd/layers/_custom_ops.py", line 34, in laser_attention
ERROR 04-07 06:05:59 [diffusion_worker.py:481]     return getattr(torch.ops.mindiesd, "la")(
ERROR 04-07 06:05:59 [diffusion_worker.py:481]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-07 06:05:59 [diffusion_worker.py:481]   File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/torch/_ops.py", line 1255, in __call__
ERROR 04-07 06:05:59 [diffusion_worker.py:481]     return self._op(*args, **kwargs)
ERROR 04-07 06:05:59 [diffusion_worker.py:481]            ^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 04-07 06:05:59 [diffusion_worker.py:481] RuntimeError: call aclnnLaserAttention failed, detail:[PID: 141801] 2026-04-07-06:05:59.663.627 AclNN_Parameter_Error(EZ1001): Get regInfo failed, The binary_info_config.json of socVersion [ascend910_93] does not support opType [LaserAttention].
ERROR 04-07 06:05:59 [diffusion_worker.py:481]         TraceBack (most recent call last):
ERROR 04-07 06:05:59 [diffusion_worker.py:481]         Check nnopExecutor != nullptr failed
ERROR 04-07 06:05:59 [diffusion_worker.py:481]

欢迎加入社区,感谢您对社区的贡献 🎉!

likedislike
ascend-robotascend-robot成员
4月7日 添加了label:bug
Canlin Guo
Canlin Guo
4月7日 评论:
[2026-04-07 06:29:36] Info: install .run package to /root/vllm-workspace/MindIE-SD/build...
Verifying archive integrity...  100%   SHA256 checksums are OK. All good.
Uncompressing version:1.0
Not enough space left in /root (0 KB) to decompress /root/vllm-workspace/MindIE-SD/build/output/CANN-custom_ops--linux.aarch64.run (21292 KB)
Use the (export TMPDIR=<path>) command to set a decompressed directory with more free space.
ERROR:root:Build script failed with return code 1
ERROR:root:Build script output: None
Traceback (most recent call last):
  File "/root/vllm-workspace/MindIE-SD/setup.py", line 78, in run
    subprocess.check_call(
  File "/usr/local/python3.11.14/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bash', './build.sh']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/vllm-workspace/MindIE-SD/setup.py", line 109, in <module>
    setup(
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
    dist.run_commands()
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
    self.run_command(cmd)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1104, in run_command
    super().run_command(command)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
    cmd_obj.run()
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
    self.run_command("build")
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
    self.distribution.run_command(command)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1104, in run_command
    super().run_command(command)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
    cmd_obj.run()
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
    self.distribution.run_command(command)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1104, in run_command
    super().run_command(command)
  File "/root/vllm-workspace/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
    cmd_obj.run()
  File "/root/vllm-workspace/MindIE-SD/setup.py", line 86, in run
    raise RuntimeError(f"Build script execution failed with return code {e.returncode}") from e
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Build script execution failed with return code 1
likedislike
Canlin Guo
Canlin Guo
4月7日 评论:
git clone https://gitcode.com/Ascend/MindIE-SD.git && cd MindIE-SD
# Need to comment the line `source ${current_script_dir}/build_tik_ops.sh` in build/build_ops.sh
sed -i 's|^\(\s*\)source ${current_script_dir}/build_tik_ops.sh|\1# source ${current_script_dir}/build_tik_ops.sh|' build/build_ops.sh
python setup.py bdist_wheel
cd dist
pip install mindiesd-*.whl
likedislike
吴铭泾
吴铭泾成员
4月7日 评论:

感谢您的反馈!根据错误信息,LaserAttention算子在ascend910_93上暂不支持。这是硬件算子兼容性问题,相关团队正在排查中。建议您关注后续版本更新,或尝试使用其他支持的attention类型。

likedislike
吴铭泾
吴铭泾成员
4月13日 评论:

您好,感谢您的反馈!关于vllm-omni中LA在Wan2.2上失败的问题,我们会尽快评估。请确认vllm-ascend版本及LA配置是否正确开启,如有具体日志欢迎提供,我们会进一步分析。

likedislike
Cchangetheway成员
5月7日 添加了label:triage-review
changetheway成员
5月7日 评论:

Bug 根因分析

问题类型: 硬件兼容性问题

错误关键信息:

The binary_info_config.json of socVersion [ascend910_93] does not support opType [LaserAttention].

根本原因

  1. 硬件不支持: LaserAttention 算子在 ascend910_93 (910B4) 芯片上暂未实现支持
  2. 算子注册缺失: CANN 的 binary_info_config.json 配置文件中未包含 ascend910_93 对应的 LaserAttention 算子信息

排查方向

  1. 确认硬件型号: 检查当前使用的 NPU 型号是否在支持列表中

    • LaserAttention 可能仅在特定型号(如 910B2)上支持
  2. 检查 CANN 版本: 确认 CANN 8.5.0 是否包含对 910B4 的 LaserAttention 支持

    • 可能需要升级到更新的 CANN 版本
  3. 替代方案:

    • 使用其他支持的 attention 类型(如标准 flash attention)
    • 设置环境变量: MINDIE_SD_FA_TYPE=flash_attention

优化建议

  1. 文档完善: 在 README 中明确列出各算子支持的硬件型号
  2. 错误提示优化: 在代码中增加硬件兼容性检查,提供更友好的错误提示
  3. 降级策略: 当硬件不支持时,自动降级到兼容的 attention 实现

推荐责任人

建议由 @blian 或相关算子开发团队跟进此问题,完善硬件兼容性文档。

likedislike
changetheway成员
5月7日 评论:

Issue 自动评审结果

分类

  • 类型: Bug
  • 优先级: High
  • 建议标签: bug, ascend-laser-attention, compatibility

问题根因分析

使用 在 Wan2.2 模型上失败:

根因:

  1. (昇腾 910B)的 CANN 版本不支持 算子
  2. 该算子可能在特定 CANN 版本或特定芯片型号上不可用
  3. vllm-omni 调用 MindIE-SD 的 LA 接口时未做兼容性检查

排查方向

  1. 确认 CANN 8.5.0 是否支持 LaserAttention 算子
  2. 检查 中支持的算子列表
  3. 确认是否需要降级到 CANN 8.3 或升级驱动
  4. 检查 MindIE-SD 是否有 fallback 机制(如使用标准 attention)

优化建议

  1. 在 MindIE-SD 中添加算子支持检测机制
  2. 提供自动 fallback 到兼容算子的能力
  3. 在文档中明确标注各算子支持的 CANN/硬件版本

推荐责任人

@Fix3dP0int(报告者)

临时解决方案

尝试设置环境变量使用其他 attention 实现:

likedislike
changetheway成员
5月7日 评论:

PR 关联

发现可能相关的 PR:

注意: 此 PR 主要修复精度问题,但可能与本 Issue 的算子支持问题相关。建议确认 ascend910_93 是否支持 LaserAttention 算子。

likedislike
changetheway成员
5月11日 评论:

🤖 AI 评审跟进:

感谢您提供的详细根因分析!

PR 关联确认:发现两个可能相关的已合并 PR:

  1. PR #259 (merged):Fallback manual ascend_laser_attention to fused_attn_score for short seq lens

    • 此 PR 提供了 LaserAttention 在短序列场景下 fallback 到 fused_attn_score 的机制
    • 建议您确认当前场景(序列长度)是否适用
  2. PR #129 (open):LA预处理算子精度问题修复

    • 如需使用 LA,建议关注此 PR 的合并进展

临时解决方案
如 LaserAttention 仍不可用,可尝试设置环境变量使用其他 attention 类型:

export MINDIE_SD_FA_TYPE=flash_attention

请确认更新代码后问题是否改善,或提供更多错误日志以便进一步分析。

likedislike
changetheway成员
5月11日 评论:

🤖 【AI 自动分析】

感谢提交此 Bug 报告!我是 AI 助手,已将此 Issue 分类为 bug 类型并添加 ai-triaged 标记。


🔍 根因分析

问题核心LaserAttention 算子在 SoC 版本 ascend910_93 上不支持。

关键错误信息

AclNN_Parameter_Error(EZ1001): Get regInfo failed, 
The binary_info_config.json of socVersion [ascend910_93] does not support opType [LaserAttention].
Check nnopExecutor != nullptr failed

根本原因

  1. CANN 版本与算子支持不匹配:LaserAttention 算子在 CANN 8.5.0 版本的 ascend910_93 SoC 配置文件中未注册
  2. 算子编译与加载问题binary_info_config.json 是 CANN 的算子注册表,缺少 LaserAttention 的实现信息

影响范围

  • Wan2.2 模型在 vllm-omni 中使用 LA (Laser Attention) 时会失败
  • 影响图片转视频 (I2V) 场景

🛠 排查方向

  1. 检查 CANN 版本兼容性

    # 查看当前 CANN 版本
    rpm -qa | grep Ascend
    
    # 查看算子支持列表
    cat $ASCEND_OPP_PATH/ops/kernel/impl/ops_info.cfg | grep -i laser
    
  2. 升级 CANN

    • 建议升级到 CANN 8.5.1 或更高版本
    • 下载链接:昇腾社区官网
  3. 检查 Laser Attention 是否已编译

    # 检查自定义算子是否加载
    python -c "import mindiesd; print(mindiesd.layers.ascend_laser_attention)"
    
  4. 临时降级使用其他注意力机制

    # 使用 Flash Attention 替代
    export MINDIE_SD_FA_TYPE=flash_attention
    

💡 优化建议

  1. 算子兼容性矩阵:建议维护者在文档中增加 CANN 版本与算子的兼容性矩阵
  2. 优雅降级:在 Laser Attention 不可用时自动降级到其他注意力机制
  3. 错误提示优化:增加更明确的错误信息,指导用户如何解决

📎 关联 PR 分析

此问题可能与以下 PR 相关:

  • PR #259[Bugfix] Fallback manual ascend_laser_attention to fused_attn_score for short seq lenses
    • 该 PR 添加了 Laser Attention 的 fallback 机制
    • 状态:已合入 master

建议维护者确认 PR #259 是否已解决 Wan2.2 的场景。


⚠️ 补充信息请求

  1. 当前 CANN 完整版本号(包括小版本)
  2. 是否可以提供完整的错误堆栈
  3. 短序列(< 128 tokens)是否也存在问题

本分析由 AI 自动生成,如有问题请指正

likedislike
changetheway成员
5月11日 评论:

您好!我是 AI 评审助手。

感谢您提交的 Bug 报告,本 Issue 已标记为 bugai-triaged

深度分析

根因定位
错误信息 "Get regInfo failed, The binary_info_config.json of socVersion [ascend910_93] does not support opType [LaserAttention]" 表明:

  1. 当前 CANN 版本(8.5.0)的 ascend910_93 芯片配置不支持 LaserAttention 算子
  2. 该算子可能需要更高版本的 CANN 或特定芯片配置

排查方向

  1. 确认硬件型号与 CANN 版本兼容性
  2. 检查 LaserAttention 算子是否针对特定芯片架构编译
  3. 验证 vllm-omni 与 MindIE-SD 版本兼容性

可能原因

  • Wan2.2 模型使用的 LaserAttention 可能在 ascend910_93 上未测试
  • 需要使用 ascend910 或其他支持的芯片型号

建议

  1. 检查 vllm-omni 官方支持的硬件列表
  2. 尝试使用 ascend910 而非 ascend910_93
  3. 确认 CANN 版本是否需要升级

感谢您的报告!

likedislike
changetheway成员
5月11日 评论:

🤖 AI 评审

感谢提交此 Bug 报告!

问题分类: Bug

初步分析:
错误信息表明 LaserAttention 算子在 socVersion [ascend910_93] 上不被支持。

根因分析:

  1. Wan2.2 模型需要使用 LaserAttention 算子
  2. 当前环境的 CANN 版本可能不支持该硬件型号的 LaserAttention
  3. binary_info_config.json 中缺少 ascend910_93 芯片的算子支持配置

排查方向:

  1. 确认 CANN 版本是否支持 ascend910_93
  2. 检查是否需要重新编译 LaserAttention 算子
  3. 考虑使用 fallback 方案(PR #259 已实现短序列回退到 fused_attn_score)

关联分析:
发现 PR #259 (Fallback manual ascend_laser_attention to fused_attn_score for short seq lens) 可能与解决兼容性问题相关。
该 PR 状态:merged,目标分支:dev
建议维护者确认此 PR 是否已解决您的问题。


此评论由 AI 自动生成

likedislike
changetheway成员
5月11日 评论:

🤖 【AI自动分析】

感谢提交此问题!

分类标签: 已有 bug, triage-review 标签


🔍 深度分析

问题描述

在 vllm-omni 中使用 LaserAttention 处理 Wan2.2 模型时失败

根因分析

  1. 模型兼容性: Wan2.2 模型结构可能与当前 LaserAttention 实现存在不兼容
  2. vllm-omni 集成: 在 vllm-omni 框架中使用时,context 可能与独立使用不同
  3. 配置参数: 可能存在参数传递或初始化顺序问题

排查方向

  1. 对比测试: 先在 MindIE-SD 原生环境中测试 Wan2.2
  2. 参数检查: 确认 vllm-omni 传递的参数与 MindIE-SD 期望的参数一致
  3. 版本匹配: 确认 vllm-omni 与 MindIE-SD 的版本兼容性

优化建议

  1. 增强 LaserAttention 对不同模型结构的适配能力
  2. 添加 vllm-omni 集成测试用例

本评论由 AI 自动生成。

likedislike
吴铭泾吴铭泾成员
5月25日 关闭了 issue
吴铭泾
吴铭泾成员
5月25日 评论:

您好,此 Issue 创建已超过一个月暂无明确进展或回复,我们将暂时关闭此 Issue。如您仍有相关问题或计划继续推进,欢迎随时重新打开或提交新的 Issue。感谢您的理解与支持!

likedislike
吴铭泾吴铭泾成员
5月25日 重新打开了 issue
吴铭泾吴铭泾成员
5月25日 issue状态由 TODO 改变为 DONE
吴铭泾吴铭泾成员
5月25日 关闭了 issue
lijinxilijinxi成员
17 天前 关联了看板:MindIE-SD