Repository navigation
Commit 4260f35
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
| 257 | + | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
0 commit comments