Strongly typed engine returns NaN for every depth output on sm_120 (TRT 11.4); onnxruntime on the same ONNX matches PyTorch
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
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python, pytorch
- Ambito
- backend-api-design, machine-learning
Direzione di ricerca
Start by requesting the shareable random-weight ONNX export and input/output NPZ, then run the supplied strongly typed TensorRT reproduction and compare its outputs with ONNX Runtime. Use the reported intermediate-tensor output experiment to narrow the faulty fused region; the issue names no source files or tests to start from. Done means TensorRT produces finite depth and sky outputs consistent with ONNX Runtime and PyTorch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
A strongly typed engine built from an ONNX export of MVSAnywhere (multi-view depth: reference image, source images, intrinsics and poses; 448x672, fixed shapes) builds without warnings in 140 s but returns NaN for every element of its depth and sky outputs. onnxruntime 1.32.0 (CPU) on the same file matches PyTorch eager (max abs error 0.010 on depths in 0.27..0.31). The fp32 export behaves the same way (all NaN).
TensorRT:
build: ok in 140 s
output depth (1, 448, 672) float32: nan fraction 1.000
output mask (1, 448, 672) bool: all 0
output sky (1, 448, 672) float32: nan fraction 1.000
output depth_range (1, 2) float32: -0.0825, 0.6475
onnxruntime, same file and inputs:
depth (1, 448, 672): nan fraction 0.000, range 0.271..0.315
mask: all 1
sky: range 1.2e-07..0.075
depth_range: 0.259, 0.630
depth_range shows where it goes wrong: TensorRT returns a negative minimum depth, and the log / sqrt of that range downstream turns the depth map into NaN. The coarse first-stage depth inside the engine is 0.998 everywhere instead of 0.30..0.53. With about 60 intermediate tensors marked as network outputs the engine is finite and correct; with 4 of them it is NaN again, so the problem is in a fused region, not a single op.
The same happens with the weights replaced by random values (seed 0): TensorRT again returns depth_range -0.0825, 0.649 and NaN depths, onnxruntime 0.340, 0.567 and finite depths matching eager. So the wrong value does not depend on the weights, and that random-weight file can be shared freely.
Environment
TensorRT 11.4.0.106 (tensorrt-cu13 wheel, current release), RTX 5060 Ti 16 GB (sm_120), driver 595.99.02, CUDA 13.0, Ubuntu 26.04, Python 3.12. ONNX: torch 2.14.1 dynamo exporter, opset 18, fp16 weights, onnx 1.23.2.
Relevant Files
The ONNX file is 407 MB, above the attachment limit; I can share the random-weight export plus the input/output npz on request (or via a link if you tell me where).
Steps To Reproduce
import tensorrt as trt
logger = trt.Logger(trt.Logger.WARNING)
builder = trt.Builder(logger)
network = builder.create_network(1 << int(trt.NetworkDefinitionCreationFlag.STRONGLY_TYPED))
parser = trt.OnnxParser(network, logger)
assert parser.parse_from_file("mvsanywhere_448x672_fp16.onnx")
plan = builder.build_serialized_network(network, builder.create_builder_config())
# deserialize, bind the npz inputs, execute_async_v3: depth and sky are all NaN
Expected: finite depths, as onnxruntime and PyTorch give. Actual: NaN everywhere, no builder warning.
- 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
-
[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 ·
-
Feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qbittorrent/qBittorrent#25338 ·
I maintainer di solito rispondono entro 2 giorni
-
Needs: Attention Needs: Version Info Platform: Android Platform: tvOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
react/react-native#60180 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni