You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conversion of an ONNX model to TensorRT using trtexec, which includes a scatterElements operation with a reduction like "sum" (opset 16), fails when the number of indices in the operation exceeds the output count.
In the scenarios I've encountered within Graph Neural Networks, the number of indices (n_indices, corresponding to the edges in the graph) is significantly larger than the number of outputs (n_outputs, corresponding to the nodes in the graph).
The ONNX models are stored with the naming convention onnx/{n_indices}_{dim_size}_{n_outputs}_{seed}.onnx.
To replicate the issue, execute the following commands:
# This command fails when `n_outputs = 100` and `n_indices = 1000`.
trtexec --onnx="onnx/1000_3_100_0.onnx"# This command succeeds when `n_outputs` equals `n_indices` (both are 100).
trtexec --onnx="onnx/100_3_100_0.onnx"
The text was updated successfully, but these errors were encountered:
anthony-correia
changed the title
scatter_add Conversion Issue in TensorRTScatterElements With Reduction Issue in TensorRT
Jan 10, 2024
anthony-correia
changed the title
ScatterElements With Reduction Issue in TensorRTScatterElements with Reduction (opset 16) Not Fully Supported
Jan 10, 2024
Short Description
Conversion of an ONNX model to TensorRT using
trtexec
, which includes ascatterElements
operation with a reduction like"sum"
(opset 16), fails when the number of indices in the operation exceeds the output count.Successful conversion requires
n_indices <= n_outputs
.Long Description
Consider the following PyTorch model snippet:
Converting this corrresponding ONNX model using
trtexec
triggers an assertion error:This error likely originates from this line of the ONNX-TensorRT code.
In the scenarios I've encountered within Graph Neural Networks, the number of indices (
n_indices
, corresponding to the edges in the graph) is significantly larger than the number of outputs (n_outputs
, corresponding to the nodes in the graph).Environment
TensorRT Version: 8.6.1.6-1+cuda11.8
GPU Type: NVIDIA RTX A2000 (laptop)
Nvidia Driver Version: 520.61.05
CUDA Version: 11.8.0-1
CUDNN Version: 8.7.0.84-1+cuda11.8
Operating System + Version: Ubuntu 22.04.1 LTS
Relevant Files
I've created a repository to reproduce the issue: anthony-correia/scatter_onnx2tensorrt.
The ONNX models are stored with the naming convention
onnx/{n_indices}_{dim_size}_{n_outputs}_{seed}.onnx
.To replicate the issue, execute the following commands:
The text was updated successfully, but these errors were encountered: