-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[v1.x] Simplify TRT build by adding onnx_tensorrt targets in CMake #19742
Conversation
|
Hey @Kh4L , Thanks for submitting the PR
CI supported jobs: [sanity, windows-cpu, centos-gpu, centos-cpu, miscellaneous, unix-gpu, unix-cpu, clang, windows-gpu, website, edge] Note: |
c64c14f to
e2798b8
Compare
e2798b8 to
d4a3c68
Compare
d4a3c68 to
5362b69
Compare
5362b69 to
550f2d5
Compare
550f2d5 to
4e72247
Compare
|
@mxnet-bot run ci [sanity] |
|
Jenkins CI successfully triggered : [sanity] |
|
@Kh4L sanity has some issues I think. Current on call is looking into this |
|
@Zha0q1 ok, thank you! |
Signed-off-by: Serge Panev <spanev@nvidia.com>
4e72247 to
c808dac
Compare
|
@mxnet-bot run ci [unix-gpu-cu110] |
|
None of the jobs entered are supported. |
|
@Kh4L I retriggered the job manually. cc @ChaiBapchya |
| set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}") | ||
| set(BUILD_SHARED_LIBS ON) | ||
| add_subdirectory(3rdparty/onnx-tensorrt/ EXCLUDE_FROM_ALL) | ||
| set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you trying to prevent add_subdirectory from changing the global variables? The problem is a "bug" in 3rdparty/onnx-tensorrt/ (ie. they shouldn't change the global variables in the first place). A better workaround compared to manually saving BUILD_SHARED_LIBS is to call add_subdirectory inside a function. Each function in cmake has it's own scope, and add_subdirectory can then only modify the variables inside the function scope.
You can look at load_omp function inside this file to see how it's done. But if 3rdparty/onnx-tensorrt only overwrites BUILD_SHARED_LIBS, it's also fine to merge this PR first and improve later
|
Thank you @Kh4L. Do you intend to port this PR to the master branch? |
|
@leezu Thank you, yes I will do |
Description
Add a script to build the dependencies required by MXNet-TRT: ONNX and onnx_tensorrt.