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 version error while Installing #34

Open
rajpgohil opened this issue May 12, 2022 · 2 comments
Open

CUDA version error while Installing #34

rajpgohil opened this issue May 12, 2022 · 2 comments

Comments

@rajpgohil
Copy link

Hello,
While installing I am getting the NVCC fatal error which shows "unsupported gpu architecture 'compute_30'"
The detailed error is:

running install
running bdist_egg
running egg_info
writing gpuRIR.egg-info/PKG-INFO
writing dependency_links to gpuRIR.egg-info/dependency_links.txt
writing top-level names to gpuRIR.egg-info/top_level.txt
reading manifest file 'gpuRIR.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'gpuRIR.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
-- pybind11 v2.2.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gol/gpuRIR/build/temp.linux-x86_64-3.9
[ 20%] Building CUDA object CMakeFiles/gpuRIRcu.dir/src/gpuRIR_cuda.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_30'
gmake[2]: *** [CMakeFiles/gpuRIRcu.dir/build.make:63: CMakeFiles/gpuRIRcu.dir/src/gpuRIR_cuda.cu.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/gpuRIRcu.dir/all] Error 2
gmake: *** [Makefile:84: all] Error 2
Traceback (most recent call last):
File "/home/gol/gpuRIR/setup.py", line 67, in
setup(
File "/home/gol/anaconda3/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/gol/anaconda3/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/gol/anaconda3/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/gol/anaconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/gol/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/gol/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/home/gol/anaconda3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/gol/anaconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/gol/anaconda3/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/gol/anaconda3/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/home/gol/anaconda3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/gol/anaconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/gol/anaconda3/lib/python3.9/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/gol/anaconda3/lib/python3.9/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/home/gol/anaconda3/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/gol/anaconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/gol/gpuRIR/setup.py", line 37, in run
self.build_extension(ext)
File "/home/gol/gpuRIR/setup.py", line 62, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
File "/home/gol/anaconda3/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

Please let me know the work around for this

@DavidDiazGuerra
Copy link
Owner

Hello,

It seems like CMake is trying to compile the library for a GPU architecture that has been deprecated in your CUDA toolkit version. CMake is choosing the architectures to compile for here, where Common "cover common subsets of architectures" according to the CMake documentation. If you're using a CUDA version newer than your CMake version it could happen that architectures that are common for your CMake are deprecated for your CUDA version.

Compiling for several architectures is useful in the case you're not compiling the library in the same machine that is going to run it, which is quite typical when working in clusters or supercomputers, but if this is not your case, you can change Common by Auto so CMake "detects local machine GPU compute arch at runtime".

Please, let me know if it works.

@anxiang1836
Copy link

I have tried change CMakeLists.txt in line 10, changed "Common" to "Auto".....It works and sucessfully installed:

cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS Auto)

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

3 participants