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:33:56 UTC

[GitHub] [tvm] trevor-m opened a new pull request #7581: [TRT] Make TRT runtime robust to empty or weird subgraphs

trevor-m opened a new pull request #7581:
URL: https://github.com/apache/tvm/pull/7581


   TensorRT doesn't allow a graph to use the same nodes as both an input and output, nor does it allow an output to be marked as an output multiple times.
   
   It seems there are still some corners cases where the partitioning can make these subgraphs which would cause TRT to crash at runtime during graph build. This PR will prevent the crash and allow the model to execute properly.
   
   I will make a separate PR to fix the partitioning bug I have found. 
   


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



[GitHub] [tvm] comaniac merged pull request #7581: [BYOC][TensorRT] Make TRT runtime robust to empty or weird subgraphs

Posted by GitBox <gi...@apache.org>.
comaniac merged pull request #7581:
URL: https://github.com/apache/tvm/pull/7581


   


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



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

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #7581:
URL: https://github.com/apache/tvm/pull/7581#issuecomment-790077695


   Thanks for the fix. Is it possbile to add a test case?


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



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

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #7581:
URL: https://github.com/apache/tvm/pull/7581#issuecomment-790980487


   Thanks @trevor-m 


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



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

Posted by GitBox <gi...@apache.org>.
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