Skip to content

Commit 4260f35

Browse files
authored
feat(autoware_ptv3): allow strongly typed engine builds (#13159)
* refactor(autoware_tensorrt_common): rename precision "as-is" to "strongly-typed" The value selects a strongly typed build, where tensor precisions come from the model. Name it after what it does: "as-is" describes the artifact's treatment rather than the build mode, and reads as a precision on par with fp32/fp16/int8, which it is not. No functional change. The value has no users yet: it was added in #13160 and its first consumer (autoware_ptv3, #13159) is not merged, so renaming now costs nothing. Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> * feat(autoware_ptv3): allow strongly typed engine builds Accept "strongly-typed" as a trt_precision value. The node already forwards trt_precision to the engine config of every model, so this only widens the parameter's schema: tensor precisions are then taken from the ONNX itself instead of being assigned by the TensorRT builder. Models exported with reduced precision need this. The weakly typed precision-assignment pass would re-process their already reduced tensors, and on one of our embedded targets it crashes on PTv3-shaped graphs regardless of builder settings; strongly typed builds skip that pass entirely. Nothing else in the node changes. Engine I/O, node buffers and kernels stay fp32 for every model: reduced-precision exports keep fp32 tensors at the graph boundary through cast layers inside the model, which the exporter handles. Strong typing is independent of the model's precision, so an fp32 export can also be built this way for reproducible, model-defined numerics. Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> * chore: simplify trt_precision description Signed-off-by: Max Schmeller <6088931+mojomex@users.noreply.github.com> --------- Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp> Signed-off-by: Max Schmeller <6088931+mojomex@users.noreply.github.com>
1 parent c365e3b commit 4260f35

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎perception/autoware_ptv3/schema/ptv3.schema.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@
254254
},
255255
"trt_precision": {
256256
"type": "string",
257-
"description": "TensorRT inference precision.",
258-
"enum": ["fp16", "fp32"]
257+
"description": "How the TensorRT engines are built. \"fp16\" and \"fp32\" request a precision for a weakly typed build, letting the builder assign tensor precisions. \"strongly-typed\" takes every tensor precision from the model itself.",
258+
"enum": ["fp16", "fp32", "strongly-typed"]
259259
},
260260
"cloud_capacity": {
261261
"type": "integer",

0 commit comments

Comments
 (0)