You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/03 21:55:41 UTC

[GitHub] [tvm] trevor-m commented on pull request #7581: [BYOC][TensorRT] Make TRT runtime robust to empty or weird subgraphs

trevor-m commented on pull request #7581:
URL: https://github.com/apache/tvm/pull/7581#issuecomment-790088263


   Thanks @comaniac just added one
   
   Test output before fix
   ```
   ubuntu@ip-172-31-15-219:/data/neo-ai-tvm/build$ python3 -m pytest ../tests/python/contrib/test_tensorrt.py -sk test_empty
   enabled targets: llvm -device=arm_cpu; nvptx; llvm; cuda
   pytest marker: 
   ====================================================================== test session starts =======================================================================
   platform linux -- Python 3.6.6, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
   rootdir: /data/neo-ai-tvm, configfile: pytest.ini
   plugins: arraydiff-0.2, cov-2.10.1, openfiles-0.3.0, remotedata-0.3.2, doctestplus-0.1.3
   collected 49 items / 48 deselected / 1 selected                                                                                                                  
   
   ../tests/python/contrib/test_tensorrt.py [21:52:03] /data/neo-ai-tvm/src/runtime/contrib/tensorrt/tensorrt_logger.h:51: ERROR: Tensor tensorrt_output_0 cannot be both input and output
   [21:52:03] /data/neo-ai-tvm/src/runtime/contrib/tensorrt/tensorrt_logger.h:51: ERROR: Network must have at least one output
   [21:52:03] /data/neo-ai-tvm/src/runtime/contrib/tensorrt/tensorrt_logger.h:51: ERROR: Network validation failed.
   Segmentation fault (core dumped)
   ```
   
   With fix:
   ```
   ubuntu@ip-172-31-15-219:/data/neo-ai-tvm/build$ python3 -m pytest ../tests/python/contrib/test_tensorrt.py -sk test_empty
   enabled targets: cuda; nvptx; llvm -device=arm_cpu; llvm
   pytest marker: 
   ====================================================================== test session starts =======================================================================
   platform linux -- Python 3.6.6, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
   rootdir: /data/neo-ai-tvm, configfile: pytest.ini
   plugins: arraydiff-0.2, cov-2.10.1, openfiles-0.3.0, remotedata-0.3.2, doctestplus-0.1.3
   collected 49 items / 48 deselected / 1 selected                                                                                                                  
   
   ../tests/python/contrib/test_tensorrt.py [21:52:25] /data/neo-ai-tvm/src/runtime/contrib/tensorrt/tensorrt_builder.cc:106: tensorrt_output_0 is both an input and an output.
   [21:52:26] /data/neo-ai-tvm/src/runtime/contrib/tensorrt/tensorrt_logger.h:54: WARNING: Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
   .
   
   ================================================================ 1 passed, 48 deselected in 3.05s ================================================================
   ```


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