[linux] AttributeError: module ‘transformer_engine‘ has no attribute ‘pytorch‘

BUG AttributeError: module 'transformer_engine' has no attribute 'pytorch' · Issue #696 · NVIDIA/Megatron-LM · GitHub

其中这个答案并没有解决我的问题:

import flash_attn_2_cuda as flash_attn_cuda

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

ImportError: /mnt/nas/kexin/cv/Open-Sora/xformers/third_party/flash-attention/flash_attn_2_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

import的flash_attn是xformers的包。。。

cd到目录下 /mnt/nas/kexin/cv/Open-Sora/xformers/third_party/flash-attention/flash_attn_2_cuda.cpython-310-x86_64-linux-gnu.so。

重新安装xformers

报错:

Could not build wheels for xformers, which is required to install pyproject.toml-based projects

复制代码
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121
相关推荐
一拳不是超人2 小时前
DeepSeek Harness 为什么敢说"一切皆插件"?拆透 Cordis 引擎的五大核心机制
前端·人工智能·agent
IT_陈寒2 小时前
Python的GIL让我多写了500行代码
前端·人工智能·后端
风骏时光牛马2 小时前
AI智能体能力调度微服务
前端
C++ 老炮儿的技术栈2 小时前
基于Qt实现轻量化本地音乐播放器
开发语言·c++·qt·c·播放器·音乐
qq_448011162 小时前
C语言中的柔性数组
c语言·开发语言·柔性数组
小白学大数据2 小时前
长周期爬虫的数据一致性:断点续爬 + 事务回滚保障采集质量
开发语言·爬虫·测试工具
zlinear数据采集卡3 小时前
D223上位机C#开发实战:从帧解析到波形显示的完整实现
开发语言·arm开发·嵌入式硬件·fpga开发·开源·c#
Poo_Chai3 小时前
QT emit信号后完整处理流程,包括槽函数响应流程
java·开发语言·数据库
瑞码空间3 小时前
Java 图形界面(GUI)完整知识点手册
java·开发语言·图形界面·swing
Eloudy4 小时前
ReAct 原理简介
前端·javascript·人工智能·react.js·agent·gpu