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)
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
从报告者处获取 0.94 GB 的 BF16 ONNX repro,然后使用 TensorRT 11.2.1.2 运行 trtexec,并将 BF16 build 与提供的 FP16 control 进行比较。从“Computing costs”之后的 Myelin compiler-backend 阶段开始;当 strongly-typed BF16 transformer engine 能够在不发生 SIGSEGV 的情况下完成构建,同时保持报告中的 control 行为时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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_level0, 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 小时
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天内回复
相似的 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 条评论 ·