BF16 strongly-typed engine build SIGSEGVs in Myelin on RTX 5090 (sm_120) for DETR-family transformer — identical graph builds fine as FP16 (reproduced on 11.0.0.114 / 11.1.0.106 / 11.2.1.2)

オープン
#4,842 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp, python

調査の方向性

報告者から 0.94 GB の BF16 ONNX repro を入手し、TensorRT 11.2.1.2 で trtexec を実行して、BF16 build を提供された FP16 control と比較します。“Computing costs” の後の Myelin compiler-backend ステージから開始します。BF16 strongly-typed transformer engine が SIGSEGV なしでビルドされ、報告された control の動作が維持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Module:Engine Build

Building a strongly-typed BF16 engine from a DETR-family detection transformer
(Deformable-DETR/DINO-style: 6-layer encoder + 6-layer decoder, multi-scale
deformable attention decomposed to GridSample, Swin-hybrid backbone, static
input 1x3x1344x1344, ONNX opset 19, graph dtypes [BF16, FLOAT]) crashes the
TensorRT builder with a hard SIGSEGV (no exception, process killed) while
Myelin compiles the fused transformer ForeignNode:

[TRT] [I] Compiler backend is used during engine build.
[TRT] [I] Computing costs ...
Segmentation fault (core dumped)        # ~11 s into the build

The decisive contrast: the identical graph exported FP16 strongly-typed builds
fine
(trtexec PASSED, ~123 s, 0.95 GB engine). Only the BF16 dtype path
crashes. FP16 is not a usable fallback for this model (activation overflow >65504
in the transformer → all-NaN), while BF16 accuracy is validated against FP32
(identical detection counts, top-score delta ≤ 0.005), so BF16 is the required
precision.

Reproduced identically across:

  • TensorRT 11.0.0.114, 11.1.0.106, 11.2.1.2 (pip, cu13)
  • builder_optimization_level 0, 1, 3, 5
  • max tactics 1 and 4
  • two independent producers (torch.onnx export and torch_tensorrt dynamo → same
    builder crash)

A small BF16 model containing the same GridSample pattern builds fine — the
crash is specific to the large fused transformer ForeignNode.

Possibly related (same component: Myelin builder on Blackwell sm_120): #4743, #4715.

Environment

TensorRT Version: 11.2.1.2 (also reproduced on 11.1.0.106 and 11.0.0.114)

NVIDIA GPU: GeForce RTX 5090 (Blackwell, sm_120)

NVIDIA Driver Version: 595.84

CUDA Version: 13.2

CUDNN Version: 9.24

Operating System: Ubuntu 24.04.4 LTS (kernel 6.17)

Python Version (if applicable): 3.12

Tensorflow Version (if applicable): —

PyTorch Version (if applicable): 2.14.0.dev20260720+cu132 (used only to produce the ONNX; the crash is in the TRT builder)

Baremetal or Container (if so, version): Baremetal

Relevant Files

Model link: BF16 ONNX repro is 0.94 GB. <ATTACH random-weights re-export link
here — same graph/dtypes, no trained weights — or state:> I can privately share
the ONNX (0.94 GB) on request; the crash is structural (graph + BF16 dtypes), a
randomly-initialized export of the same graph reproduces it.

Steps To Reproduce

Commands or scripts:

pip install tensorrt==11.2.1.2   # python 3.12, cu13
trtexec --onnx=xl_bf16.onnx --saveEngine=xl_bf16.engine
# (strongly typed is the default on TRT 11; same crash via the Python builder API,
#  any builder_optimization_level 0/1/3/5)

Result: SIGSEGV ~11 s after Compiler backend is used during engine build. while
Myelin compiles the fused transformer ForeignNode. No Python/parser error — the
ONNX parses cleanly.

Control (proves it is BF16-specific): export the same graph FP16 strongly-typed →
trtexec --onnx=xl_fp16.onnx --saveEngine=xl_fp16.engine → PASSED (~123 s).

Have you tried the latest release?:
Yes — 11.2.1.2 (released after this bug was first hit on 11.0.0.114): still
SIGSEGVs identically.

Can this model run on other frameworks? For example run ONNX model with
ONNXRuntime (polygraphy run <model.onnx> --onnxrt):
The model runs correctly in PyTorch eager BF16 (autocast; accuracy validated vs
FP32: identical detection counts, top-score delta ≤ 0.005, box delta ≤ 0.026).
The FP16 strongly-typed twin of the same graph builds and runs in TensorRT.
ONNXRuntime cannot execute the BF16 graph on the CUDA EP (BF16 op coverage gaps
for these ops), so ORT is not a reference for the BF16 dtype path.

Commands or scripts:

Have you tried the latest release?:

Can this model run on other frameworks? For example run ONNX model with ONNXRuntime (polygraphy run <model.onnx> --onnxrt):

主要言語
C++
スター
13.5k
フォーク
2.4k
平均マージ
6日 21時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/TensorRT のほかの issue

NVIDIA/TensorRT の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。