我在页面后面使用anaconda构建caffe2。
在只有一个titanx的服务器上,有cudnn7和cuda9,但没有nccl,所以我从nvidia下载nccl2并将其解压缩到路径/ to /local/nccl2,然后将第42行中的./pytorch/conda/integrated/build.sh编辑为:“export NCCL_ROOT_DIR= path/ to /local/nccl2”。
然后我需要将caffe2与python2一起使用,所以我在./pytorch/scripts/buildanaconda.sh中添加了"conda_args+=(“-- python2.7”)“来使用python2.7。
构建成功了,但是当我从caffe2.python import core运行python2 test.py时
它告诉我:
警告:根:此GPU运行不支持caffe2。将在仅CPU模式下运行。
警告:根目录:调试消息:没有名为caffe2_pybind11_state_hip的模块
分段故障(核心转储)
我的问题是:
a.为什么conda不支持gpu?
b.如果我使用的是单个gpu,nccl是否需要用于构建?
c.如何修复没有名为caffe2_pybind11_state_hip的模块
PyTorch或Caffe2: caffe2
如何安装PyTorch ( conda,pip,source):conda
您使用的Build命令(如果从源代码编译):./scripts/build_anaconda.sh --install-locally -cuda 9.0 --cudnn 7
操作系统:ubuntu16
PyTorch版本:
Python版本:2.7
CUDA/cuDNN版本:9.1/7
GPU型号和配置:??
GCC版本(如果是从源代码编译):5.4.0
CMake版本:未安装
任何其他相关库的版本:
非常感谢!
发布于 2018-09-02 22:02:38
首先获取CUDA并安装它:
sudo apt-get update && sudo apt-get install wget -y --no-install-recommends
wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
现在从源代码进行安装(在环境中安装):
FULL_CAFFE2=1 python setup.py安装
你可以在这里找到更多信息:https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile#install-with-gpu-support
发布于 2018-09-19 13:13:06
遵循下面的步骤,它对我很有效
ubuntu@test:~$ cd $HOME
ubuntu@test:~$ conda create -n caffe2
ubuntu@test:~$ source activate caffe2
(caffe2) ubuntu@test:~$ git clone --recursive https://github.com/pytorch/pytorch.git && cd pytorch
(caffe2) ubuntu@test:~/pytorch$ git submodule update --init
(caffe2) ubuntu@test:~/pytorch$ CONDA_INSTALL_LOCALLY=1 ./scripts/build_anaconda.sh --cuda 8.0 --cudnn 7 -DUSE_CUDA=ON -DUSE_NCCL=ON
https://stackoverflow.com/questions/51111519
复制相似问题