Vigilans opened a new issue #15143: dmlc::type_name_helper<T> specialization of mxnet::tuple<T> should not be disabled for MSVC URL: https://github.com/apache/incubator-mxnet/issues/15143 ## Description [In this PR](https://github.com/apache/incubator-mxnet/pull/14270), @junrushao1994 brought `mxnet::Tuple<T>` to mxnet. For the specialization of `dmlc::type_name_helper<T>`, it was disabled **completely** for MSVC: ```cpp namespace dmlc { /*! \brief description for optional TShape */ DMLC_DECLARE_TYPE_NAME(optional<mxnet::TShape>, "Shape or None"); DMLC_DECLARE_TYPE_NAME(optional<mxnet::Tuple<int>>, "Shape or None"); // avoid low version of MSVC #if !defined(_MSC_VER) // <----------- Here template<typename T> struct type_name_helper<mxnet::Tuple<T> > { static inline std::string value() { return "tuple of <" + type_name<T>() + ">"; } }; #endif } // namespace dmlc ``` It then brought up an issue that has not been solved in 4 months: #14116, and costed me [some effort](https://github.com/apache/incubator-mxnet/issues/14116#issuecomment-498497289) to dig it out. Since this choice brought more problem than it was intended to solve ("avoid low version of MSVC"), I think we should at least: * allow the condition to pass on newer version of visual studio (at least 2015 and later) * or remove the `#if` block completely. ## Build info Compiler: Visual Studio 2019 MXNet commit hash: 9125f6ae8cf0fb11338f18cd27223b5ce367afbc Build config: ``` cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=C:/Programs/Vcpkg/scripts/buildsystems/vcpkg.cmake -A x64 -T host=x64 -DUSE_CUDA=0 -DUSE_CUDNN=0 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_BLAS=mkl -DUSE_MKLDNN=1 -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DUSE_CPP_PACKAGE=1 "C:/Programs/mxnet" ``` ## Error Message: ``` 1>"Running: OpWrapperGenerator.py" 1>D:/Projects/MXNet-versions/MxNet1-3-1/build/Release/libmxnet.dll 1>argument "lrs" of operator "multi_sgd_update" has unknown type ", required" 1>argument "wds" of operator "multi_sgd_update" has unknown type ", required" 1>argument "lrs" of operator "multi_sgd_mom_update" has unknown type ", required" 1>argument "wds" of operator "multi_sgd_mom_update" has unknown type ", required" 1>argument "lrs" of operator "multi_mp_sgd_update" has unknown type ", required" 1>argument "wds" of operator "multi_mp_sgd_update" has unknown type ", required" 1>argument "lrs" of operator "multi_mp_sgd_mom_update" has unknown type ", required" 1>argument "wds" of operator "multi_mp_sgd_mom_update" has unknown type ", required" ``` ## Steps to reproduce See https://github.com/apache/incubator-mxnet/issues/14116#issuecomment-498497289 ## What have you tried to solve it? See https://github.com/apache/incubator-mxnet/issues/14116#issuecomment-498497289 ## Environment info ``` ----------Python Info---------- Version : 3.7.1 Compiler : MSC v.1915 64 bit (AMD64) Build : ('default', 'Dec 10 2018 22:54:23') Arch : ('64bit', 'WindowsPE') ------------Pip Info----------- Version : 18.1 Directory : C:\Programs\Anaconda3\lib\site-packages\pip ----------MXNet Info----------- Version : 1.4.1 Directory : C:\Programs\Anaconda3\lib\site-packages\mxnet Hashtag not found. Not installed from pre-built package. ----------System Info---------- Platform : Windows-10-10.0.17763-SP0 system : Windows node : SRTP-desktop release : 10 version : 10.0.17763 ----------Hardware Info---------- machine : AMD64 processor : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel Name Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz ``` Package used (Python/R/Scala/Julia): Cpp
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
