[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
相关推荐
谷歌开发者27 分钟前
Web 开发指向标 | Chrome 开发者工具学习资源 (一)
前端·chrome·学习
名字越长技术越强30 分钟前
Chrome和IE获取本机ip地址
前端
天***889631 分钟前
Chrome 安装失败且提示“无可用的更新” 或 “与服务器的连接意外终止”,Chrome 离线版下载安装教程
前端·chrome
半梦半醒*34 分钟前
zabbix安装
linux·运维·前端·网络·zabbix
大怪v1 小时前
【搞发🌸活】不信书上那套理论!亲测Javascript能卡浏览器Reader一辈子~
javascript·html·浏览器
清羽_ls1 小时前
React Hooks 核心规则&自定义 Hooks
前端·react.js·hooks
你的人类朋友1 小时前
“签名”这个概念是非对称加密独有的吗?
前端·后端·安全
西陵1 小时前
Nx带来极致的前端开发体验——任务缓存
前端·javascript·架构
ONE_PUNCH_Ge1 小时前
Go 语言变量
开发语言
幼稚园的山代王1 小时前
go语言了解
开发语言·后端·golang