-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install Pytorch plugin when running python setup.py install #383
Comments
Briefly checked the code, @pleasantrabbit I think we should add |
Indeed. Will update it. |
I updated setup.py as seen in PR but I am running into the following error:
This goes away if I use /usr/local/cuda. Is there something else I am missing? |
Finally figured this out: You need to add the path that you set in BYTEPS_CUDA_HOME to your $PATH env var in addition to the PR changes above. |
Describe the bug
I get the following error when attempting to run
python setup.py install
.INFO: Above error indicates that this PyTorch installation does not support CUDA.
building 'byteps.torch.c_lib' extension
creating build/temp.linux-x86_64-3.8/byteps/torch
gcc -pthread -B /private/home/anj/.conda/envs/byteps_env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DEIGEN_MPL2_ONLY=1 -DHAVE_CUDA=0 -DTORCH_VERSION=1007001000 -D_GLIBCXX_USE_CXX11_ABI=0 -DTORCH_API_INCLUDE_EXTENSION_H=1 -I3rdparty/ps-lite/include -I/public/apps/NCCL/2.7.8-1/include -I/private/home/anj/.conda/envs/byteps_env/lib/python3.8/site-packages/torch/include -I/private/home/anj/.conda/envs/byteps_env/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/private/home/anj/.conda/envs/byteps_env/lib/python3.8/site-packages/torch/include/TH -I/private/home/anj/.conda/envs/byteps_env/lib/python3.8/site-packages/torch/include/THC -I/private/home/anj/.conda/envs/byteps_env/include/python3.8 -c byteps/common/common.cc -o build/temp.linux-x86_64-3.8/byteps/common/common.o -std=c++14 -fPIC -Ofast -Wall -fopenmp -march=native -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from byteps/common/common.cc:20:
byteps/common/common.h:21:10: fatal error: cuda_runtime.h: No such file or directory
21 | #include <cuda_runtime.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
INFO: Unable to build PyTorch plugin, will skip it.
This works if I use a symlink to point to /usr/local/cuda instead. For some reason setting another path does not work. I also did not see
build_torch_extension
callingget_cuda_dirs
in setup.py. How does it know which path cuda is set to?To Reproduce
Steps to reproduce the behavior:
export BYTEPS_NCCL_HOME=/.../NCCL/2.7.8-1
export BYTEPS_CUDA_HOME=/.../cuda/11.0
git clone --recurse-submodules https://github.com/bytedance/byteps
cd byteps/
python setup.py install
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
OS: Ubuntu
GCC version: gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
CUDA and NCCL version:
CUDA: 11.0
NCCL: 2.7.8
Framework (TF, PyTorch, MXNet): PyTorch 1.8
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: