目录
Hanting Ma

fix(attention): honor flash attention disable flag (#118)

Summary

Honor NVTE_FLASH_ATTN=0 before importing FlashAttention v2 modules.

Previously, TransformerEngine imported flash_attn_2_cuda whenever a supported flash-attn package was installed, even when FlashAttention was explicitly disabled.

This caused import failures on platforms where the package metadata existed but the CUDA extension was unavailable, such as MUSA and Enflame.

Changes

Change the FlashAttention v2 import condition to require both:

  • a supported FlashAttention installation;
  • NVTE_FLASH_ATTN enabled.

Co-authored-by: canghaiX 59075364+canghaiX@users.noreply.github.com Co-authored-by: wkhylyh-debug wkhylyh@gmail.com

2天前1474次提交
关于

TransformerEngine-FL is a fork of TransformerEngine that introduces a plugin-based architecture for supporting diverse AI chips, built on top of FlagOS, a unified open-source AI system software stack.

84.1 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号