Closed mishalydev closed 6 months ago
Hi, which CUDA version do you have?
Hi cuda12.2
I added this to the beggining of CMakeLists.txt:
... cmake_minimum_required(VERSION 3.12)
set(CMAKE_CUDA_COMPILER /usr/local/cuda-12.2/bin/nvcc) # replace
And now it seems to be working I'm not sure yet if this is a solid solution or not🤷♂️
Good to hear it's working now. It seems like CMake was trying to use the wrong CUDA compiler. If you don't want to modify the CMakeList.txt
or if you want to be able to install the library with pip without cloning the rep, I think defining the CUDACXX
environment should also work.
Thnkas @DavidDiazGuerra
Hey
I'm trying to install the package and getting this error I tried with "pip install" command and git clone but it seems like both don't work
!!
!! self.initialize_options() /home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated. !!
!! self.initialize_options() running bdist_egg running egg_info creating gpuRIR.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 writing manifest file 'gpuRIR.egg-info/SOURCES.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 creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/gpuRIR copying gpuRIR/init.py -> build/lib.linux-x86_64-cpython-310/gpuRIR running build_ext -- The CXX compiler identification is GNU 7.5.0 CMake Error at /home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCompilerId.cmake:814 (message): Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp -v
The output was:
255
$ SPACE=
$ CUDART=cudart
$ HERE=/usr/lib/nvidia-cuda-toolkit/bin
$ THERE=/usr/lib/nvidia-cuda-toolkit/bin
$ _TARGETSIZE=
$ _TARGETDIR=
$ _TARGETSIZE=64
$ NVVMIR_LIBRARY_DIR=/usr/lib/nvidia-cuda-toolkit/libdevice
$
PATH=/usr/lib/nvidia-cuda-toolkit/bin:/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/bin:/usr/local/cuda-12.2/bin:/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/bin:/home/yandex/DL20232024a/mishaly1/anaconda3/condabin:/home/yandex/DL20232024a/mishaly1/anaconda3/bin:/specific/a/home/cc/students/cs/mishaly1/.vscode-server/cli/servers/Stable-e170252f762678dec6ca2cc69aba1570769a5d39/server/bin/remote-cli:/usr/local/cuda-12.2/bin:/usr/local/cuda-12.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$ LIBRARIES= -L/usr/lib/x86_64-linux-gnu/stubs -L/usr/lib/x86_64-linux-gnu
$ rm tmp/a_dlink.reg.c
$ gcc -D__CUDA_ARCH__=300 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS
-DCUDACC -DNVCC -DCUDACC_VER_MAJOR=10 -DCUDACC_VER_MINOR=1 -DCUDACC_VER_BUILD=243 -include "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" > "tmp/CMakeCUDACompilerId.cpp1.ii"
$ cicc --c++14 --gnu_version=70500 --allow_managed -arch compute_30 -m64
-ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "CMakeCUDACompilerId.fatbin.c" -tused -nvvmir-library "/usr/lib/nvidia-cuda-toolkit/libdevice/libdevice.10.bc" --gen_module_id_file --module_id_file_name "tmp/CMakeCUDACompilerId.module_id" --orig_src_file_name "CMakeCUDACompilerId.cu" --gen_c_file_name "tmp/CMakeCUDACompilerId.cudafe1.c" --stub_file_name "tmp/CMakeCUDACompilerId.cudafe1.stub.c" --gen_device_file_name "tmp/CMakeCUDACompilerId.cudafe1.gpu" "tmp/CMakeCUDACompilerId.cpp1.ii" -o "tmp/CMakeCUDACompilerId.ptx"
$ ptxas -arch=sm_30 -m64 "tmp/CMakeCUDACompilerId.ptx" -o
"tmp/CMakeCUDACompilerId.sm_30.cubin"
ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'
--error 0xff --
Call Stack (most recent call first): /home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test) /home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred! Traceback (most recent call last): File "/specific/a/home/cc/students/cs/mishaly1/repos/gpuRIR/setup.py", line 67, in
setup(
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/init.py", line 103, in setup
return distutils.core.setup(**attrs)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/command/install.py", line 85, in run
self.do_egg_install()
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/command/install.py", line 137, in do_egg_install
self.run_command('bdist_egg')
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 167, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 153, in call_command
self.run_command(cmdname)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/specific/a/home/cc/students/cs/mishaly1/repos/gpuRIR/setup.py", line 37, in run
self.build_extension(ext)
File "/specific/a/home/cc/students/cs/mishaly1/repos/gpuRIR/setup.py", line 61, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/specific/a/home/cc/students/cs/mishaly1/repos/gpuRIR', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/specific/a/home/cc/students/cs/mishaly1/repos/gpuRIR/build/lib.linux-x86_64-cpython-310', '-DPYTHON_EXECUTABLE=/home/yandex/DL20232024a/mishaly1/anaconda3/envs/myenv/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.