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

Đang mở
#4,925 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 6 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, python
Lĩnh vực
machine-learning

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Module:Engine Build

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
Ngôn ngữ chính
C++
Star
13.5k
Fork
2.4k
Merge trung bình
6 ngày 21 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/TensorRT

Tất cả issue của NVIDIA/TensorRT

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.