Myelin "Inconsistent strides" (tactic.cpp:4034) building a strongly typed fp16 network on sm_120, TRT 11.4; the fp32 export of the same model builds
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
Start by running the TensorRT Python reproduction script against the fp16 ONNX export, then compare with the fp32 build. The error points to tactic.cpp:4034 and Myelin codeGenerator.cpp:2011; the issue offers a random-weight export and input on request. Done means the strongly typed fp16 network builds successfully, or the failure is reduced to a reproducible case.
由索引模型根据 Issue 内容生成。
描述
Description
Building a strongly typed engine from an fp16 ONNX export of BridgeDepth (stereo matching with a ViT-L encoder, 994x1482, fixed shapes) fails after 9 s with a Myelin internal check. The same model exported with fp32 weights builds (191 s) and runs. onnxruntime 1.32.0 (CPU) runs the fp16 file and matches PyTorch eager (max abs error 0.023 on disparities around 8).
[TRT] [E] Error Code: 9: Skipping tactic 0x0000000000000000 due to exception [myelin_graph.h:1295: attachExceptionMsgToGraph] MyelinCheckException: tactic.cpp:4034: CHECK(common_values(use_fc_src_strides) == common_values(ir::compute_strides_from_stride_order( use_fc_src_dims, collapse_stride_order, use_fc_use_opnd->paddings()))) failed. Inconsistent strides In compileGraph at /_src/optimizer/myelin/codeGenerator.cpp:2011
[TRT] [E] IBuilder::buildSerializedNetwork: Error Code 10: Internal Error (Could not find any implementation for node {ForeignNode[ONNXTRT_castHelper_8874_output[Constant]...node_slice_371]}. In computeCosts at /_src/optimizer/common/tactic/optimizer.cpp:4254)
The failing ForeignNode starts at a parser cast helper, so the fp16 graph has casts the fp32 graph does not have. The build fails the same way (20 s) with the weights replaced by random values (seed 0), so the graph structure alone triggers it.
Expected: an engine, as with the fp32 export. Actual: build fails inside Myelin for the fp16 graph only.
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, onnx 1.23.2.
Relevant Files
The ONNX file is 1.4 GB (the model weights are CC-BY-NC), far above the attachment limit. I can share the random-weight export plus the input npz on request, or reduce it with polygraphy first if that helps.
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("bridgedepth_994x1482_fp16.onnx")
plan = builder.build_serialized_network(network, builder.create_builder_config())
print(plan is None) # True, with the errors above
- 主要语言
- 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 条评论 ·