You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/01/07 09:20:45 UTC
[GitHub] [incubator-mxnet] benz725 opened a new issue #19731: Cannot compile the source code with the tensorrt flag(cmake -D USE_TENSORRT=1)
benz725 opened a new issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731
## Description
**I want to use tensorrt with my mxnet, i compile the mxnet with the source code. when I add the flag cmake -D USE_TENSORRT=1, i report compile error like this:**
CMake Error at /home/yfzx/.local/lib/python3.7/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/home/yfzx/.local/lib/python3.7/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
/home/yfzx/.local/lib/python3.7/site-packages/cmake/data/share/cmake-3.18/Modules/FindProtobuf.cmake:626 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:240 (find_package)
### Error Message
###reported CMakeError.log content is here:
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_e1cfd/fast && /usr/bin/make -f CMakeFiles/cmTC_e1cfd.dir/build.make CMakeFiles/cmTC_e1cfd.dir/build
make[1]: 进入目录“/home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp”
Building C object CMakeFiles/cmTC_e1cfd.dir/src.c.o
/usr/bin/cc -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -DCMAKE_HAVE_LIBC_PTHREAD -fPIE -o CMakeFiles/cmTC_e1cfd.dir/src.c.o -c /home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_e1cfd
/home/yfzx/.local/lib/python3.7/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e1cfd.dir/link.txt --verbose=1
/usr/bin/cc -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_e1cfd.dir/src.c.o -o cmTC_e1cfd
CMakeFiles/cmTC_e1cfd.dir/src.c.o:在函数‘main’中:
src.c:(.text.startup+0x23):对‘pthread_create’未定义的引用
src.c:(.text.startup+0x2c):对‘pthread_detach’未定义的引用
src.c:(.text.startup+0x35):对‘pthread_cancel’未定义的引用
src.c:(.text.startup+0x40):对‘pthread_join’未定义的引用
src.c:(.text.startup+0x4b):对‘pthread_atfork’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_e1cfd.dir/build.make:105: recipe for target 'cmTC_e1cfd' failed
make[1]: *** [cmTC_e1cfd] Error 1
make[1]: 离开目录“/home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp”
Makefile:140: recipe for target 'cmTC_e1cfd/fast' failed
make: *** [cmTC_e1cfd/fast] Error 2
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_9390f/fast && /usr/bin/make -f CMakeFiles/cmTC_9390f.dir/build.make CMakeFiles/cmTC_9390f.dir/build
make[1]: 进入目录“/home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp”
Building C object CMakeFiles/cmTC_9390f.dir/CheckFunctionExists.c.o
/usr/bin/cc -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -DCHECK_FUNCTION_EXISTS=pthread_create -fPIE -o CMakeFiles/cmTC_9390f.dir/CheckFunctionExists.c.o -c /home/yfzx/.local/lib/python3.7/site-packages/cmake/data/share/cmake-3.18/Modules/CheckFunctionExists.c
Linking C executable cmTC_9390f
/home/yfzx/.local/lib/python3.7/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9390f.dir/link.txt --verbose=1
/usr/bin/cc -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_9390f.dir/CheckFunctionExists.c.o -o cmTC_9390f -lpthreads
/usr/bin/ld: 找不到 -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9390f.dir/build.make:105: recipe for target 'cmTC_9390f' failed
make[1]: *** [cmTC_9390f] Error 1
make[1]: 离开目录“/home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeTmp”
Makefile:140: recipe for target 'cmTC_9390f/fast' failed
make: *** [cmTC_9390f/fast] Error 2
## To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
I use cuda 10.2, cudnn8.0.4, mxnet-src1.7.0, i have install tensorrt 7.2.1 with the offical tutorial, have pass the helloworld test
### Steps to reproduce
(Paste the commands you ran that produced the error.)
1.i copy the $mxnet-src-path$/config/linux_gpu.cmake to $mxnet-src-path$/config.cmake, make some change like add one line "set(USE_NCCL 1)"
2.cd $mxnet-src-path$, then mkdir build, cd build, cmake -D USE_TENSORRT=1 ..
## What have you tried to solve it?
1. When i remove the -D USE_TENSORRT=1 flag, it can compile correctly, whe i add this flag, it will report like this issue;
2.
## Environment
***We recommend using our script for collecting the diagnostic information with the following command***
`curl --retry 10 -s https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py | python3`
<details>
cuda 10.2, cudnn8.0.4, mxnet-src1.7.0, python 3.7.4(anaconda), nvidia driver version:440.44
<summary>Environment Information</summary>
```
# Paste the diagnose.py command output here
```
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] github-actions[bot] commented on issue #19731: Cannot compile the source code with the tensorrt flag(cmake -D USE_TENSORRT=1)
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-755992529
Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on [contributing to MXNet](https://mxnet.apache.org/community/contribute) and our [development guides wiki](https://cwiki.apache.org/confluence/display/MXNET/Developments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757115024
> Did you run this successfully:
>
> ```
> # Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /work/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
> ```
>
> If yes, what is the outputs of :
>
> ```
> ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
> ```
>
> and finally, can you verify if this path is part of `$LIBRARY_PATH`?
I will tell what I have done:
First, I download onnx-tensorrt from "https://github.com/onnx/onnx-tensorrt" to my /home dir, but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" to the onnx-tensorrt/third_party/onnx/ dir.
Then I follow the onnx-tensorrt official tutorial, do the compile:
cd onnx-tensorrt
mkdir build && cd build
cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j
// Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library:
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
It can compile correctly , but I found nothing like named libonnx.so**. And when I compile the mxnet with -DTENSORRT=1, It reported error again.
You said I must define some arguments , how many arguments should I have to define?
Now I have the mxnet-src file in my home directory like : /home/$USER_NAME/mxnet-src
and onnx-tensortrt in my home dir: /home/$USER_NAME/onnx-tensorrt
and onnx in the onnx-tensorrt directory :/home/$USER_NAME/onnx-tensorrt/third_party/onnx/
How should I define the eviron arguments? You said I must follow the .sh file in the docker file, but I'm not sure how many arguments I shoud to define. Some args like ONNX_NAMESPACE, LIBRARY_PATH, LD_LIBRARY_PATH, CPLUS_INCLUDE_PATH, CXXFLAGS, should I have to define it manually? And the popd, pushd, should I have to do that like the .sh file did?
I'm not very good at do compiling and define args, so thanks for your answering!!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757444787
> > but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
>
> You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
>
> > Then I follow the onnx-tensorrt official tutorial, do the compile:
>
> You need to follow the steps mentioned by @Kh4L from the mxnet folder after running `git submodule update --init --recursive`. No need to download any other repositories manually.
>
> > And the popd, pushd, should I have to do that like the .sh file did?
>
> It's better to follow the instructions exactly if you are not clear about their meaning. If you know what they do, you can also use `cd` instead
>
> > I'm not very good at do compiling and define args, so thanks for your answering!!
>
> Just start with a new `git clone https://github.com/apache/incubator-mxnet/`, run the `git submodule --init --recursive` and follow the instruction precisely step by step.
when I have done what you have told me, i download the mxnet source code again and do the git submodule update --init --recursive, I followed the .sh file as listed before, when it run to the "cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .." line , it reported error :
```
NAMESPACE=$ONNX_NAMESPACE ..
Generated: /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/build/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.proto
Generated: /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/build/third_party/onnx/onnx/onnx-operators_onnx2trt_onnx-ml.proto
--
-- ******** Summary ********
-- CMake version : 3.18.4
-- CMake command : /home/yfzx/.local/lib/python3.7/site-packages/cmake/data/bin/cmake
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 7.5.0
-- CXX flags : -I/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/build -Wall -Wno-deprecated-declarations -Wno-unused-function -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions : ONNX_NAMESPACE=onnx2trt_onnx
-- CMAKE_PREFIX_PATH :
-- CMAKE_INSTALL_PREFIX : /usr/local
-- CMAKE_MODULE_PATH :
--
-- ONNX version : 1.6.0
-- ONNX NAMESPACE : onnx2trt_onnx
-- ONNX_BUILD_TESTS : OFF
-- ONNX_BUILD_BENCHMARKS : OFF
-- ONNX_USE_LITE_PROTO : OFF
-- ONNXIFI_DUMMY_BACKEND : OFF
-- ONNXIFI_ENABLE_EXT : OFF
--
-- Protobuf compiler : /usr/bin/protoc
-- Protobuf includes : /usr/include
-- Protobuf libraries : /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread
-- BUILD_ONNX_PYTHON : OFF
-- Found TensorRT headers at TENSORRT_INCLUDE_DIR-NOTFOUND
-- Find TensorRT libs at TENSORRT_LIBRARY_INFER-NOTFOUND;TENSORRT_LIBRARY_INFER_PLUGIN-NOTFOUND;TENSORRT_LIBRARY_MYELIN-NOTFOUND
-- Could NOT find TENSORRT (missing: TENSORRT_INCLUDE_DIR TENSORRT_LIBRARY)
ERRORCannot find TensorRT library.
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/TENSORRT_INCLUDE_DIR
used as include directory in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
used as include directory in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
TENSORRT_LIBRARY_INFER
linked by target "nvonnxparser" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
linked by target "nvonnxparser_static" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
TENSORRT_LIBRARY_INFER_PLUGIN
linked by target "nvonnxparser" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
linked by target "nvonnxparser_static" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
TENSORRT_LIBRARY_MYELIN
linked by target "nvonnxparser" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
linked by target "nvonnxparser_static" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
```
cannot find Tensorrt Library, where can i find it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757486499
@leezu
Thank you, it's 10:30PM in my country, I must go home and fix it tomorrow.
Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757115024
> Did you run this successfully:
>
> ```
> # Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /work/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
> ```
>
> If yes, what is the outputs of :
>
> ```
> ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
> ```
>
> and finally, can you verify if this path is part of `$LIBRARY_PATH`?
I will tell what I have done:
First, I download onnx-tensorrt from "https://github.com/onnx/onnx-tensorrt" to my /home dir, but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
Then I follow the onnx-tensorrt official tutorial, do the compile:
cd onnx-tensorrt
mkdir build && cd build
cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j
// Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library:
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
It can compile correctly , but I found nothing like named libonnx.so**. And when I compile the mxnet with -DTENSORRT=1, It reported error again.
You said I must define some arguments , how many arguments should I have to define?
Now I have the mxnet-src file in my home directory like : /home/$USER_NAME/mxnet-src
and onnx-tensortrt in my home dir: /home/$USER_NAME/onnx-tensorrt
and onnx in the onnx-tensorrt directory :/home/$USER_NAME/onnx-tensorrt/third_party/onnx/
How should I define the eviron arguments? You said I must follow the .sh file in the docker file, but I'm not sure how many arguments I shoud to define. Some args like ONNX_NAMESPACE, LIBRARY_PATH, LD_LIBRARY_PATH, CPLUS_INCLUDE_PATH, CXXFLAGS, should I have to define it manually? And the popd, pushd, should I have to do that like the .sh file did?
I'm not very good at do compiling and define args, so thanks for your answering!!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773379037
If you use the latest commit from `v1.x` branch, the instruction have been simplified thanks to @Kh4L
You just need to specify -DUSE_TENSORRT=1 and -DONNX_NAMESPACE=onnx , for example
```
cmake -DONNX_NAMESPACE=onnx -DUSE_TENSORRT=1 -GNinja ..
ninja
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-776471451
> If you use the latest commit from `v1.x` branch, the instruction have been simplified thanks to @Kh4L
>
> You just need to specify -DUSE_TENSORRT=1 and -DONNX_NAMESPACE=onnx , for example
>
> ```
> cmake -DONNX_NAMESPACE=onnx -DUSE_TENSORRT=1 -GNinja ..
> ninja
> ```
Thanks very much.
I followed your instructions, but I failed when the make to nearly the 100%.
The bug reported this:
[100%] Linking CXX executable mxnet_unit_tests
/usr/bin/ld: warning: libcublas.so.10, needed by /usr/local/src/TensorRT-7.2.1.6/lib/libmyelin.so.1, may conflict with libcublas.so.9.1
/usr/bin/ld: CMakeFiles/mxnet_unit_tests.dir/cpp/operator/krprod_test.cc.o: undefined reference to symbol 'dposv_'
//usr/lib/x86_64-linux-gnu/liblapack.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
tests/CMakeFiles/mxnet_unit_tests.dir/build.make:427: recipe for target 'tests/mxnet_unit_tests' failed
make[2]: *** [tests/mxnet_unit_tests] Error 1
CMakeFiles/Makefile2:2288: recipe for target 'tests/CMakeFiles/mxnet_unit_tests.dir/all' failed
make[1]: *** [tests/CMakeFiles/mxnet_unit_tests.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2
It looks like the cublas conflicts in the make project. However, I have installed the OpenBlas in my /opt/OpenBLAS DIR, shold I have to make some change to the cmake. How can I fix the error?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757964443
the docker which you infered can run tensort directly?where can I download the docker image?i donnt want to compile again. so many bugs make me so headacke.
@leezu
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-758115192
@benz725 it's not allowed due to license of tensorrt
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757485369
> `usr/local/TensorRT-7.2.1.6` is a non-standard tensorrt directory. So you need to specify `-DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6`
OK, I compiled again, and now it work correctly.
But I don't know at the bottom of .sh file, the directory of /work/mxnet/lib, what's the meaning of the /work/mxnet?
Is that the directory of the mxnet source code? I think I must change the directory, because when i do the copy, the terminal will exit.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756587784
> You don't need to use the .sh file, but you can just manually follow the steps listed in the section of the .sh file referenced
I'm very confused about the error message:
**CMake Error at CMakeLists.txt:242 (find_library):
Could not find ONNX_LIBRARY using the following names: libonnx.so**
I search in both onnx and onnx-tensorrt folders , there is no file named libonnx.so**, I only found some files named libnvonnxparser.so/libnvonnxparser.so.7/libnvonnxparser.so.7.2.1.
What should I do next?
Thank you!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
> set -ex
>
> export CC=gcc-7
> export CXX=g++-7
> export ONNX_NAMESPACE=onnx
>
> \#Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> \# Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
> export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
> rm -rf *
> cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
> cmake --build . --parellel 32
"cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1"can run correctly, but when run "cmake --build . --parellel 32", the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-776723294
You can specify `cmake -DONNX_NAMESPACE=onnx -DUSE_TENSORRT=1 -GNinja -DOpenBLAS_Home=/opt/OpenBLAS ..`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty
You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773379037
If you use the latest `v1.x` branch, the instruction have been simplified thanks to @Kh4L
You just need to specify -DUSE_TENSORRT=1 and -DONNX_NAMESPACE=onnx , for example
```
cmake -DUSE_CUDA=1 \
-DUSE_CUDNN=1 \
-DUSE_OPENCV=1 \
-DONNX_NAMESPACE=onnx \
-DUSE_TENSORRT=1 \
-DUSE_OPENMP=0 \
-DUSE_MKLDNN=0 \
-DUSE_MKL_IF_AVAILABLE=OFF \
-DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \
-G Ninja \
/work/mxnet
ninja
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773353505
when I followed the instructions below, I do the last ninja step , it informed me that: 3rdparty/onnx-tensorrt/NvOnnxParser.h:26:10: fatal error: NvInfer.h: No such file or directory
however, I had added the $TENSORRT_ROOT/include and $TENSORRT_ROOT/lib into my $LD_LIBRARY_PATH, how does this happen?
And when I do ninja, many times it informed me :ninja: build stopped: subcommand failed.
I search this in the internet, and get replies that the ulimit number is to small, then I run ulimit -n 10240 to set ulimit. But when I do ninja, It informed me :"ninja: build stopped: subcommand failed." again. why does this happen?
> The build with tensorrt is currently not very user friendly. Nvidia plans to contribute a PR to improve it. For now, follow
> https://github.com/apache/incubator-mxnet/blob/ae8c9748743ca98979964bd34643aca343f93c7c/ci/docker/runtime_functions.sh#L541-L594
@leezu @Kh4L
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-758115192
@benz725 it might not be allowed due to license of tensorrt and Apache policies
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757115024
> Did you run this successfully:
>
> ```
> # Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /work/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
> ```
>
> If yes, what is the outputs of :
>
> ```
> ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
> ```
>
> and finally, can you verify if this path is part of `$LIBRARY_PATH`?
I will tell what I have done:
First, I download onnx-tensorrt from "https://github.com/onnx/onnx-tensorrt" to my /home dir, but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
Then I follow the onnx-tensorrt official tutorial, do the compile:
cd onnx-tensorrt
mkdir build && cd build
cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j
// Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library:
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
It can compile correctly , but I found nothing like named libonnx.so**. And when I compile the mxnet with -DTENSORRT=1, It reported error again.
You said I must define some arguments , how many arguments should I have to define?
Now I have the mxnet-src file in my home directory like : /home/$USER_NAME/mxnet-src
and onnx-tensortrt in my home dir: /home/$USER_NAME/onnx-tensorrt
and onnx in the onnx-tensorrt directory :/home/$USER_NAME/onnx-tensorrt/third_party/onnx/
How should I define the eviron arguments? You said I must follow the .sh file in the docker file, but I'm not sure how many arguments I shoud to define. Some args like ONNX_NAMESPACE, LIBRARY_PATH, LD_LIBRARY_PATH, CPLUS_INCLUDE_PATH, CXXFLAGS, should I have to define it manually? And the popd, pushd, should I have to do that like the .sh file did?
I'm not very good at do compiling and define args, so thanks for your answering!!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756181999
You don't need to use the .sh file, but you can just manually follow the steps listed in the section of the .sh file referenced
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-758115192
@benz725 it's not allowed due to license of tensorrt and Apache policies
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773379037
If you use the latest `v1.x` branch, the instruction have been simplified thanks to @Kh4L
https://github.com/apache/incubator-mxnet/blob/4bd6d484bda46382a86e22fedd875e38af7dea47/ci/docker/runtime_functions.sh#L706-L730
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
> Then I follow the onnx-tensorrt official tutorial, do the compile:
You need to follow the steps mentioned by @Kh4L from the mxnet folder after running `git submodule update --init --recursive`. No need to download any other repositories manually.
> And the popd, pushd, should I have to do that like the .sh file did?
It's better to follow the instructions exactly if you are not clear about their meaning. If you know what they do, you can also use `cd` instead
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
set -ex
export CC=gcc-7
export CXX=g++-7
export ONNX_NAMESPACE=onnx
# Build ONNX
pushd .
echo "Installing ONNX."
cd 3rdparty/onnx-tensorrt/third_party/onnx
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
make -j$(nproc)
export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
export CXXFLAGS=-I`pwd`
popd
# Build ONNX-TensorRT
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
pushd .
cd 3rdparty/onnx-tensorrt/
mkdir -p build
cd build
cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
make -j$(nproc)
export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
popd
mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
rm -rf *
cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
cmake --build . --parellel 32
cmake .. can run correctly, but when run cmake --build ,the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756181999
You don't need to use the .sh file, but you can just refer to the steps listed in the section of the .sh file referenced
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757115024
> Did you run this successfully:
>
> ```
> # Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /work/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
> ```
>
> If yes, what is the outputs of :
>
> ```
> ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
> ```
>
> and finally, can you verify if this path is part of `$LIBRARY_PATH`?
I will tell what I have done:
First, I download onnx-tensorrt from "https://github.com/onnx/onnx-tensorrt" to my /home dir, but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" to the onnx-tensorrt/third_party/onnx/ dir.
Then I follow the onnx-tensorrt official tutorial, do the compile:
cd onnx-tensorrt
mkdir build && cd build
cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j
// Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library:
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
It can compile correctly , but I found nothing like named libonnx.so**. And when I compile the mxnet with -DTENSORRT=1, It reported error again.
You said I must define some arguments , how many arguments should I have to define?
Now I have the mxnet-src file in my home directory like : /home/$USER_NAME/mxnet-src
and onnx-tensortrt in my home dir: /home/$USER_NAME/onnx-tensorrt
and onnx in the onnx-tensorrt directory :/home/$USER_NAME/onnx-tensorrt/third_party/onnx/
How should I define the eviron arguments? You said I must follow the .sh file in the docker file, but I'm not sure how many arguments I shoud to define. Some args like ONNX_NAMESPACE, LIBRARY_PATH, LD_LIBRARY_PATH, CPLUS_INCLUDE_PATH, CXXFLAGS, should I have to define it manually? And the popd, pushd, should I have to do that like the .sh file did?
I'm not very good at do compiling and define args, so thanks for your answering!!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757461873
> You will need to install tensorrt first. Please see https://developer.nvidia.com/Tensorrt
Yes , I already have installed Tensorrt. It is in my /usr/local/TensorRT-7.2.1.6/ directory.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773379037
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
> set -ex
>
> export CC=gcc-7
> export CXX=g++-7
> export ONNX_NAMESPACE=onnx
>
> \#Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> \# Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
> export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
> rm -rf *
> cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
> cmake --build . --parellel 32
"cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1"can run correctly, but when run "cmake --build , . --parellel 32", the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756512130
> You don't need to use the .sh file, but you can just manually follow the steps listed in the section of the .sh file referenced
thanks, I still don't know how to install onnx manually, I get many errors in the follow the tutorial of the onnx installation guide.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: Cannot compile the source code with the tensorrt flag(cmake -D USE_TENSORRT=1)
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756048695
The build with tensorrt is currently not very user friendly. Nvidia plans to contribute a PR to improve it. For now, follow
https://github.com/apache/incubator-mxnet/blob/ae8c9748743ca98979964bd34643aca343f93c7c/ci/docker/runtime_functions.sh#L541-L594
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773353505
when I followed the instructions below, I do the last ninja step , it informed me that: 3rdparty/onnx-tensorrt/NvOnnxParser.h:26:10: fatal error: NvInfer.h: No such file or directory
however, I had added the $TENSORRT_ROOT/include and $TENSORRT_ROOT/lib into my $LD_LIBRARY_PATH, how does this happen?
And when I do ninja, many times it informed me :ninja: build stopped: subcommand failed.
I search this in the internet, and get replies that the ulimit number is to small, then I run ulimit -n 10240 to set ulimit. But when I do ninja, It informed me :"ninja: build stopped: subcommand failed." again. why does this happen?
> The build with tensorrt is currently not very user friendly. Nvidia plans to contribute a PR to improve it. For now, follow
> https://github.com/apache/incubator-mxnet/blob/ae8c9748743ca98979964bd34643aca343f93c7c/ci/docker/runtime_functions.sh#L541-L594
@leezu @Kh4L
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757485477
`/work/mxnet ` refers to the path of mxnet source code, yes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty
You need to run `git submodule update --init recursive` inside the mxnet folder. Do not manually copy around folders
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773379037
If you use the latest `v1.x` branch, the instruction have been simplified thanks to @Kh4L
https://github.com/apache/incubator-mxnet/blob/4bd6d484bda46382a86e22fedd875e38af7dea47/ci/docker/runtime_functions.sh#L706-L730
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: Cannot compile the source code with the tensorrt flag(cmake -D USE_TENSORRT=1)
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756007736
problem resolved!
from the Reported message : Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
i install the protobuf ( sudo apt-get install libprotobuf-dev protobuf-compiler), then solved the problem.
but when compile again , it reported another problem:
CMake Error at CMakeLists.txt:242 (find_library):
Could not find ONNX_LIBRARY using the following names: libonnx.so
-- Configuring incomplete, errors occurred!
See also "/home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeOutput.log".
See also "/home/yfzx/mxnet-src/apache-mxnet-src-1.7.0-incubating/build/CMakeFiles/CMakeError.log".
---------------------------------------------------
i install the onnx follow the tensorrt official tutorial, untar the .tar file, then cd TensorRT-${version}/onnx_graphsurgeon
pip3 install onnx_graphsurgeon-0.2.6-py2.py3-none-any.whl
i guess the onnx is not installed correctly, is that another way to install onnx?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
> set -ex
>
> export CC=gcc-7
> export CXX=g++-7
> export ONNX_NAMESPACE=onnx
>
> \#Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
> export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
> rm -rf *
> cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
> cmake --build . --parellel 32
"cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1"can run correctly, but when run "cmake --build , . --parellel 32", the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757600292
@leezu @Kh4L
the incubator-mxnet/ci/docker/runtime_functions.sh file,
I can run to the line before the
" cmake -DUSE_CUDA=1 \
-DUSE_CUDNN=1 \
-DUSE_OPENCV=1 \
-DUSE_TENSORRT=1 \
-DUSE_OPENMP=0 \
-DUSE_MKLDNN=0 \
-DUSE_NVML=OFF \
-DUSE_MKL_IF_AVAILABLE=OFF \
-DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \
-G Ninja \
/work/mxnet " line
But when every time I do cmake , terminal will exit automatically, so I follow the instructions of the /mxnet-src/incubator-mxnet/config/linux_gpu.cmake but added THE USE_TENSORRT flag: $ mkdir build; cd build # $ cmake .. -DUSE_TENSORRT=1# $ cmake --build . --parallel 32
THE cmake can do correctly, but when do cmake --build . --parallel 32, It reported:
> In file included from /home/yfzx/mxnet-src/incubator-mxnet/src/operator/subgraph/tensorrt/./onnx_to_tensorrt.h:31:0,
from /home/yfzx/mxnet-src/incubator-mxnet/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc:29:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/NvOnnxParser.h:26:10: fatal error: NvInfer.h: 没有那个文件或目录
#include "NvInfer.h"
^~~~~~~~~~~
compilation terminated.
CMakeFiles/mxnet.dir/build.make:4813: recipe for target 'CMakeFiles/mxnet.dir/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc.o' failed
make[2]: *** [CMakeFiles/mxnet.dir/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc.o] Error 1
CMakeFiles/Makefile2:546: recipe for target 'CMakeFiles/mxnet.dir/all' failed
make[1]: *** [CMakeFiles/mxnet.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2
I'm still not sure about what the path /work/mxnet means, does the /work means the root of the source code or the /work/mxnet means the root of the source code?
And how to fix my bug?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-758031584
@Kh4L would you have time to submit the PR to simplify TensorRT build? It's really unfortunate the current build is not easy for users
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] Kh4L commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
Kh4L commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757634066
@benz725
`/work/mxnet/lib` is for the `LD_LIBRARY_PATH`, as it is done here:
https://github.com/apache/incubator-mxnet/blob/209a789e6cbc06d686b23893b892fbd58af6ffe8/ci/docker/runtime_functions.sh#L1099
`/work/mxnet` correspond to the root of the source code.
In your case, you should replace all occurrences of `/work/mxnet` by `/home/yfzx/mxnet-src/`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757467466
> > You will need to install tensorrt first. Please see https://developer.nvidia.com/Tensorrt
>
> Yes , I already have installed Tensorrt. It is in my /usr/local/TensorRT-7.2.1.6/ directory.
@leezu
and follow the https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleMNIST tutorial, I run the sample_mnist program to confirm my tensorrt is installed correctly.
the output of the sample_mnist is below:
&&&& RUNNING TensorRT.sample_mnist # ./sample_mnist
[01/10/2021-20:19:35] [I] Building and running a GPU inference engine for MNIST
[01/10/2021-20:19:42] [I] [TRT] Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
[01/10/2021-20:19:42] [I] [TRT] Detected 1 inputs and 1 output network tensors.
[01/10/2021-20:19:42] [I] Input:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@+ #@@@@@@
@@@@@@@@@@@@@@@@@* #@@@@@@
@@@@@@@@@@@@@@@@@= #@@@@@@
@@@@@@@@@@@@@@@@# .%@@@@@@@
@@@@@@@@@@@@@@@#. *@@@@@@@@
@@@@@@@@@@@@@@@- :@@@@@@@@@
@@@@@@@@@@@@@@@ #@@@@@@@@@
@@@@@@@@@@@@@%. =@@@@@@@@@@
@@@@@@@@@@@@@+ :@@@@@@@@@@@
@@@@@@@@@@@@* :%@@@@@@@@@@@
@@@@@@@@@@@% -@@@@@@@@@@@@
@@@@@@@@@@@= %@@@@@@@@@@@@
@@@@@@@@@@#. -@@@@@@@@@@@@@
@@@@@@@@@@ :@@@@@@@@@@@@@@
@@@@@@@@@@ *@@@@@@@@@@@@@@
@@@@@@@@@- %@@@@@@@@@@@@@@
@@@@@@@@#. =@@@@@@@@@@@@@@@
@@@@@@@@# .@@@@@@@@@@@@@@@@
@@@@@@@@# .@@@@@@@@@@@@@@@@
@@@@@@@@%: .@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[01/10/2021-20:19:42] [I] Output:
0:
1: **********
2:
3:
4:
5:
6:
7:
8:
9:
&&&& PASSED TensorRT.sample_mnist # ./sample_mnist
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757486048
> Did you run this successfully:
>
> ```
> # Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /work/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
> ```
>
> If yes, what is the outputs of :
>
> ```
> ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
> ```
>
> and finally, can you verify if this path is part of `$LIBRARY_PATH`?
the result of the "ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx" is :
backend onnxifi_dummy.c onnx_pb.h
bin onnxifi_ext.h onnx.proto
checker.cc onnxifi.h onnx.proto3
checker.h onnxifi_loader.c optimizer
checker.py onnxifi_loader.h optimizer.py
common onnxifi_utils.cc proto_utils.h
cpp2py_export.cc onnxifi_utils.h py_utils.h
defs onnxifi_wrapper.c shape_inference
examples onnx.in.proto shape_inference.py
external_data_helper.py onnx-ml.proto string_utils.h
frontend onnx-ml.proto3 test
gen_proto.py onnx-operators.in.proto tools
helper.py onnx-operators-ml.proto utils.py
__init__.py onnx-operators-ml.proto3 version_converter
mapping.py onnx-operators_pb.h version_converter.py
numpy_helper.py onnx-operators.proto
onnx_cpp2py_export onnx-operators.proto3
what's the meaning of these three line?
mkdir -p /work/mxnet/lib/
cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
the /work/mxnet/lib/ is also must be in the `$LIBRARY_PATH`?
@Kh4L @leezu
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757481526
> `usr/local/TensorRT-7.2.1.6` is a non-standard tensorrt directory. So you need to specify `-DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6`
OK, I compiled it correctly.
but when I do make, it reported error again....
I only paste part of it, like this:
In file included from /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/schema.h:24:0,
from /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/nn/defs.cc:7:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/shape_inference.h: In function ‘bool onnx2trt_onnx::getRepeatedAttribute(onnx2trt_onnx::InferenceContext&, std::__cxx11::string, std::vector<T>&) [with T = long int]’:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/shape_inference.h:83:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
third_party/onnx/CMakeFiles/onnx.dir/build.make:315: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/old.cc.o' failed
make[2]: *** [third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/old.cc.o] Error 1
third_party/onnx/CMakeFiles/onnx.dir/build.make:302: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/defs.cc.o' failed
make[2]: *** [third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/defs.cc.o] Error 1
third_party/onnx/CMakeFiles/onnx.dir/build.make:81: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/checker.cc.o' failed
make[2]: *** [third_party/onnx/CMakeFiles/onnx.dir/onnx/checker.cc.o] Error 1
CMakeFiles/Makefile2:321: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/all' failed
make[1]: *** [third_party/onnx/CMakeFiles/onnx.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 59%] Linking CXX shared library libnvonnxparser.so
[ 59%] Built target nvonnxparser
[ 60%] Linking CXX static library libnvonnxparser_static.a
[ 60%] Built target nvonnxparser_static
Makefile:170: recipe for target 'all' failed
make: *** [all] Error 2
@leezu
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757444787
> > but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
>
> You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
>
> > Then I follow the onnx-tensorrt official tutorial, do the compile:
>
> You need to follow the steps mentioned by @Kh4L from the mxnet folder after running `git submodule update --init --recursive`. No need to download any other repositories manually.
>
> > And the popd, pushd, should I have to do that like the .sh file did?
>
> It's better to follow the instructions exactly if you are not clear about their meaning. If you know what they do, you can also use `cd` instead
>
> > I'm not very good at do compiling and define args, so thanks for your answering!!
>
> Just start with a new `git clone https://github.com/apache/incubator-mxnet/`, run the `git submodule --init --recursive` and follow the instruction precisely step by step.
when I have done what you have told me, i download the mxnet source code again and do the git submodule update --init --recursive, I followed the .sh file as listed before, when it run to the "cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .." line , it reported error :
NAMESPACE=$ONNX_NAMESPACE ..
Generated: /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/build/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.proto
Generated: /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/build/third_party/onnx/onnx/onnx-operators_onnx2trt_onnx-ml.proto
--
-- ******** Summary ********
-- CMake version : 3.18.4
-- CMake command : /home/yfzx/.local/lib/python3.7/site-packages/cmake/data/bin/cmake
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 7.5.0
-- CXX flags : -I/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/build -Wall -Wno-deprecated-declarations -Wno-unused-function -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions : ONNX_NAMESPACE=onnx2trt_onnx
-- CMAKE_PREFIX_PATH :
-- CMAKE_INSTALL_PREFIX : /usr/local
-- CMAKE_MODULE_PATH :
--
-- ONNX version : 1.6.0
-- ONNX NAMESPACE : onnx2trt_onnx
-- ONNX_BUILD_TESTS : OFF
-- ONNX_BUILD_BENCHMARKS : OFF
-- ONNX_USE_LITE_PROTO : OFF
-- ONNXIFI_DUMMY_BACKEND : OFF
-- ONNXIFI_ENABLE_EXT : OFF
--
-- Protobuf compiler : /usr/bin/protoc
-- Protobuf includes : /usr/include
-- Protobuf libraries : /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread
-- BUILD_ONNX_PYTHON : OFF
-- Found TensorRT headers at TENSORRT_INCLUDE_DIR-NOTFOUND
-- Find TensorRT libs at TENSORRT_LIBRARY_INFER-NOTFOUND;TENSORRT_LIBRARY_INFER_PLUGIN-NOTFOUND;TENSORRT_LIBRARY_MYELIN-NOTFOUND
-- Could NOT find TENSORRT (missing: TENSORRT_INCLUDE_DIR TENSORRT_LIBRARY)
ERRORCannot find TensorRT library.
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/TENSORRT_INCLUDE_DIR
used as include directory in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
used as include directory in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
TENSORRT_LIBRARY_INFER
linked by target "nvonnxparser" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
linked by target "nvonnxparser_static" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
TENSORRT_LIBRARY_INFER_PLUGIN
linked by target "nvonnxparser" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
linked by target "nvonnxparser_static" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
TENSORRT_LIBRARY_MYELIN
linked by target "nvonnxparser" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
linked by target "nvonnxparser_static" in directory /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
cannot find Tensorrt Library, where can i find it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-778554163
> You can specify `cmake -DONNX_NAMESPACE=onnx -DUSE_TENSORRT=1 -GNinja -DOpenBLAS_Home=/opt/OpenBLAS ..`
Yes, I have tried what you said. But it still reported:
[ 97%] Linking CXX executable mxnet_unit_tests
/usr/bin/ld: warning: libcublas.so.10, needed by /usr/local/src/TensorRT-7.2.1.6/lib/libmyelin.so.1, may conflict with libcublas.so.9.1
/usr/bin/ld: CMakeFiles/mxnet_unit_tests.dir/cpp/operator/krprod_test.cc.o: undefined reference to symbol 'dposv_'
//usr/lib/x86_64-linux-gnu/liblapack.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
tests/CMakeFiles/mxnet_unit_tests.dir/build.make:427: recipe for target 'tests/mxnet_unit_tests' failed
make[2]: *** [tests/mxnet_unit_tests] Error 1
CMakeFiles/Makefile2:2288: recipe for target 'tests/CMakeFiles/mxnet_unit_tests.dir/all' failed
make[1]: *** [tests/CMakeFiles/mxnet_unit_tests.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2
I have searched in the google, but still cannot fix this bug.
I have followed the instructions in https://mxnet.apache.org/get_started/build_from_source#building-mxnet
to install OpenBLAS and LAPACK, but it still reported the error like this.
Can you help me to fix it? @leezu
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] TristonC commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
TristonC commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-759089770
@benz725 NVIDIA has MXNet container at https://ngc.nvidia.com/catalog/containers/nvidia:mxnet
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757481526
> `usr/local/TensorRT-7.2.1.6` is a non-standard tensorrt directory. So you need to specify `-DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6`
OK, I compiled it correctly.
but when I do make, it reported error again....
I only paste part of it, like this:
In file included from /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/schema.h:24:0,
from /home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/nn/defs.cc:7:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/shape_inference.h: In function ‘bool onnx2trt_onnx::getRepeatedAttribute(onnx2trt_onnx::InferenceContext&, std::__cxx11::string, std::vector<T>&) [with T = long int]’:
/home/yfzx/mxnet-src/incubator-mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/defs/shape_inference.h:83:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
third_party/onnx/CMakeFiles/onnx.dir/build.make:315: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/old.cc.o' failed
make[2]: *** [third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/old.cc.o] Error 1
third_party/onnx/CMakeFiles/onnx.dir/build.make:302: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/defs.cc.o' failed
make[2]: *** [third_party/onnx/CMakeFiles/onnx.dir/onnx/defs/nn/defs.cc.o] Error 1
third_party/onnx/CMakeFiles/onnx.dir/build.make:81: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/onnx/checker.cc.o' failed
make[2]: *** [third_party/onnx/CMakeFiles/onnx.dir/onnx/checker.cc.o] Error 1
CMakeFiles/Makefile2:321: recipe for target 'third_party/onnx/CMakeFiles/onnx.dir/all' failed
make[1]: *** [third_party/onnx/CMakeFiles/onnx.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 59%] Linking CXX shared library libnvonnxparser.so
[ 59%] Built target nvonnxparser
[ 60%] Linking CXX static library libnvonnxparser_static.a
[ 60%] Built target nvonnxparser_static
Makefile:170: recipe for target 'all' failed
make: *** [all] Error 2
@leezu
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757915494
Maybe your machine is running out of memory and killing the terminal. Try using less parallel processes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
> set -ex
>
> export CC=gcc-7
> export CXX=g++-7
> export ONNX_NAMESPACE=onnx
>
> ## Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
> export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
> rm -rf *
> cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
> cmake --build . --parellel 32
"cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1"can run correctly, but when run "cmake --build , . --parellel 32", the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
> Then I follow the onnx-tensorrt official tutorial, do the compile:
You need to follow the steps mentioned by @Kh4L from the mxnet folder after running `git submodule update --init --recursive`. No need to download any other repositories manually.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756183009
cc @Kh4L
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-779274368
It's not a bug in MXNet but your environment is broken. You can't use Cublas 9.1 and 10.0 at the same time
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
> set -ex
>
> export CC=gcc-7
> export CXX=g++-7
> export ONNX_NAMESPACE=onnx
>
> \#Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> \# Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/mxnet/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
> export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
> rm -rf *
> cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
> cmake --build . --parellel 32
"cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1"can run correctly, but when run "cmake --build . --parellel 32", the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty
You need to run `git submodule update --init recursive` inside the mxnet folder. Do not manually copy around folders
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757461165
You will need to install tensorrt first. Please see https://developer.nvidia.com/Tensorrt
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757683577
@leezu @Kh4L
I git clone the project agin to my folder : run "git clone --recursive https://github.com/apache/incubator-mxnet mxnet" at my "/home/yfzx/mxnet-src/mxnet_root" folder, then run below lines one by one:
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet
> set -ex
>
> export CC=gcc-7
> export CXX=g++-7
> export ONNX_NAMESPACE=onnx
>
> # Build ONNX
> pushd .
> echo "Installing ONNX."
> cd 3rdparty/onnx-tensorrt/third_party/onnx
> rm -rf build
> mkdir -p build
> cd build
> cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
> export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
> export CXXFLAGS=-I`pwd`
>
> popd
>
> # Build ONNX-TensorRT
> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
> export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
> pushd .
> cd 3rdparty/onnx-tensorrt/
> mkdir -p build
> cd build
> cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE .. -DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6
> make -j$(nproc)
> export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
> popd
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
> cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /home/yfzx/mxnet-src/mxnet_root/mxnet/lib/
>
> mkdir -p /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> cd /home/yfzx/mxnet-src/mxnet_root/mxnet/build
> export LD_LIBRARY_PATH=/home/yfzx/mxnet-src/mxnet_root/lib:$LD_LIBRARY_PATH
> export LD_LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LD_LIBRARY_PATH
> export LIBRARY_PATH=/usr/local/TensorRT-7.2.1.6/include/:$LIBRARY_PATH
> rm -rf *
> cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1
> cmake --build . --parellel 32
"cmake .. -DUSE_CUDA=1 -DUSE_TENSORRT=1 -DUSE_CUDNN=1 -DUSE_OPENCV=1"can run correctly, but when run "cmake --build , . --parellel 32", the terminal will automatically exit. Why does these things happen?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756146357
> The build with tensorrt is currently not very user friendly. Nvidia plans to contribute a PR to improve it. For now, follow
> https://github.com/apache/incubator-mxnet/blob/ae8c9748743ca98979964bd34643aca343f93c7c/ci/docker/runtime_functions.sh#L541-L594
Thank U very much!!
I'm not very clear about how to use this .sh file in docker, I will try to install onnx manually tomorrow, thank you again!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
> Then I follow the onnx-tensorrt official tutorial, do the compile:
You need to follow the steps mentioned by @Kh4L from the mxnet folder after running `git submodule update --init --recursive`. No need to download any other repositories manually.
> And the popd, pushd, should I have to do that like the .sh file did?
It's better to follow the instructions exactly if you are not clear about their meaning. If you know what they do, you can also use `cd` instead
> I'm not very good at do compiling and define args, so thanks for your answering!!
Just start with a new `git clone https://github.com/apache/incubator-mxnet/`, run the `git submodule --init --recursive` and follow the instruction precisely step by step.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-773379037
If you use the latest `v1.x` branch, the instruction have been simplified thanks to @Kh4L
You just need to specify -DUSE_TENSORRT=1 and -DONNX_NAMESPACE=onnx , for example
```
cmake -DONNX_NAMESPACE=onnx -DUSE_TENSORRT=1 -GNinja ..
ninja
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] benz725 commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
benz725 commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-758092169
i think if there is a docker image i can download directly , it will work and can save me a lot of time .
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757469029
`usr/local/TensorRT-7.2.1.6` is a non-standard tensorrt directory. So you need to specify `-DTENSORRT_ROOT=/usr/local/TensorRT-7.2.1.6`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] Kh4L commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
Kh4L commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756623388
Did you run this successfully:
```
# Build ONNX
pushd .
echo "Installing ONNX."
cd 3rdparty/onnx-tensorrt/third_party/onnx
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
make -j$(nproc)
export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
export CXXFLAGS=-I`pwd`
popd
# Build ONNX-TensorRT
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
pushd .
cd 3rdparty/onnx-tensorrt/
mkdir -p build
cd build
cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
make -j$(nproc)
export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
popd
mkdir -p /work/mxnet/lib/
cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
```
If yes, what is the outputs of :
```
ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
```
and finally, can you verify if this path is part of `$LIBRARY_PATH`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-757130539
> but in this project, the onnx-tensorrt/third_party/onnx/ directory is empty, so I download the onnx from "https://github.com/onnx/onnx/tree/553df22c67bee5f0fe6599cff60f1afc6748c635" and put it to the onnx-tensorrt/third_party/onnx/ dir.
You need to run `git submodule update --init --recursive` inside the mxnet folder. Do not manually copy around folders
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] Kh4L commented on issue #19731: USE_TENSORRT=1 not userfriendly
Posted by GitBox <gi...@apache.org>.
Kh4L commented on issue #19731:
URL: https://github.com/apache/incubator-mxnet/issues/19731#issuecomment-756623388
Did you run this successfully:
```
# Build ONNX
pushd .
echo "Installing ONNX."
cd 3rdparty/onnx-tensorrt/third_party/onnx
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
make -j$(nproc)
export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
export CXXFLAGS=-I`pwd`
popd
# Build ONNX-TensorRT
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
pushd .
cd 3rdparty/onnx-tensorrt/
mkdir -p build
cd build
cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
make -j$(nproc)
export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
popd
mkdir -p /work/mxnet/lib/
cp 3rdparty/onnx-tensorrt/third_party/onnx/build/*.so /work/mxnet/lib/
cp -L 3rdparty/onnx-tensorrt/build/libnvonnxparser.so /work/mxnet/lib/
```
If yes, what is the outputs of :
```
ls 3rdparty/onnx-tensorrt/third_party/onnx/onnx
```
and finally, can you verify if this path is part of `$LIBRARY_PATH`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org