(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: ea6e1f8b4f
as some reason, lite_test need static link lite
when cuda enable on gcc7 and gcc8, if not
cask_trt::AbiInfo::~AbiInfo will double call at
atexit stage, which will lead double free at the
end of test, gcc9 do not have this issue, for
compat all CI env, we use static link!!!
GitOrigin-RevId: 1dc2115948
as > cuda11 cudnn8 trt7 have some dlopen libs, auditwheel can
not handle correctly, also at lastest auditwheel, NEW LIBS dirs
change from package data dir to package dir(eg, megengine to MegEngine),
which lead to copy manually libs change rpath hard with auditwheel
rpath, so do not auditwheel now!
GitOrigin-RevId: 3dfc8a5267
example:
1:export PUBLIC_VERSION_POSTFIX=rc1 for create a rc1 version
2:export PUBLIC_VERSION_POSTFIX=dev20210225 for create daily version
3:export PUBLIC_VERSION_POSTFIX=rc1.dev20210225 and export LOCAL_VERSION=mc40 for create special version
GitOrigin-RevId: 8caa7646d0
* support arm-host and x86-cross-arm
* fix trt myelib cmake build issue at 'trt copy env'(about 'copy env', Please refs cb92123f)
about x86-cross-arm CUDA env:
1: run ./scripts/cmake-build/create_cuda_build_libs.py to prepare
cuda/cudnn/trt env(download deb package info, Please refs create_cuda_build_libs.py)
2: export TRT_ROOT_DIR=xxxxx which may create by step 1
3: export CUDNN_ROOT_DIR=xxxx which may create by step 1
4: export PATH=xxxx:$PATH xxxx need create by step 1, which nvcc have
relative path dir: ../targets/sbsa-linux/
GitOrigin-RevId: 440c76052aabe5b07a4b64d126e759f919c257a8
as some reason: some version of trt/cudnn need
-Wl,--whole-archive attribute to fix cuda issue,
target A(CMAKE OBJECT,eg megbrain/megdnn): -Wl,--whole-archive depend on trt/cudnn
target B(SHARED LIBS,eg libmegengine.so) --> A with `PUBLIC` depends
target C(SHARED LIBS,eg _impertive.so) --> B with `PUBLIC` depends,
then ld will force link fatbin section into C, which will be undesired
what`s more, attribute PUBLIC/PRIVATE do not take effect
to OBJECT library(megbrain/megdnn)
what`s more, megengine/megengine_export have to PUBLIC for
mgb/imperative target, as SRC/include depends
so we pull cudalib depend from megbrain/megdnn to
megengine/megengine_export on linux os, to finall
target at windows os, for example lar on windows
GitOrigin-RevId: b278a69e1c