
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 ./
安装成功
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)