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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure with "TORCH_CUDA_API" is undefined and more #52331
Comments
Have looked at existing issues, forums posts etc. Only clue is that it might be related to NCCL but don't have any strong idea. Also tried with pytorch-1.7.1 and pytorch-1.8.0-rc2, same issues I believe. |
Hi, Maybe related. I ran once into this issue when I had a different pytorch version in my PATH PATH=/third_party/libtorch/include 1.XXX <= From my install dir -DCMAKE_INSTALL_PREFIX=/usr/local/src/pytorch/src/pytorch-git/torch make clean first or remove prev install. Pascal |
@walterddr thanks, same issue after a clean build with latest Currently unable to build any version of torch (the 1.7.1 build fails for a different reason related to an fbgemm issue filed by someone else already). Wonder what magic spells people are casting to get this project to build. Only success so far was with |
My other option for now is to use the wheel https://files.pythonhosted.org/packages/d6/c1/70f2fd464a895844a9bf4cf1d93b09eb6cd5edf8274d19a7fed2ed6c4cc3/torch-1.7.1-cp39-cp39-win_amd64.whl But that comes with its own set of issues:
|
Thanks to @walterddr for mentioning TORCH_CUDA_API - that put me on the path to figuring out what was going on, after another few days and a few dozen failed build attempts. The issue was the git checkout was inconsistent/not in a properly updated state, despite my doing I trusted git, or my knowledge of git. That was a mistake. Doing a brand new clean checkout should have been step 1, not step 1057, on my way to troubleshoothing this. Lesson learned. The inconsistency was the following - Old git checkout (after reset, pull, clean, submodule update etc.):
New fresh git checkout:
The old checkout still had some code referencing For reference I used the following build script currently for a successful build of pytorch 2021-02-19 941ebec:
Only remaining wish is that it would be great if the thousands of deprecation warnings and out of bounds warnings could be fixed, would make errors easier to find in the output, and make it much easier to diff and scroll the output from multiple build attempts. Hopefully the pytorch project will get around to those cleanups. |
I'm having this same issue trying to build |
@bryan-lunt yes I've had 0 luck building |
Even when I disable |
Would suggest abandoning your attempt to build |
I checked out the master branch and I'm still getting
:( |
The problem seems to be in cuda generated code. I wonder if it has something to do with using too old a version of the cuda toolkit. |
Could be old cuda. Build worked for me earlier today using my build script above with git checkout 2021-03-25 911b8b1. Make sure
|
馃悰 Bug
Failing to build from source. Have built successfully some months ago (pytorch-20200514_bbfd0ef), but failing to build now. For the earlier successful build the OS packages were older, gcc was older, nvidia stack was older, pytorch was older.
To Reproduce
Steps to reproduce the behavior:
Build issue appears to start at this section of the build output:
Complete build output messages:
https://gist.githubusercontent.com/edrozenberg/6e2a25c76d7c62533204974bd4499a47/raw/4c7d3875063f186a8044afc15958c723e3f87732/pytorch%2520build%2520log%25202021-02-16.txt
Expected behavior
Successfull build to the target dir
Environment
Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).
conda
,pip
, source): sourceAdditional context
Using the following build approach:
Built and installed magma from source
cc @malfet @seemethere @walterddr @ngimel
The text was updated successfully, but these errors were encountered: