apex安装报错:Cuda extensions are being compiled with a version of Cuda that does not match the verson

apex是nvdia的半精度运算库,能够增加运算速度,减小现存占用。
apex的仅支持带有tensor core的GPU,即RTX显卡。

apex的安装方式如下:

git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

但是我在安装过程中:报错了

RuntimeError: Cuda extensions are being compiled with a version of Cuda that does not match the version used to compile Pytorch binaries.  Pytorch binaries were compiled with Cuda 9.0.176.

看这个意思是说cuda跟pytorch的版本不对应。后来我看到apex直接不带–global-option安装好像也能用。
于是修改最后一句

pip install -v --no-cache-dir ./

安装成功

评论 17
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值