CUDA compilation fails

Offen
#57 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
12/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
cpp, python, shell
Bereich
build-system

Rechercherichtung

The failure comes from python setup.py install invoking /usr/local/cuda/bin/nvcc on a CUDA extension that includes PyTorch's bundled pybind11 headers, so start with the extension's setup.py and the compile flags it passes to nvcc. The attached log is needed to find the first error, since the pasted tail only shows template deduction failures in cast.h. Done would mean either a build that succeeds with CUDA 9.0 and GCC 7.5, or a documented version constraint. Reproducing it requires that old toolchain, and the issue has had no reply in about six years.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

  • 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

Vorherrschende Sprache
Python
Sterne
1.2k
Forks
250
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus pytorch/extension-cpp

Alle Issues in pytorch/extension-cpp

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.