Strongly typed engine returns NaN for every depth output on sm_120 (TRT 11.4); onnxruntime on the same ONNX matches PyTorch
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python, pytorch
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 13.5k
- フォーク
- 2.4k
- 平均マージ
- 6日 21時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/TensorRT のほかの issue
-
Module:Polygraphy
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 6 日以内に返信
-
Polygraphy NumPy Top-K sorts unsigned and minimum signed integers incorrectly対応中かも @0z5a が 16 日前に担当しました。 オープンModule:Polygraphy
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 6 日以内に返信
-
Polygraphy INT32 comparison can overflow and falsely pass at zero tolerance対応中かも @0z5a が 16 日前に担当しました。 オープンModule:Polygraphy
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 6 日以内に返信
-
onnx-graphsurgeon: Graph.toposort() hits RecursionError when a graph has a local function and an If/Loop node対応中かも @gabortar が 39 日前に担当しました。 オープンModule:GraphSurgeon
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 6 日以内に返信
-
Polygraphy parse_meta accepts a shape with a missing bracket対応中かも @SashaMIT が 51 日前に担当しました。 オープンModule:Polygraphy
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 6 日以内に返信
NVIDIA/TensorRT の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
maplibre/maplibre-native#5072 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
tenstorrent/tt-umd#4017 ·
メンテナーはふだん 3 日以内に返信
-
difficulty:easy func:gui prio:low type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NatronGitHub/Natron#1538 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
hyprwm/hyprsunset#103 · コメント 1 件 ·