 feat(cmake/windows/xp/sp2/inference): implement inference on windows xp
(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
3 years ago  feat(cmake/windows/xp/sp2/inference): implement inference on windows xp
(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
3 years ago  feat(cmake/windows/xp/sp2/inference): implement inference on windows xp
(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
3 years ago |
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #!/bin/bash -e
-
- cd $(dirname $0)
-
- #FIXME: anaconda just upload serval lastest version, so this version may lose efficacy
- echo "this script only for linux/macos/windows-unix-like-env(MSYS etc) prepare MKL env"
- echo "if you build windows for native at cmd.exe, powershell env or Visual Studio GUI,"
- echo "u need download MKL package and untar manually"
- echo "refs: https://software.intel.com/content/www/us/en/develop/tools/math-kernel-library/choose-download/windows.html"
- MKL_VERSION=2019.5
- MKL_PATCH=281
- CONDA_BASE_URL=https://anaconda.org/intel
- OS=$(uname -s)
- FILE_PREFIX=null
- TAR=tar
- if [ $OS = "Darwin" ];then
- FILE_PREFIX=osx
- elif [ $OS = "Linux" ];then
- FILE_PREFIX=linux
- elif [[ $OS =~ "NT" ]]; then
- FILE_PREFIX=win
- # NT use /c/Windows/system32/tar will stuck for big file
- # so we back to GNU tar
- TAR=/usr/bin/tar
- else
- echo "DO NOT SUPPORT OS NOW"
- exit -1
- fi
-
- echo "config FILE_PREFIX to: $FILE_PREFIX"
-
- rm -rf mkl
-
- if [[ -z ${ALREADY_INSTALL_MKL} ]]
- then
- echo "init mkl from software.intel.com"
- for platform in 32 64
- do
- if [ $OS = "Darwin" ]&&[ $platform = 32 ];then
- echo "strip 32 bit file for Darwin"
- continue
- fi
- mkdir -p mkl/x86_${platform}
- for package in "mkl-include" "mkl-static"
- do
- DOWNLOAD_FILE=${package}-${MKL_VERSION}-intel_${MKL_PATCH}.tar.bz2
- echo "Installing ${DOWNLOAD_FILE} for x86_${platform}..."
- URL=${CONDA_BASE_URL}/${package}/${MKL_VERSION}/download/$FILE_PREFIX-${platform}/${DOWNLOAD_FILE}
- echo "try download mkl package from: ${URL}"
- wget -q --show-progress "${URL}" -O mkl/x86_${platform}/${DOWNLOAD_FILE}
- $TAR xvj -C mkl/x86_${platform} -f mkl/x86_${platform}/${DOWNLOAD_FILE}
- done
- done
- fi
|