Skip to content

[Bug] TensorRT 10 compatibility issues in Relax TensorRT BYOC (TVM 0.24, CUDA 12.4+) #19609

@guest2180

Description

@guest2180

Description

I am trying to build TVM 0.24 with Relax TensorRT BYOC enabled on a newer CUDA environment.

To support newer CUDA APIs/toolchains, I am currently using CUDA 12.4+ (tested with CUDA 12.8). However, this appears to force usage of newer TensorRT releases (TRT10+), and TVM's current TensorRT integration seems incompatible with these versions.

The Relax TensorRT backend still appears to rely on older TensorRT APIs from roughly the TRT7/TRT8 era.

Build Environment

  • TVM: 0.24
  • CUDA: 12.8
  • TensorRT: 10.16.1
  • OS: Ubuntu 24.04
  • Compiler: GCC 13.3.0

Compilation Errors

I set USE_CUDA ON, USE_CUDNN ON USE_LLVM ON, USE_TENSORRT_CODEGEN ON,USE_TENSORRT_RUNTIME ON.
If I set the last two off, I can successfully compile the TVM, however when I turn the last two on, then
during compilation, many TensorRT API mismatches occur:

src/runtime/contrib/tensorrt/tensorrt_ops.cc:268:40: error: ‘class nvinfer1::INetworkDefinition’ has no member named ‘addConvolution’; did you mean ‘addConvolutionNd’?

src/runtime/contrib/tensorrt/tensorrt_ops.cc:428:15: error: ‘IFullyConnectedLayer’ is not a member of ‘nvinfer1’

src/runtime/contrib/tensorrt/tensorrt_builder.cc:61:15: error: ‘class nvinfer1::IBuilder’ has no member named ‘setMaxBatchSize’; did you mean ‘getMaxDLABatchSize’?

There are many additional incompatibilities involving:

  • destroy()
  • addPooling
  • addPadding
  • setMaxBatchSize
  • deprecated builder/execution APIs
  • etc.

It seems TensorRT 10 removed or renamed many APIs that TVM’s current TensorRT backend still depends on.

For example:

  • addConvolutionaddConvolutionNd
  • addPoolingaddPoolingNd

This makes current Relax TensorRT integration fail to compile against TRT10.

Questions

  1. Is TensorRT 10 officially supported by TVM 0.24 Relax BYOC?

  2. Is there an existing migration effort for TRT10 APIs?

  3. What is the currently recommended environment combination for: Relax, TensorRT, CUDA 12.4+

Any guidance would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions