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

An error occurred when I configured the environment. When I executed cmake..\ the error was reported as follows #56

Open
OkLetsGoi opened this issue May 16, 2024 · 1 comment

Comments

@OkLetsGoi
Copy link

OkLetsGoi commented May 16, 2024

image
cmake .. -DCMAKE_PREFIX_PATH=python -c 'import torch;print(torch.utils.cmake_prefix_path)' -DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -DCMAKE_INSTALL_PREFIX=python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-11.1 (found version "11.1")
-- The CUDA compiler identification is unknown
-- Detecting CUDA compiler ABI info
CMake Error in /home/ubuntu/wangxinlong/ISBNet/segmentator/csrc/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
CUDA_ARCHITECTURES is empty for target "cmTC_67ee4".

CMake Error in /home/ubuntu/wangxinlong/ISBNet/segmentator/csrc/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
CUDA_ARCHITECTURES is empty for target "cmTC_67ee4".

CMake Error at /home/ubuntu/miniconda3/envs/isbnet/share/cmake-3.18/Modules/CMakeDetermineCompilerABI.cmake:48 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/home/ubuntu/miniconda3/envs/isbnet/share/cmake-3.18/Modules/CMakeTestCUDACompiler.cmake:19 (CMAKE_DETERMINE_COMPILER_ABI)
/home/ubuntu/miniconda3/envs/isbnet/lib/python3.7/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:47 (enable_language)
/home/ubuntu/miniconda3/envs/isbnet/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
/home/ubuntu/miniconda3/envs/isbnet/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:8 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/wangxinlong/ISBNet/segmentator/csrc/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/wangxinlong/ISBNet/segmentator/csrc/build/CMakeFiles/CMakeError.log".

@ngoductuanlhp
Copy link
Collaborator

I think the error is this CUDA_ARCHITECTURES is empty for target "cmTC_67ee4". Maybe you installed the CUDA version which is not compatible with your machine's GPU.

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

2 participants