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

Compile error on windows10 in the latest version 1.3.18 of mmcv-full. #1553

Closed
DingYuan0118 opened this issue Dec 3, 2021 · 1 comment
Closed

Comments

@DingYuan0118
Copy link

Describe the Issue
Run the python setup.py install will raise an error similar to #888 on **/mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh

Environment

  1. Please run python -c "from mmcv.utils import collect_env; print(collect_env())" to collect necessary environment information and paste it here.
    {'sys.platform': 'win32', 'Python': '3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)]', 'CUDA available': True, 'GPU 0': 'GeForce GTX 850M', 'CUDA_HOME': 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2', 'NVCC': 'Cuda compilation tools, release 10.2, V10.2.89', 'GCC': 'gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0', 'PyTorch': '1.7.1+cu101', 'PyTorch compiling details': 'PyTorch built with:\n - C++ Version: 199711\n - MSVC 192729112\n - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191125 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)\n - OpenMP 2019\n - CPU capability usage: AVX2\n - CUDA Runtime 10.1\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_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37\n - CuDNN 7.6.4\n - Magma 2.5.4\n - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR
    /EHsc /w /bigobj -openmp:experimental -DNDEBUG -DUSE_FBGEMM -DUSE_VULKAN_WRAPPER, 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=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, \n', 'TorchVision': '0.8.2+cu110', 'OpenCV': '4.5.2', 'MMCV': '1.3.18', 'MMCV Compiler': 'n/a', 'MMCV CUDA Compiler': 'n/a'}

Bug fix
Maybe we should replace the floor to floorf on the file as #891 do using a script:

#!/bin/bash

SITE=E:/TaskAndAnswer/code/mmcv-full-1.3.18/mmcv
sed -i.bak -e 's/floor/floorf/g' "${SITE}/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh"
@DingYuan0118
Copy link
Author

After running the script described above, a new link issue raise up as described in #1555 .
The solution:

    1. download the latested mmcv repo (or git clone),
    1. use above script to fix the floor error(pay attention that you need to change the SITE for your own mmcv path)
    1. set the environment variable MMCV_WITH_OPS=1 or replace the os.getenv('MMCV_WITH_OPS', '0') == '0' to os.getenv('MMCV_WITH_OPS', '1') == '0' in the setup.py Line178 and Line357 to build the .cpp and .cu file
    1. run python setup.py install

The mmcv-full will successfully installed in the environment. Run check_installation.py outputs

Start checking the installation of mmcv-full ...
CPU ops were compiled successfully.
CUDA ops were compiled successfully.
mmcv-full has been installed successfully.

Environment information:
------------------------------------------------------------
sys.platform: win32
Python: 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit (AMD64)]
CUDA available: True
GPU 0: GeForce GTX 850M
CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
NVCC: Cuda compilation tools, release 10.2, V10.2.89
GCC: gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
PyTorch: 1.7.1+cu101
PyTorch compiling details: PyTorch built with:
  - C++ Version: 199711
  - MSVC 192729112
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191125 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
  - OpenMP 2019
  - CPU capability usage: AVX2
  - CUDA Runtime 10.1
  - 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_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  - CuDNN 7.6.4
  - Magma 2.5.4
  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -openmp:experimental -DNDEBUG -DUSE_FBGEMM -DUSE_VULKAN_WRAPPER, 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=OFF, USE_NNPACK=OFF, USE_OPENMP=ON,

TorchVision: 0.8.2+cu110
OpenCV: 4.5.2
MMCV: 1.4.0
MMCV Compiler: MSVC 192829913
MMCV CUDA Compiler: 10.2
------------------------------------------------------------

We can find that the package has been installed successfully.

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

1 participant