Caenorst opened a new pull request #15399: Add unit tests for TensorRT 
integration and fix some bugs
URL: https://github.com/apache/incubator-mxnet/pull/15399
 
 
   ## Description ##
   TensorRT integration lacked of unit tests, we instead relied on output 
comparison of a full network which is not very pertinent, difficult to find the 
tolerance and not very helpful if it fails.
   
   This PR have two purposes:
    1) Add unit test for all operations:
   As we only partition subgraph of at least 2 Ops we always append an identity 
to each output. we then compare to MXNet, using both TRT FP32 and FP16 
computation.
   2) Fix a bunch of edge cases bugs that have been exposed by the unit tests:
     - NHWC is currently not compatible with TensorRT
     - Pooling is currently not compatible with count_include_pad and only 
compatible with pooling_convention Valid
     - FullyConnected without bias cannot be converted to MatMul (as there 
should be a transpose before) for the moment we decided to remove 
compatibility, it is quite rare to do FullyConnected without bias anyway
     - Concat is not compatible if the concatenation axis is the batch axis
     - The dropout have to be only enabled on training mode (act as identity)
     - BatchNorm with fix_gamma can have gamma != 1. so we force the value to 
be 1. when loading it.
   
   ## 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:
   - Unit tests are added for small changes to verify correctness (e.g. adding 
a new operator)
   - [X] Code is well-documented: 
   - For user-facing API changes, API doc string has been updated. 
   - For new C++ functions in header files, their functionalities and arguments 
are documented. 
   - [X] To the my best knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change
   
   ## Comments ##
   - the test of output comparison in a full networks should probably be 
replaced by an accuracy comparison over a full dataset

----------------------------------------------------------------
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