Coder Social home page Coder Social logo

Comments (4)

ClementPinard avatar ClementPinard commented on June 30, 2024

cuda version: 11.2

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.0'

Looks like your problem is that the compiler points to the wrong cuda version.

Have you set the environment variable ENV and LD_LIBRARY_PATH ?

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#environment-setup

from pytorch-correlation-extension.

JxinYUN avatar JxinYUN commented on June 30, 2024

cuda version: 11.2

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.0'

Looks like your problem is that the compiler points to the wrong cuda version.

Have you set the environment variable ENV and LD_LIBRARY_PATH ?

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#environment-setup

Yes, the reason is the incompatible version of CUDA.
I use "match = self._regex.search(str(version))" to replace "match = self._regex.search(version)" and then reinstall my torch that version is compatible with my CUDA.
Finally, I install spatial-correlation-sampler successfully!
Thanks.

from pytorch-correlation-extension.

Wei-Wu233 avatar Wei-Wu233 commented on June 30, 2024

cuda version: 11.2

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.0'

Looks like your problem is that the compiler points to the wrong cuda version.
Have you set the environment variable ENV and LD_LIBRARY_PATH ?
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#environment-setup

Yes, the reason is the incompatible version of CUDA. I use "match = self._regex.search(str(version))" to replace "match = self._regex.search(version)" and then reinstall my torch that version is compatible with my CUDA. Finally, I install spatial-correlation-sampler successfully! Thanks.

I also encountered this problem, the main reason is that the version of cuda and torch do not match, but after I changed the version of torch, I still have the following problem:
(fsam) E:\code\Pytorch-Correlation-extension-master>pip install spatial-correlation-sampler
Collecting spatial-correlation-sampler
Using cached spatial_correlation_sampler-0.4.0.tar.gz (9.3 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: torch>=1.1 in d:\programdata\anaconda\envs\fsam\lib\site-packages (from spatial-correlation-sampler) (1.12.1+cu113)
Requirement already satisfied: numpy in d:\programdata\anaconda\envs\fsam\lib\site-packages (from spatial-correlation-sampler) (1.26.1)
Requirement already satisfied: typing-extensions in d:\programdata\anaconda\envs\fsam\lib\site-packages (from torch>=1.1->spatial-correlation-sampler) (4.8.0)
Building wheels for collected packages: spatial-correlation-sampler
Building wheel for spatial-correlation-sampler (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
running bdist_wheel
D:\ProgramData\anaconda\envs\fsam\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\spatial_correlation_sampler
copying Correlation_Module\spatial_correlation_sampler\spatial_correlation_sampler.py -> build\lib.win-amd64-cpython-39\spatial_correlation_sampler
copying Correlation_Module\spatial_correlation_sampler_init_.py -> build\lib.win-amd64-cpython-39\spatial_correlation_sampler
running build_ext
D:\ProgramData\anaconda\envs\fsam\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'spatial_correlation_sampler_backend' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\Correlation_Module
"D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DUSE_CUDA -ID:\ProgramData\anaconda\envs\fsam\lib\site-packages\torch\include -ID:\ProgramData\anaconda\envs\fsam\lib\site-packages\torch\include\torch\csrc\api\include -ID:\ProgramData\anaconda\envs\fsam\lib\site-packages\torch\include\TH -ID:\ProgramData\anaconda\envs\fsam\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -ID:\ProgramData\anaconda\envs\fsam\include -ID:\ProgramData\anaconda\envs\fsam\Include "-ID:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-ID:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" /EHsc /TpCorrelation_Module\correlation.cpp /Fobuild\temp.win-amd64-cpython-39\Release\Correlation_Module\correlation.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0
cl: 命令行 warning D9002 :忽略未知选项“-fopenmp”
correlation.cpp
D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstddef(12): fatal error C1083: 无法打开包括文件: “stddef.h”: No such file or directory
error: command 'D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for spatial-correlation-sampler
Running setup.py clean for spatial-correlation-sampler
Failed to build spatial-correlation-sampler
ERROR: Could not build wheels for spatial-correlation-sampler, which is required to install pyproject.toml-based projects

from pytorch-correlation-extension.

ClementPinard avatar ClementPinard commented on June 30, 2024

D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstddef(12): fatal error C1083: 无法打开包括文件: “stddef.h”: No such file or directory

Looks like a microsoft + visual code specific error where it cannot file some standard header file. Is your problem fixed now ?

from pytorch-correlation-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.