Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I write down the steps of building at stackoverflow, please read it until step 14 if you want to know the details.
I use python download from here to generate op.h, but it throw error message
Dependency of libmxnet.dll(by dumpbin)
Dependency of mkl_rt.dll(by dumpbin)
I put both of the dll, mkl_rt.dll and libmxnet.dll into a folder could be found by the os, try to generate op.h again, but it still give me the same error, how could I solve this issue? Thanks
ps : Use Anaconda3 can generate op.h, but it cause another issue " Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll."
Thanks, by the way, I build mxnet 1.3.1 with gpu and find out I can use gpu to do the inference task(with mxnet v1.3.1), but when I switch to cpu, it throw the same error again " Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll."
Edit : it is caused by MXExecutorForward in the Forward function, need to dig deeper to find out the culprit
you need include the right folder of the Intel MKL software package on your PATH env. var. It is probably "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.2.190\windows\redist\intel64\mkl" .
I do not have access to my develop PC to check.
Also, if you have configured OpenCV, you need to add the folder containing the binaries of this project to the PATH. Same for CUDNN support.
By the way, are you able to compile c++ program with op.h included without errors?
No use, I copied every dll in that folder and put them into the same folder with the exe, but it still give me the same error
No, I don' need to build im2rec by myself, gluoncv installed by pip got that exe
mxnet with CUDNN works fine, but cpu with mkl do not
It got lots of error because many arguments(learning rate and weigth decay of each functions) do not declare the type, I make them as mx_float manually then it work.
Thanks for your helps, you could study the post I put at stackoverflow, it mention how do I build the mxnet1.3.1 and every solutions I have tried.
I guess this problem wouldn't be able to solve unless someone dig into the codes
If you use opencv to read the image, you might need the release folder of opencv in your PATH.
Also I got 1.3.1 compiled (same compile errors) and running with both CUDA and MKL support. But my own program crashes without any warnings/log messages when I call NDArray::WAitall after calling the executor.
I did not attempt to use MKL_DNN or MKLML. As the CMake file has the condition IF NOT MSVC. Although the doc I found, stated that these can be enabled.
When I am back on Monday on the office, I will look at the notes I made for CUDA/MKL.
I am working 2 years with mxnet . With python everything is fine. But getting it compiled and running on Windows/CPP_Package is a real struggle. Sparsely/flaky documented, often new build errors.
Yes, I already put them into PATH. My solution is create a global_dll folder and add it into my PATH, this way I could switch different dll easier without adding too many PATH. Add so many PATH could cause some nasty troubles.
I did not use MKLML either, because the CMake file of mshadow will forced to use openBLAS
Know your pain, guess I should give 1.3.0 a try. If things are like this since two years ago, that means windows/CPP_Package is not their major concern. 1.3.1 can't build with openBLAS(maybe it is because I update vc2015) and got runtime issues on cpu version. 1.4.0 can't compile on windows, many bugs.
mxnet installed by pip works well on my pc too, api of gluoncv and mxnet are well designed, but python is not the right tool when I want to deploy my app, I need c++ for this kind of tasks, unless most of my customers ask me to make the app able to run on windows, windows still dominate 90% of desktop market.
dnn module of opencv4 planning to support cuda and cudnn, hope it can success so we could have a tool easier to build and use.
I guess I found the issue, you need to enable MKL_USE_ILP64(I am surprise it can compile before I actiave it, even my pc only install MKL with 64 bits), else the mxnet will try to build with 32bits library, but the problem is when you enable that options, you will get tons of compile time errors.
Edit : please check #14364 for more details
For me it works (version 1.3.0) with CUDA 9.2, CUDNN 7, OPENCV 3.4.4 with VS2017 and Windows 10. OpenCV was complied without MKL support.
Version 1.4.x compiles with same config (except opencv3.4.5), but I did not link it yet to my application.
On [https://zhuanlan.zhihu.com/p/58918998] you find a quite good guide I guess, my script is almost the same. Maybe you have to translate to English (I did).