Default TensorRT transformer trunks to NHWC - #1218
Merged
Merged
Conversation
zsqdx
marked this pull request as ready for review
July 28, 2026 17:18
zsqdx
force-pushed
the
agent/auto-trt-nhwc-sm12
branch
from
July 28, 2026 18:39
19de8b9 to
680d37e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trtTransformerNHWC=falseas an explicit per-machine fallback.gtp_example.cfg.Motivation
The old NCHW default was based on earlier TensorRT results. Current results point the other way: my RTX PRO 6000 Blackwell test with TensorRT 10.16.1 showed a large NHWC win, and follow-up testing by lightvector on a weak laptop GPU and an A5000 found NHWC equal or faster on both TensorRT 10.9 and 10.16.
Official
katago benchmarkresults forb11c768h12nbt3tflrs-fson-silu, FP16, fixed symmetry and seed:Equal-thread NHWC gains over NCHW were +29.1% at 5 threads, +55.8% at 16, +81.2% at 32, and +78.6% at 64.
The resolved layout is already part of the timing-cache hash and the
onnx/onnxnhplan-cache tag, so the two engine layouts cannot collide.Validation
trtTransformerNHWCkey, runtime loggedtransformerNHWC=true: 2852.22 visits/s, 2622.04 nnEvals/s at 32 threads.trtTransformerNHWC=false, runtime loggedtransformerNHWC=false: 1578.90 visits/s, 1453.44 nnEvals/s at 32 threads.katago runtests, andkatago runoutputtests.