报了段错误“Segmentation Fault”后所作的调整尝试 #14067
BUJIQI
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
报错信息
另外发现此时运行
时并无报错,然而在配置文件中将
use_gpu
设置为true后便会报段错误(使用cpu时可正常运行)运行环境
OS:Linux Ubuntu22.04
解决过程
主要原因还是驱动与依赖库版本的不兼容问题
需要驱动与依赖库设定为以下版本(本人尝试有效):
以下为所用命令,仅作参考,需要按实际环境场景调整
下载
cuda12.0
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb sudo dpkg -i cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb sudo cp /var/cuda-repo-ubuntu2204-12-0-local/cuda-*-keyring.gpg /usr/share/keyrings/ sudo apt-get update sudo apt-get -y install cuda
下载
paddle2.5.2
python3 -m pip install paddlepaddle-gpu==2.5.2.post120 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
下载并安装了openssl 1.1.0
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb
sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.525.60.13 /usr/lib/x86_64-linux-gnu/libcuda.so
ls -l /usr/lib/x86_64-linux-gnu/libcuda.so
sudo ldconfig
参考issue,还尝试了conda创建环境+pip install paddlepaddle-gpu的方法,不确定是否有效
install8.9.1的cudnn
conda install -c conda-forge cudnn=8.9.1
作指向
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/libcudnn所在路径
Beta Was this translation helpful? Give feedback.
All reactions