Open lunar-walker opened 3 years ago
Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.
Which version of mxnet are you compiling?
Version 1.8.0
You can try applying https://github.com/apache/incubator-mxnet/commit/3c1b3249507d680dffa740d510491331df96f8e0 to your version, or try compiling the latest v1.x / master branch.
I have made some changes in the code by following these 2 links :-
https://trac.ffmpeg.org/ticket/9150 https://devtalk.blender.org/t/cuda-compile-error-windows-10/17886/4
and now using Visual Studio 2017 to build (currently in progress, will let you know results) If failed, i ll try compiling latest v1.x afterwards
I was able to compile using VS 2017 without any code modification and able to get DLLs. Then, there was issue of building python bindings which were failing with access violation errors OSError: exception: access violation writing 0x0000000000000000
Placing all dependencies in libmxnet.dll folder resolved the issue. and I was able to install python egg. However, when I import mxnet, there is substantial delay and None is displayed as
'>>> import mxnet as mx' None '>>>'
Though I was able to run both CPU & GPU examples given at https://mxnet.apache.org/versions/1.8.0/get_started/validate_mxnet Is it normal? I ll try to run some inference on some models and will let you know results.
Build seems working fine with InsightFace pretrained models and performance is akin to running on Ubuntu... Is there any test suit available to thoroughly check a GPU build? And Should I close this issue now?
Just for info for all others, here is the recap I managed to get Windows 10 x64 GPU Build of Version 1.8 by using VS 2017, CUDA 11.2 (Architecture 7.5), CUDNN, MKL, LAPACK & OpenCV by following:-
Best Regards,
Description
When compiling version 1.8 with GPU & MKLDNN support from Windows 10 / x64 (Visual studio Community 2019), it fails with lots of errors of pattern calling a host function from a global function is not allowed...
Initial investigation suggests some sort of confusion by CUDA Compiler for mixing standard C/C++ libraries functions with CUDA Libraries functions i.e. error is appearing when calling floor, ceil functions inside CUDA code (both functions are available in standard C/C++ & CUDA libraries).
I'm using CUDA 11.2 (Pasted below initial out of build_windows.py for environment)
Error Message
../src/operator/contrib/adaptive_avg_pooling.cu(73): error: calling a host function("floorf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(73): error: identifier "__floorf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(74): error: calling a host function("ceilf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(74): error: identifier "__ceilf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(78): error: calling a host function("floorf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(78): error: identifier "__floorf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(79): error: calling a host function("ceilf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(79): error: identifier "__ceilf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(73): error: calling a host function("floorf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(73): error: identifier "__floorf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(74): error: calling a host function("ceilf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(74): error: identifier "__ceilf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(78): error: calling a host function("floorf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(78): error: identifier "__floorf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(79): error: calling a host function("ceilf") from a global__ function("mxnet::op::adaptiveaveragepool ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(79): error: identifier "__ceilf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(73): error: calling a host function("floorf") from a global__ function("mxnet::op::adaptiveaveragepool< ::mshadow::half::half_t> ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(73): error: identifier "__floorf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(74): error: calling a host function("ceilf") from a global__ function("mxnet::op::adaptiveaveragepool< ::mshadow::half::half_t> ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(74): error: identifier "__ceilf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(78): error: calling a host function("floorf") from a global__ function("mxnet::op::adaptiveaveragepool< ::mshadow::half::half_t> ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(78): error: identifier "__floorf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(79): error: calling a host function("ceilf") from a global__ function("mxnet::op::adaptiveaveragepool< ::mshadow::half::half_t> ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(79): error: identifier "__ceilf" is undefined in device code
../src/operator/contrib/adaptive_avg_pooling.cu(130): error: calling a host function("floorf") from a global__ function("mxnet::op::atomicadaptiveaveragegradinput ") is not allowed
../src/operator/contrib/adaptive_avg_pooling.cu(130): error: identifier "__floorf" is undefined in device code
...... ...... ......
What have you tried to solve it?
Environment
Environment Information
----------Python Info---------- Version : 3.9.5 Compiler : MSC v.1928 64 bit (AMD64) Build : ('tags/v3.9.5:0a7dcbd', 'May 3 2021 17:27:52') Arch : ('64bit', 'WindowsPE') ------------Pip Info----------- Version : 21.1.1 Directory : C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\site-packages\pip ----------MXNet Info----------- No MXNet installed. ----------System Info---------- Platform : Windows-10-10.0.19042-SP0 system : Windows node : DESKTOP-6LE30FJ release : 10 version : 10.0.19042 ----------Hardware Info---------- machine : AMD64 processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel Name Intel(R) Core(TM) i7-6700 CPU @ 3.40GHzInitial output of ci/build_windows.py
********************************************************************** ** Visual Studio 2019 Developer Command Prompt v16.9.4 ** Copyright (c) 2021 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' -- The C compiler identification is MSVC 19.28.29914.0 -- The CXX compiler identification is MSVC 19.28.29914.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - 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: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- CMAKE_CROSSCOMPILING FALSE -- CMAKE_HOST_SYSTEM_PROCESSOR AMD64 -- CMAKE_SYSTEM_PROCESSOR AMD64 -- CMAKE_SYSTEM_NAME Windows -- CMake version '3.20.1' using generator 'Ninja' -- Looking for a CUDA compiler -- Looking for a CUDA compiler - C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe -- The CUDA compiler identification is NVIDIA 11.2.67 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- The ASM_MASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/ml64.exe CMake Deprecation Warning at 3rdparty/mkldnn/CMakeLists.txt:17 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument