8000 [Bug] test_tensorrt.py::test_conv2d_transpose failed · Issue #9653 · apache/tvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ tvm Public
[Bug] test_tensorrt.py::test_conv2d_transpose failed #9653
Closed
@lp6m

Description

@lp6m

There is a bug in the code generation for TensorRT that causes the conv2d_transpose test to fail.

run_pytest cython a tests/python/contrib/test_tensorrt.py::test_conv2d_transpose
enabled targets: cuda; cuda -model=unknown -libs=cudnn
pytest marker: gpu
================================================================================================ test session starts ================================================================================================
platform linux -- Python 3.6.9, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /workspace
plugins: forked-1.3.0, xdist-2.3.0, profiling-1.7.0
collected 2 items                                                                                                                                                                                                   

tests/python/contrib/test_tensorrt.py .F 
...
---------------------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------------------
[02:42:32] /workspace/src/runtime/contrib/tensorrt/tensorrt_runtime.cc:300: Finished building TensorRT engine for subgraph tvmgen_default_tensorrt_main_0 with batch size 1
[02:42:36] /workspace/src/runtime/contrib/tensorrt/tensorrt_runtime.cc:300: Finished building TensorRT engine for subgraph tvmgen_default_tensorrt_main_0 with batch size 1
------------------------------------------------------------------------- generated xml file: /workspace/build/pytest-results/a-cython.xml --------------------------------------------------------------------------
============================================================================================== short test summary info ==============================================================================================
FAILED tests/python/contrib/test_tensorrt.py::test_conv2d_transpose[run] - AssertionError: 
=========================================================================================== 1 failed, 1 passed in 32.66s ============================================================================================

This problem has not been detected by CI because CI only runs the compile test and not the run test.

If I set the number of output channels in the test to 1 as shown below, the test passes, so I think the cause is that the weights are not converted correctly during the layout conversion, but I have not yet identified where the bug is.

 def test_conv2d_transpose(run_module):
     def get_graph(
         x_shape=(1, 32, 8, 8),
-        k_shape=(32, 16, 3, 3),
+        k_shape=(32, 1, 3, 3),

Also, the test passes fine with commit ID 92ca782, so it is likely that subsequent commits are causing this problem.

Environment

TVM: Release v0.8
TensorRT: 7.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0