Skip to content
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

CUDA compilation fails #57

Open
tom-bird opened this issue Apr 13, 2020 · 1 comment
Open

CUDA compilation fails #57

tom-bird opened this issue Apr 13, 2020 · 1 comment

Comments

@tom-bird
Copy link

  • OS: Ubuntu 18.04
  • PyTorch version: 1.1.0
  • How you installed PyTorch (conda, pip, source): pip
  • Python version: 3.6.6
  • CUDA/cuDNN version: 9.0/7.4.1
  • GPU models and configuration: GeForce GTX 1050 Ti, driver 390.132
  • GCC version (if compiling from source): 7.5.0

Compiling the cpp version is ok, but the cuda python setup.py install fails.

The output log is quite long so I have attached it, and I put the end of the log below.

Any ideas?

/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/pytypes.h:923:28:   required from ‘pybind11::str pybind11::str::format(Args&& ...) const [with Args = {pybind11::object&, const pybind11::handle&}]’
/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/pybind11.h:1401:51:   required from here
/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/cast.h:2108:44: error: no matching function for call to ‘collect_arguments(pybind11::object&, const pybind11::handle&)’
     return detail::collect_arguments<policy>(std::forward<Args>(args)...).call(derived().ptr());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/cast.h:2087:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::simple_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
 simple_collector<policy> collect_arguments(Args &&...args) {
 ^~~~~~~~~~~~~~~~~
/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/cast.h:2087:1: note:   template argument deduction/substitution failed:
/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/cast.h:2094:1: note: candidate: template<pybind11::return_value_policy policy, class ... Args, class> pybind11::detail::unpacking_collector<policy> pybind11::detail::collect_arguments(Args&& ...)
 unpacking_collector<policy> collect_arguments(Args &&...args) {
 ^~~~~~~~~~~~~~~~~
/home/tom/miniconda3/envs/venv/lib/python3.6/site-packages/torch/include/pybind11/cast.h:2094:1: note:   template argument deduction/substitution failed:
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

@YujieWu-beihang
Copy link

The first line in the .cu file, change it from #include <torch/extension.h> to #include <torch/types.h>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants