microsoft / microsoft/onnxruntime
EfficientNMS_TRT missing attribute class_agnostic w/ TensorRT 8.6
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the issue
With the latest 1.15 release the support for TensorRT 8.6 was added (thanks btw!), but it seems that the EfficientNMS plugin changes did not come with it.
In TensorRT 8.6 the support for class-agnostic NMS was added via a new attribute (see this [commit](https://github.com/NVIDIA/TensorRT/commit/3efb69b291a83152bcef84d803855408cfa44ffa)) but it seems that it is missing from the ONNX Runtime operator definition [here](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/graph/contrib_ops/contrib_defs.cc#LL2474C1-L2537C10).
When trying to run a mode exported with the EfficientNMS_TRT node that contains this attribute, we get the following error:
`onnxruntime.capi.onnxruntime_pybind11_state.InvalidGraph: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. In Node, ("NMS_Op_sg344", EfficientNMS_TRT, "", -1) : ("/_wrapper/postprocess/Slice_19_output_0": tensor(float),"/_wrapper/postprocess/Mul_42_output_0": tensor(float),) -> ("num_boxes": tensor(int32),"/_wrapper/postprocess/CustomNMS_output_1": tensor(float),"/_wrapper/postprocess/CustomNMS_output_2":tensor(float),"/_wrapper/postprocess/CustomNMS_output_3": tensor(int32),) , Error Unrecognized attribute: class_agnostic for operator EfficientNMS_TRT`
The same model executes correctly if I use TensorRT 8.6 without ONNX Runtime or if I don't specify the `class_agnostic` attribute when creating the node for the exported model.
### To reproduce
I can't distribute the model at this time but if required I could take some time to produce a MWE.
### Urgency
Project deadline around mid June which would greatly benefit from this change.
### Platform
Linux
### OS Version
Ubuntu 20.04.2 LTS
### ONNX Runtime Installation
Released Package
### ONNX Runtime Version or Commit ID
1.15
### ONNX Runtime API
Python
### Architecture
X64
### Execution Provider
TensorRT
### Execution Provider Library Version
TensorRT 8.6
Contributor guide
Assessment
This issue has not been assessed yet.