open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.92k stars 1.66k forks source link

[Bug] Fail build mmcv on Jetson NX #2610

Open xinxinxinxu opened 1 year ago

xinxinxinxu commented 1 year ago

Prerequisite

Environment

{'sys.platform': 'linux', 'Python': '3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 05:56:18) [GCC 10.3.0]', 'CUDA available': True, 'GPU 0': 'Xavier', 'CUDA_HOME': '/usr/local/cuda-11.4:/usr/local/cuda-11.4/bin:/home/nvidia/.vscode-server/bin/da76f93349a72022ca4670c1b84860304616aaa2/bin/remote-cli:/usr/local/cuda-11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'GCC': 'gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0', 'PyTorch': '1.14.0a0+44dac51c.nv23.01', 'PyTorch compiling details': 'PyTorch built with:\n - GCC 9.4\n - C++ Version: 201402\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - CPU capability usage: NO AVX\n - CUDA Runtime 11.4\n - NVCC architecture flags: -gencode;arch=compute_62,code=sm_62;-gencode;arch=compute_72,code=sm_72;-gencode;arch=compute_87,code=sm_87\n - CuDNN 8.6\n - Build settings: BUILD_TYPE=Release, CUDA_VERSION=11.4, CUDNN_VERSION=8.6.0, CXX_COMPILER=/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DNDEBUG -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, TORCH_DISABLE_GPU_ASSERTS=ON, TORCH_VERSION=1.14.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EIGEN_FOR_BLAS=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=OFF, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=0, USE_NNPACK=0, USE_OPENMP=ON, USE_ROCM=OFF, \n', 'TorchVision': '0.11.1', 'OpenCV': '4.7.0', 'MMCV': '1.4.0', 'MMCV Compiler': 'n/a', 'MMCV CUDA Compiler': 'n/a'} image

Reproduces the problem - code sample

(mmdeploy) nvidia@ubuntu:~/NX/mmcv$ MMCV_WITH_OPS=1 pip install -e . Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com, https://pypi.ngc.nvidia.com Obtaining file:///home/nvidia/NX/mmcv Preparing metadata (setup.py) ... done Requirement already satisfied: addict in /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages (from mmcv-full==1.4.0) (2.4.0) Requirement already satisfied: numpy in /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages (from mmcv-full==1.4.0) (1.24.2) Requirement already satisfied: packaging in /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages (from mmcv-full==1.4.0) (23.0) Requirement already satisfied: Pillow in /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages (from mmcv-full==1.4.0) (9.4.0) Requirement already satisfied: pyyaml in /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages (from mmcv-full==1.4.0) (6.0) Requirement already satisfied: yapf in /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages (from mmcv-full==1.4.0) (0.32.0) Installing collected packages: mmcv-full Running setup.py develop for mmcv-full ERROR: Command errored out with exit status 1: command: /home/nvidia/archiconda3/envs/mmdeploy/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/nvidia/NX/mmcv/setup.py'"'"'; file='"'"'/home/nvidia/NX/mmcv/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: /home/nvidia/NX/mmcv/ Complete output (19 lines): running develop running egg_info writing mmcv_full.egg-info/PKG-INFO writing dependency_links to mmcv_full.egg-info/dependency_links.txt writing requirements to mmcv_full.egg-info/requires.txt writing top-level names to mmcv_full.egg-info/top_level.txt reading manifest file 'mmcv_full.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' adding license file 'LICENSES.md' writing manifest file 'mmcv_full.egg-info/SOURCES.txt' running build_ext /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /home/nvidia/archiconda3/envs/mmdeploy/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( error: [Errno 2] No such file or directory: '/usr/local/cuda-11.4:/usr/local/cuda-11.4/bin:/home/nvidia/.vscode-server/bin/da76f93349a72022ca4670c1b84860304616aaa2/bin/remote-cli:/usr/local/cuda-11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin/bin/nvcc'

ERROR: Command errored out with exit status 1: /home/nvidia/archiconda3/envs/mmdeploy/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/nvidia/NX/mmcv/setup.py'"'"'; file='"'"'/home/nvidia/NX/mmcv/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

Reproduces the problem - command or script

MMCV_WITH_OPS=1 pip install -e .

Reproduces the problem - error message

image

Additional information

No response

zhouzaida commented 1 year ago

Hi @xinxinxinxu , what is the output of nvcc --version?