Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When converting the yolov8-det model to ONNX using the NMS operator, the following error occurs when using trtexec to convert it into an engine model. #4383

Open
alanxinn opened this issue Mar 14, 2025 · 1 comment

Comments

@alanxinn
Copy link

alanxinn commented Mar 14, 2025

When converting the yolov8-det model to ONNX using the NMS operator, the following error occurs when using trtexec to convert it into an engine model.

CUDA 11.8
CUDNN 8.9.3
TensorRT 8.6.1.6

ultralytics 8.3.79

onnx 1.17.0 opset 19

error

[03/14/2025-11:03:27] [E] [TRT] [gatherNode.cpp::nvinfer1::builder::`anonymous-namespace'::computeGatherOutputExtents::76] Error Code 4: Internal Error (/Gather_2: rank of data tensor must be greater than or equal to 1)
[03/14/2025-11:03:27] [E] [TRT] ModelImporter.cpp:771: While parsing node number 248 [Gather -> "/Gather_2_output_0"]:
[03/14/2025-11:03:27] [E] [TRT] ModelImporter.cpp:772: --- Begin node ---
[03/14/2025-11:03:27] [E] [TRT] ModelImporter.cpp:773: input: "/ReduceMax_output_0"
input: "/model/model.22/Constant_output_0"
output: "/Gather_2_output_0"
name: "/Gather_2"
op_type: "Gather"
attribute {
name: "axis"
i: 0
type: INT
}

[03/14/2025-11:03:27] [E] [TRT] ModelImporter.cpp:774: --- End node ---
[03/14/2025-11:03:27] [E] [TRT] ModelImporter.cpp:777: ERROR: ModelImporter.cpp:195 In function parseGraph:
[6] Invalid Node - /Gather_2
[gatherNode.cpp::nvinfer1::builder::anonymous-namespace'::computeGatherOutputExtents::76] Error Code 4: Internal Error (/Gather_2: rank of data tensor must be greater than or equal to 1) load error: Invalid Node - /Gather_2 [gatherNode.cpp::nvinfer1::builder::anonymous-namespace'::computeGatherOutputExtents::76] Error Code 4: Internal Error (/Gather_2: rank of data tensor must be greater than or equal to 1)
tensorRT load mask onnx model successfully!!!...
[03/14/2025-11:03:27] [I] [TRT] BuilderFlag::kTF32 is set but hardware does not support TF32. Disabling TF32.
[03/14/2025-11:03:27] [E] [TRT] 4: [network.cpp::nvinfer1::Network::validate::2882] Error Code 4: Internal Error (Network must have at least one output)
try to save engine file now~~~

@lix19937
Copy link

rank of data tensor must be greater than or equal to 1

where 0 < num_elementwise_dims <= 1

see https://docs.nvidia.com/deeplearning/tensorrt/operators/docs/Gather.html#shape-information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants