不能识别设备
添加依赖:export CUDA_VISIBLE_DEVICES=0,1
bitsandbytes库报错:libbitsandbytes_cpu.so: undefined symbol: cget_col_row_stats
修改bitsandbytes(直接用gpu.so替换cpu.so)
cd /home/xxx/.conda/envs/xxx/lib/python3.x/site-packages/bitsandbytes
cp libbitsandbytes_cuda1xx.so libbitsandbytes_cpu.so
如何查看torch_cuda:
import torch
print(f'Torch CUDA version: {torch.version.cuda}')
AttributeError: ‘DeepSpeedCPUAdam’ object has no attribute ‘ds_opt_adam’
解决办法: You can try this by installing deepspeed w/o any DS_* variables or via: “DS_BUILD_OPS=0 pip install deepspeed”.
After install you can force a build of cpu Adam in a Python shell via:
import deepspeed
deepspeed.ops.op_builder.CPUAdamBuilder().load()
You’ll need ninja installed for this to work, many setups already have this though.
import deepspeed
deepspeed.ops.op_builder.CPUAdamBuilder().load()
'sudo apt-get install build-essential’下不了gcc、g++
使用aptitude包依赖管理工具代替apt来处理,aptitude软件包管理工具在解决依赖性问题上更有优势,具体使用方法如下:
sudo apt-get install aptitude
sudo aptitude install gcc g++
文章讲述了在处理深度学习项目时遇到的问题,如设置CUDA设备、bitsandbytes库的错误、DeepSpeedCPUAdam的属性缺失以及gcc/g++的安装问题,给出了相应的解决方法,包括替换GPU库、使用aptitude管理依赖等。
649

被折叠的 条评论
为什么被折叠?



