Win11系统下安装Deepspeed报错处理

1. 报错:

LINK : fatal error LNK1181: 无法打开输入文件“aio.lib”
 [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
 [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
 [WARNING]  One can disable async_io with DS_BUILD_AIO=0
 [ERROR]  Unable to pre-compile async_io
Traceback (most recent call last):
  File "E:\fastchat\DeepSpeed\setup.py", line 163, in
    abort(f"Unable to pre-compile {op_name}")
  File "E:\fastchat\DeepSpeed\setup.py", line 51, in abort
    assert False, msg
AssertionError: Unable to pre-compile async_io

原因是windows环境下,没有async_io库,需要设置环境变量屏蔽async_id库,方法如下:

set DS_BUILD_AIO=0
set DS_BUILD_SPARSE_ATTN=0

之后进行编译即可

2. 报错:

OSError: [WinError 1314] 客户端没有所需的特权。: '..\\..\\csrc' -> '.\\deepspeed\\ops\\csrc'

原因是没有权限执行创建软连接的操作,需要“以管理员身份运行”cmd或者powershell命令行程序

3. 报错:

The detected CUDA version (12.1) mismatches the version that was used to compile
PyTorch (11.6). Please make sure to use the same CUDA versions.
这个是由于cuda版本比较新,与pytorch的版本不兼容导致,需要卸载掉pytorch重新安装

pip uninstall torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

4. 编译报错,参考如下:

(54条消息) 如何在window10安装DeepSpeed chat(补充编译报错C2398部分)_宋JK的博客-CSDN博客

你可能感兴趣的:(windows)