detail: NDK do not support find_package(Threads)
but NDK support threads!
FIXME: compnode support NON-cpu compnode on no support threads env
FXIME: may have issue if ANDROID support CUDA, need fix it
if need support this case
GitOrigin-RevId: 19af74a6af
when cuda enable:
error log:
nn-8.0.4-trt-7.2.2.3-libs/TensorRT-7.2.2.3/lib/libnvinfer_static.a(profile.o):
undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so:
error adding symbols: DSO missing from command line
ld version:
GNU ld (GNU Binutils for Ubuntu) 2.34, example ubuntu20.04
error reason: at new ld, import flags with active zone
libnvinfer_static.a depend dlclose@@GLIBC_2.2.5, which need -ldl
ld -o rc4_encryptor xxx.o -ldl libnvinfer_static.a, which failed
so we put a -ldl for CUDA_LIBS env, then will change to
ld -o rc4_encryptor xxx.o libnvinfer_static.a -ldl
GitOrigin-RevId: adda3acb2d
* 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
1: fix cmake cross-ios failed caused by df118a87
build static lib for APPLE define for XCODE third_party framework including require
2: megbrain_test/megdnn_test build when MGE_INFERENCE_ONLY=ON
now u can build megbrain_test/megdnn_test by:
EXTRA_CMAKE_ARGS="-DMGE_WITH_TEST=ON" ./scripts/cmake-build/xxx.sh
example macos-cross-ios build megdnn_test for IOS by
EXTRA_CMAKE_ARGS="-DMGE_WITH_TEST=ON" ./scripts/cmake-build/cross_build_ios_arm_inference.sh
3: reuse host flatc build when cross build mode
GitOrigin-RevId: 132f4bf893567bdb1d54de506449950513a5841f
Fixed according to the case mentioned in Issue #57 opened by @zjd1988 .
```
Policy "CMP0086" is not known to this version of CMake. Starting with CMake 3.14, UseSWIG passes option -module <module_name> to SWIG compiler if the file property SWIG_MODULE_NAME is specified. This policy provides compatibility with projects that expect the legacy behavior.
```