haohuanw opened a new pull request #15335: enable TensorRT integration with cpp 
api
URL: https://github.com/apache/incubator-mxnet/pull/15335
 
 
   ## Description ##
   This PR enables using TensorRT through cpp api
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [ x ] Changes are complete (i.e. I finished coding on this PR)
   - [ x ] All changes have test coverage: 
   - [ x ] Nightly tests are added for complicated/long-running ones (e.g. 
changing distributed kvstore)
        - I have updated the inference test but I don't think this is part of 
the ci task since I am not sure what is the easiest way to add this test in ci.
   - [ x ] Code is well-documented: 
   - [ x ]For new C++ functions in header files, their functionalities and 
arguments are documented. 
   - [ x ]For new examples, README.md is added to explain the what the example 
does, the source of the dataset, expected performance on test set and reference 
to the original paper if applicable
   - [ x ] To the my best knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [ X ] inception_inference.cpp : update example for bind with TRT
   ```
   ./inception_inference --symbol "./model/Inception-BN-symbol.json" --params 
"./model/Inception-BN-0126.params" --synset "./model/synset.txt" --mean 
"./model/mean_224.nd" --image "./model/dog.jpg" --enableTRT
   ...
   [17:53:45] 
/opt/workspace/incubator-mxnet/cpp-package/example/inception_inference.cpp:377: 
The model predicts the input image to be a [ pug, pug-dog ] with Accuracy = 
0.987554
   
   
root@0f0b3e022627:/opt/workspace/incubator-mxnet/build/private/cmake/cpp-package/example#
 LD_LIBRARY_PATH=/opt/workspace/incubator-mxnet/build/lib/:$LD_LIBRARY_PATH 
./inception_inference --symbol "./model/Inception-BN-symbol.json" --params 
"./model/Inception-BN-0126.params" --synset "./model/synset.txt" --mean 
"./model/mean_224.nd" --image "./model/dog.jpg"            
   ...
   [17:53:52] 
/opt/workspace/incubator-mxnet/cpp-package/example/inception_inference.cpp:377: 
The model predicts the input image to be a [ pug, pug-dog ] with Accuracy = 
0.986955
   
   
root@0f0b3e022627:/opt/workspace/incubator-mxnet/build/private/cmake/cpp-package/example#
 LD_LIBRARY_PATH=/opt/workspace/incubator-mxnet/build/lib/:$LD_LIBRARY_PATH 
./inception_inference --symbol "./model/Inception-BN-symbol.json" --params 
"./model/Inception-BN-0126.params" --synset "./model/synset.txt" --mean 
"./model/mean_224.nd" --image "./model/dog.jpg" --gpu
   ...
   [17:54:03] 
/opt/workspace/incubator-mxnet/cpp-package/example/inception_inference.cpp:377: 
The model predicts the input image to be a [ pug, pug-dog ] with Accuracy = 
0.986955
   ```
   - [ x ] symbol.hpp: added some api, these are tested when running 
inception_inference
   - [ x ] contrib.h: new file, added functions for binding TRT, these are 
tested when running inception_inference
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be 
made.
     - This change is for enabling ability to use TensorRT integration through 
C++ API
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to