forked from torchpipe/torchpipe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresnet18_gpu_decode.toml
More file actions
36 lines (28 loc) · 1.41 KB
/
resnet18_gpu_decode.toml
File metadata and controls
36 lines (28 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Schedule'parameter
batching_timeout = 6 #默认的凑batch的超时时间
instance_num = 3
precision = "fp16"
[jpg_decoder]
filter="run"
backend = "SyncTensor[ Sequential[DecodeTensor,ResizeTensor,cvtColorTensor] ]" # 需要处理背景线程cuda流同步问题可用SyncTensor, 否则可用Sequential;SyncTensor确保初始化和前向在同一个线程时,能准确处理多个backend的同步时机
resize_h = 224
resize_w = 224
color = "rgb"
next = "cpu_decoder"
[cpu_decoder]
backend = " Sequential[DecodeMat,ResizeMat,cvtColorMat,Mat2Tensor,SyncTensor] " # 需要处理背景线程cuda流同步问题可用SyncTensor, 否则可用Sequential;SyncTensor确保初始化和前向在同一个线程时,能准确处理多个backend的同步时机
filter = "or"
resize_h = 224
resize_w = 224
color = "rgb"
next = "resnet18"
[resnet18]
backend = "SyncTensor[TensorrtTensor]" # 需要处理背景线程cuda流同步问题可用SyncTensor, SyncTensor确保初始化和前向在同一个线程时,能准确处理cuda流同步时机;注意DynamicTensorrtTensor本身也可以正确处理。
max = "4x3x224x224"
min = "1x3x224x224"
# or max='4'
model = "./resnet18.onnx" # or resnet18_merge_mean_std_by_onnx.onnx
mean = "123.675, 116.28, 103.53" # 255*"0.485, 0.456, 0.406"
std = "58.395, 57.120, 57.375" # 255*"0.229, 0.224, 0.225"
instance_num = 2
"model::cache" = "./resnet18.trt" # or ./resnet18.trt.encrypted