[BUG] nvonnxparser: dynamic batch (-1) + constant-size Split causes uninitialized gather index during shape inference → buildSerializedNetwork returns nullptr
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- backend, machine-learning
Direzione di ricerca
Start by examining the nvonnxparser handling of ONNX Split nodes with constant split sizes and dynamic input dimensions, then trace the shape inference path that produces the gather index. Reproduce with the attached dynamic-batch model and compare against the static-batch model and minimal Conv model. Done means the dynamic model builds successfully or fails with a meaningful per-node error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
When parsing an ONNX model whose input has a dynamic batch dimension (-1) and whose
graph contains Split nodes with constant split sizes (opset 13, split input as
int64 initializer), IBuilder::buildSerializedNetwork() fails and returns nullptr.
The TensorRT logger reports:
[TRT-LOG Error] IBuilder::buildSerializedNetwork: Error Code 4: API Usage Error
(ISliceLayer node_of_sp_12: gather index (1630337677504) must be less than length (5) of data.)
The gather index 1630337677504 is an obviously uninitialized/garbage value (looks like
a wild pointer read), not a real dimension — this smells like a shape-inference bug where
uninitialized memory is consumed as a gather index when the Split node's split sizes are
constant but the input tensor has a dynamic batch dim.
Reproduction matrix
| Model | batch | profile | Result |
|---|---|---|---|
| 1-node Conv, input [-1,3,640,640] | dynamic | min/opt/max set | builds fine |
| Full YOLOv8s-style model (218 nodes), input [1,3,640,640] | static | none | builds fine |
| Same full model, input [-1,3,640,640] | dynamic | min/opt/max set | buildSerializedNetwork returns nullptr |
Same model runs fine in onnxruntime with dynamic batch. The Split nodes use constant
sizes ([32,32], [64,64], [128,128], [256,256] on axis=1 — standard C2f bottleneck
branch split).
Environment
- TensorRT 10.11 (also reproduced with 10.13)
- Windows 10 x64, driver 511 series, RTX 4060 Laptop GPU
- CUDA 12.3 runtime libs (also reproduced with CUDA from TRT 10.13 package)
- Parsing via C API:
nvonnxparserwith an explicit-batch network, optimization
profile min=1/opt=8/max=1000 configured before build
Minimal reproducer
Attaching yolo_dynamic.onnx (the failing model, 44MB) and tmp_min_dyn4.onnx
(1KB, minimal dynamic Conv that PASSES — showing the API usage is correct).
yolo_static1.onnx = same model with batch pinned to 1, builds fine.
Any parser invocation of the failing model with a dynamic-batch profile reproduces
the error above; no exotic flags needed (FP16 on/off, workspace size make no difference).
Expected behavior
Either build the engine, or reject the graph with a meaningful per-node error.
Reading uninitialized memory as a gather index is a parser bug.
通过网盘分享的文件:bug nvonnxparser
链接: https://pan.baidu.com/s/1wY8YsIyz6YtgmbssMNiXBw?pwd=s18n 提取码: s18n
--来自百度网盘超级会员v6的分享
- Lingua principale
- C++
- Stelle
- 13.5k
- Fork
- 2.4k
- Merge medio
- 6g 21h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/TensorRT
-
Module:Polygraphy
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 6 giorni
-
Polygraphy NumPy Top-K sorts unsigned and minimum signed integers incorrectlyForse già presa @0z5a l’ha presa 16 giorni fa. ApertaModule:Polygraphy
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 6 giorni
-
Polygraphy INT32 comparison can overflow and falsely pass at zero toleranceForse già presa @0z5a l’ha presa 16 giorni fa. ApertaModule:Polygraphy
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 6 giorni
-
onnx-graphsurgeon: Graph.toposort() hits RecursionError when a graph has a local function and an If/Loop nodeForse già presa @gabortar l’ha presa 39 giorni fa. ApertaModule:GraphSurgeon
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 6 giorni
-
Polygraphy parse_meta accepts a shape with a missing bracketForse già presa @SashaMIT l’ha presa 51 giorni fa. ApertaModule:Polygraphy
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di NVIDIA/TensorRT
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
maplibre/maplibre-native#5072 ·
I maintainer di solito rispondono entro 1 giorno
-
[UBSan] spawn_simulator passes null child_options.args to uv_spawn (execvp nonnull violation)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
tenstorrent/tt-umd#4017 ·
I maintainer di solito rispondono entro 3 giorni
-
difficulty:easy func:gui prio:low type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NatronGitHub/Natron#1538 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hyprwm/hyprsunset#103 · 1 commento ·