onnx2trt.sh 427 Bytes
Newer Older
root's avatar
root committed
1
2
3
4
5
6
7
8
9
#!/bin/bash

onnx_model_path=/datav/sunzhq/workspace/bytedance/new_models/model_1/onnx/
trt_model_path=/datav/sunzhq/workspace/bytedance/new_models/model_1/trt/
export CUDA_VISIBLE_DEVICES=0
for bs in 1 2 4 8 16 32 64 128 256 512 1024 2048; do
    echo "====== batch size: ${bs} ======"
    trtexec --onnx=${onnx_model_path}model-static-batch-size-${bs}.onnx --saveEngine=${trt_model_path}model-static-batch-size-${bs}.trt
done