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

Error building mmcv-full from source #1767

Closed
shwnyao opened this issue Mar 4, 2022 · 5 comments
Closed

Error building mmcv-full from source #1767

shwnyao opened this issue Mar 4, 2022 · 5 comments

Comments

@shwnyao
Copy link

shwnyao commented Mar 4, 2022

Describe the Issue
I run into the following issue when following the instruction page.

Reproduction

conda create -n mmaction2 python=3.7 -y
conda activate mmaction2
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch
git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
MMCV_WITH_OPS=1 pip install -e .

Environment
{'sys.platform': 'linux', 'Python': '3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) [GCC 9.4.0]', 'CUDA available': True, 'GPU 0,1': 'NVIDIA GeForce GTX 1080 Ti', 'CUDA_HOME': '/usr/local/cuda-10.1', 'NVCC': 'Cuda compilation tools, release 10.1, V10.1.105', 'GCC': 'gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0', 'PyTorch': '1.7.1', 'PyTorch compiling details': 'PyTorch built with:\n - GCC 7.3\n - C++ Version: 201402\n - Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - NNPACK is enabled\n - CPU capability usage: AVX2\n - CUDA Runtime 10.2\n - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75\n - CuDNN 7.6.5\n - Magma 2.5.2\n - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -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 -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, \n', 'TorchVision': '0.8.0a0', 'OpenCV': '4.5.5', 'MMCV': '1.4.6', 'MMCV Compiler': 'n/a', 'MMCV CUDA Compiler': 'n/a'}

Error traceback
If applicable, paste the error traceback here.

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [630 lines of output]
    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'
    running build_ext
    building 'mmcv._ext' extension
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    ./mmcv/ops/csrc/pytorch/cpu/active_rotated_filter.cpp:16:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
     #pragma omp parallel for private(i, j, l, k)
    
    ./mmcv/ops/csrc/pytorch/cpu/active_rotated_filter.cpp:44:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
     #pragma omp parallel for private(i, j, l, k)
    
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    ./mmcv/ops/csrc/pytorch/cpu/pixel_group.cpp: In function ‘std::vector<std::vector<float, std::allocator<float> > > pixel_group_cpu(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, float)’:
    ./mmcv/ops/csrc/pytorch/cpu/pixel_group.cpp:108:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for (size_t i = 0; i < embedding_dim; i++) {
                              ~~^~~~~~~~~~~~~~~
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:18:0,
                     from ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:16:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:386:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:411:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:435:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:446:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h: In instantiation of ‘Index getValidOutPosTranspose(const Index*, const Index*, const Index*, const Index*, const Index*, const Index*, Index*) [with Index = int; unsigned int NDim = 3]’:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:222:58:   required from ‘Index getIndicePairsDeConv(tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, const Index*, const Index*, const Index*, const Index*, const Index*) [with Index = int; IndexGrid = int; unsigned int NDim = 3]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:36:58:   required from ‘Index functor::CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim>::operator()(const tv::CPU&, tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, bool, bool) [with Index = int; IndexGrid = int; unsigned int NDim = 3]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:80:1:   required from here
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:101:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:111:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h: In instantiation of ‘Index getValidOutPos(const Index*, const Index*, const Index*, const Index*, const Index*, const Index*, Index*) [with Index = int; unsigned int NDim = 3]’:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:171:49:   required from ‘Index getIndicePairsConv(tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, const Index*, const Index*, const Index*, const Index*, const Index*) [with Index = int; IndexGrid = int; unsigned int NDim = 3]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:41:56:   required from ‘Index functor::CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim>::operator()(const tv::CPU&, tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, bool, bool) [with Index = int; IndexGrid = int; unsigned int NDim = 3]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:80:1:   required from here
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:39:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:111:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h: In instantiation of ‘Index getValidOutPos(const Index*, const Index*, const Index*, const Index*, const Index*, const Index*, Index*) [with Index = long int; unsigned int NDim = 3]’:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:171:49:   required from ‘Index getIndicePairsConv(tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, const Index*, const Index*, const Index*, const Index*, const Index*) [with Index = long int; IndexGrid = int; unsigned int NDim = 3]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:41:56:   required from ‘Index functor::CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim>::operator()(const tv::CPU&, tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, bool, bool) [with Index = long int; IndexGrid = int; unsigned int NDim = 3]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:81:1:   required from here
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:39:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:53:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h: In instantiation of ‘Index getValidOutPosTranspose(const Index*, const Index*, const Index*, const Index*, const Index*, const Index*, Index*) [with Index = long int; unsigned int NDim = 4]’:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:222:58:   required from ‘Index getIndicePairsDeConv(tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, const Index*, const Index*, const Index*, const Index*, const Index*) [with Index = long int; IndexGrid = int; unsigned int NDim = 4]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:36:58:   required from ‘Index functor::CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim>::operator()(const tv::CPU&, tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, bool, bool) [with Index = long int; IndexGrid = int; unsigned int NDim = 4]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:81:1:   required from here
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:101:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:111:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h: In instantiation of ‘Index getValidOutPos(const Index*, const Index*, const Index*, const Index*, const Index*, const Index*, Index*) [with Index = long int; unsigned int NDim = 4]’:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:171:49:   required from ‘Index getIndicePairsConv(tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, const Index*, const Index*, const Index*, const Index*, const Index*) [with Index = long int; IndexGrid = int; unsigned int NDim = 4]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:41:56:   required from ‘Index functor::CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim>::operator()(const tv::CPU&, tv::TensorView<const scalar_t>, tv::TensorView<scalar_t>, tv::TensorView<IndexGrid>, tv::TensorView<scalar_t>, tv::TensorView<scalar_t>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, tv::SimpleVector<Index, NDim>, bool, bool) [with Index = long int; IndexGrid = int; unsigned int NDim = 4]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp:81:1:   required from here
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:39:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h:53:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int i = 0; i < NDim; ++i) {
                       ~~^~~~~~
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/maxpool.h:17:0,
                     from ./mmcv/ops/csrc/pytorch/cpu/sparse_maxpool.cpp:16:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:386:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:411:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:435:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:446:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:884:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:894:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:900:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:906:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h: In instantiation of ‘tv::ShapeBase<MaxDim> tv::ShapeBase<MaxDim>::subshape(int) const [with long unsigned int MaxDim = 6]’:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:921:54:   required from ‘tv::TensorView<scalar_t, Rank> tv::TensorView<scalar_t, Rank>::subview(int, Integers ...) [with Integers = {}; scalar_t = const int; int Rank = -1]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_maxpool.cpp:29:41:   required from ‘void functor::SparseMaxPoolForwardFunctor<tv::CPU, scalar_t, Index>::operator()(const tv::CPU&, tv::TensorView<scalar_t>, tv::TensorView<const scalar_t>, tv::TensorView<const scalar_t>, int) [with scalar_t = float; Index = int]’
    ./mmcv/ops/csrc/pytorch/cpu/sparse_maxpool.cpp:77:1:   required from here
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:344:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = start; i < this->mSize; ++i) {
                             ~~^~~~~~~~~~~~~
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/spconv/reordering.h:17:0,
                     from ./mmcv/ops/csrc/pytorch/cpu/sparse_reordering.cpp:16:
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:386:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:411:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:435:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:446:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:884:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:894:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:900:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    /home/micrl/shwnyao/mmaction2/mmcv/mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h:906:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
     #pragma unroll
    
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    /usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’:
    /usr/include/c++/7/bits/basic_string.tcc:578:28:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’
    /usr/include/c++/7/bits/basic_string.h:5042:20:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’
    /usr/include/c++/7/bits/basic_string.h:5063:24:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’
    /usr/include/c++/7/bits/basic_string.tcc:656:134:   required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
    /usr/include/c++/7/bits/basic_string.h:6688:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’ without object
           __p->_M_set_sharable();
           ~~~~~~~~~^~
    /usr/include/c++/7/bits/basic_string.tcc: In instantiation of ‘static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’:
    /usr/include/c++/7/bits/basic_string.tcc:578:28:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
    /usr/include/c++/7/bits/basic_string.h:5042:20:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
    /usr/include/c++/7/bits/basic_string.h:5063:24:   required from ‘static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’
    /usr/include/c++/7/bits/basic_string.tcc:656:134:   required from ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’
    /usr/include/c++/7/bits/basic_string.h:6693:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
    /home/micrl/anaconda2/envs/mmaction2/lib/python3.7/site-packages/setuptools/command/easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      EasyInstallDeprecationWarning,
    /home/micrl/anaconda2/envs/mmaction2/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    /home/micrl/anaconda2/envs/mmaction2/lib/python3.7/site-packages/torch/utils/cpp_extension.py:352: 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.'))
    error: command '/usr/local/cuda-10.1/bin/nvcc' failed with exit code 1
    [end of output]
@teamwong111
Copy link
Contributor

This error may be related to the CUDA version according to pytorch/vision#1893 (comment).

@shwnyao
Copy link
Author

shwnyao commented Mar 4, 2022

@teamwong111 I did some searching but got more confused. How to upgrade cuda version from 10.1.105 to 10.1.243 in conda? I tried
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1.243 -c pytorch

but nvcc --version still shows 10.1.105

@teamwong111
Copy link
Contributor

Cudatoolkit downloaded from conda is not a "full" version that lacks the compiler tool nvcc, so you cannot use it to compile mmcv-full. You should use Nvidia official cudatoolkit.

@teamwong111
Copy link
Contributor

I think if you just want to use mmcv, you can download the pre-built package.

@shwnyao
Copy link
Author

shwnyao commented Mar 5, 2022

I tried it on another server with 10.1.243 and it works, thx

@shwnyao shwnyao closed this as completed Mar 5, 2022
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