The model and code I’ve already sent in Relevant Files block.
And I tried trtexec to convert the onnx, if I not set the min/opt/max dynamic shapes with command
${trtexec} --onnx=output/models/${model_name}.onnx \
--saveEngine=output/models/${model_name}.engine \
--dumpOutput \
--dumpProfile \
--dumpLayerInfo --useSpinWait \
--separateProfileRun >output/models/log/trtexec.log
I will got:
If I set the dynamic shapes with command:
min_batch=1
max_batch=8
opt_batch=4
${trtexec} --onnx=output/models/${model_name}.onnx \
--saveEngine=output/models/${model_name}.engine \
--minShapes=element_states_batch:${min_batch}x136x128,element_hidden_states:${min_batch}x136x128,element_states_mask:${min_batch}x136,lane_states_batch:${min_batch}x128x128,lane_mask:${min_batch}x128,sparse_goals_2D:${min_batch}x1536x2,sparse_goals_2D_mask:${min_batch}x1536 \
--optShapes=element_states_batch:${opt_batch}x136x128,element_hidden_states:${opt_batch}x136x128,element_states_mask:${opt_batch}x136,lane_states_batch:${opt_batch}x128x128,lane_mask:${opt_batch}x128,sparse_goals_2D:${opt_batch}x1536x2,sparse_goals_2D_mask:${opt_batch}x1536 \
--maxShapes=element_states_batch:${max_batch}x136x128,element_hidden_states:${max_batch}x136x128,element_states_mask:${max_batch}x136,lane_states_batch:${max_batch}x128x128,lane_mask:${max_batch}x128,sparse_goals_2D:${max_batch}x1536x2,sparse_goals_2D_mask:${max_batch}x1536 \
--dumpOutput \
--dumpProfile \
--dumpLayerInfo --useSpinWait \
--separateProfileRun >output/models/log/trtexec.log
And I got this:
Whole trtexec log:
trtexec.log (10.0 KB)

