NVIDIA / NVIDIA/TensorRT

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)

Open
#4,842 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Module:Engine Build
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

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.enginePASSED (~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):

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Obtain the 0.94 GB BF16 ONNX repro from the reporter, then run trtexec with TensorRT 11.2.1.2 and compare the BF16 build with the provided FP16 control. Start at the Myelin compiler-backend stage after “Computing costs”; done means the BF16 strongly-typed transformer engine builds without a SIGSEGV while preserving the reported control behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
compilers, machine-learning, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.