Skip to content

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) #4842

Description

@viktorsroze-sketch

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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions