Skip to content

convert onnx to tensorrt failure. TensorRT 10.6. addGridsample: Error Code 3: ApI Usage Error #4618

@davisleelx

Description

@davisleelx

Log

data = torch.ones((1, 1, 512, 32, 32), dtype=torch.float32)
grid = torch.ones((1, 512, 32, 32, 3), dtype=torch.float32).cuda()
res = torch.nn.functional.grid_sample(img, grid)

The ONNX model performs inference correctly, but conversion to TensorRT fails. The error indicates that the GridSample operator does not support 5D input format.

Image

Environment

**Windows 11

TensorRT Version: 10.6.0.26

NVIDIA GPU: 4070TIs

CUDA Version: 12.8

CUDNN Version: 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module:ONNXIssues relating to ONNX usage and import

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions