• M
    feat(cmake/windows/xp/sp2/inference): implement inference on windows xp · ce2f620e
    Megvii Engine Team 提交于
    (os vesion >= sp2) build with cmake
    
    * cmake build support(xp sp2):
    (dbg)EXTRA_CMAKE_ARGS="-DMGE_DEPLOY_INFERENCE_ON_WINDOWS_XP_SP2=ON"
    ./scripts/cmake-build/host_build.sh -m -d
    
    (opt)EXTRA_CMAKE_ARGS="-DMGE_DEPLOY_INFERENCE_ON_WINDOWS_XP_SP2=ON"
    ./scripts/cmake-build/host_build.sh -m
    
    * cmake build support(xp sp3):
    (dbg)EXTRA_CMAKE_ARGS="-DMGE_DEPLOY_INFERENCE_ON_WINDOWS_XP=ON"
    ./scripts/cmake-build/host_build.sh -m -d
    
    (opt)EXTRA_CMAKE_ARGS="-DMGE_DEPLOY_INFERENCE_ON_WINDOWS_XP=ON"
    ./scripts/cmake-build/host_build.sh -m
    
    * internal behavior:
    will define MGB_HAVE_THREAD=0 when enable
    -DMGE_DEPLOY_INFERENCE_ON_WINDOWS_XP_SP2=ON
    
    * refer to
    https://docs.microsoft.com/en-us/cpp/build/configuring-programs-for-windows-xp?view=msvc-160
    xp sp2(x86) do not support vc runtime fully, casused by KERNEL32.dll do not
    implement some base apis for c++ std function, for example,
    std::mutex/std::thread/std::condition_variable as a workround, we will
    disable some MegEngine features on xp sp2 env, for exampe, multi-thread etc!
    
    * about DNN_MUTEX/MGB_MUTEX/LITE_MUTEX, if your code will build in inference
    code (even CPU backends), please replace std::mutex to DNN_MUTEX/MGB_MUTEX,
    
    * about multi-thread, if you code need multi-thread support, please
    enable it when MGB_HAVE_THREAD=1
    
    * about test build env status
    1: Visual Studio 2019(MSVC version <= 14.26.28801)---- pass
    2: Visual Studio 2019(MSVC version > 14.26.28801) ---- failed
       caused by this 'new' version will put VCR depends on win7
       KERNEL32.DLL, this may be fixed at Visual Studio 2019 later version
       but we do not test at this MR merge point
    3: Visual Studio 2017   ---------- pass
    4: Visual Studio 2014   ---------- pass
    GitOrigin-RevId: ea6e1f8b4fea9aa03594e3af8d59708b4cdf7bdc
    ce2f620e
mkl.cmake 2.9 KB