Skip to content

Commit 3183f8f

Browse files
committed
Add test plan for is_non_linear_format_io
1 parent d290291 commit 3183f8f

File tree

6 files changed

+123
-1
lines changed

6 files changed

+123
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
max_batch_size: 8
2+
input [
3+
{
4+
name: "INPUT0"
5+
data_type: TYPE_FP32
6+
dims: [ 16 ]
7+
is_non_linear_format_io: true
8+
},
9+
{
10+
name: "INPUT1"
11+
data_type: TYPE_FP32
12+
dims: [ 16 ]
13+
}
14+
]
15+
output [
16+
{
17+
name: "OUTPUT0"
18+
data_type: TYPE_FP32
19+
dims: [ 16 ]
20+
},
21+
{
22+
name: "OUTPUT1"
23+
data_type: TYPE_FP32
24+
dims: [ 16 ]
25+
}
26+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'INPUT0' uses a linear IO format, but 'is_non_linear_format_io' is incorrectly set to true in the model configuration.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
max_batch_size: 8
2+
input [
3+
{
4+
name: "INPUT0"
5+
data_type: TYPE_FP32
6+
dims: [ 16 ]
7+
},
8+
{
9+
name: "INPUT1"
10+
data_type: TYPE_FP32
11+
dims: [ 16 ]
12+
}
13+
]
14+
output [
15+
{
16+
name: "OUTPUT0"
17+
data_type: TYPE_FP32
18+
dims: [ 16 ]
19+
},
20+
{
21+
name: "OUTPUT1"
22+
data_type: TYPE_FP32
23+
dims: [ 16 ]
24+
is_non_linear_format_io: true
25+
}
26+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'OUTPUT1' uses a linear IO format, but 'is_non_linear_format_io' is incorrectly set to true in the model configuration.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "no_config_non_linear_format_io"
2+
platform: "tensorrt_plan"
3+
backend: "tensorrt"
4+
version_policy {
5+
latest {
6+
num_versions: 1
7+
}
8+
}
9+
max_batch_size: 8
10+
input {
11+
name: "INPUT0"
12+
data_type: TYPE_FP32
13+
dims: -1
14+
dims: 2
15+
dims: 1
16+
is_non_linear_format_io: true
17+
}
18+
input {
19+
name: "INPUT1"
20+
data_type: TYPE_FP32
21+
dims: -1
22+
dims: 2
23+
dims: 1
24+
is_non_linear_format_io: true
25+
}
26+
output {
27+
name: "OUTPUT0"
28+
data_type: TYPE_FP32
29+
dims: -1
30+
dims: 2
31+
dims: 1
32+
}
33+
output {
34+
name: "OUTPUT1"
35+
data_type: TYPE_FP32
36+
dims: -1
37+
dims: 2
38+
dims: 1
39+
}
40+
optimization {
41+
input_pinned_memory {
42+
enable: true
43+
}
44+
output_pinned_memory {
45+
enable: true
46+
}
47+
}
48+
dynamic_batching {
49+
preferred_batch_size: 8
50+
}
51+
instance_group {
52+
name: "no_config_non_linear_format_io"
53+
kind: KIND_GPU
54+
count: 1
55+
gpus: 0
56+
}
57+
default_model_filename: "model.plan"

qa/L0_model_config/test.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ for modelpath in \
5656
autofill_noplatform/tensorrt/bad_input_shape/1 \
5757
autofill_noplatform/tensorrt/bad_input_type/1 \
5858
autofill_noplatform/tensorrt/bad_input_shape_tensor/1 \
59+
autofill_noplatform/tensorrt/bad_input_non_linear_format_io/1 \
5960
autofill_noplatform/tensorrt/bad_output_dims/1 \
6061
autofill_noplatform/tensorrt/bad_output_shape/1 \
6162
autofill_noplatform/tensorrt/bad_output_type/1 \
6263
autofill_noplatform/tensorrt/bad_output_shape_tensor/1 \
64+
autofill_noplatform/tensorrt/bad_outut_non_linear_format_io/1 \
6365
autofill_noplatform/tensorrt/too_few_inputs/1 \
6466
autofill_noplatform/tensorrt/too_many_inputs/1 \
6567
autofill_noplatform/tensorrt/unknown_input/1 \
@@ -92,6 +94,14 @@ for modelpath in \
9294
$modelpath/.
9395
done
9496

97+
# Copy TensorRT plans with non-linear format IO into the test model repositories.
98+
for modelpath in \
99+
autofill_noplatform_success/tensorrt/no_config_non_linear_format_io/1 ; do
100+
mkdir -p $modelpath
101+
cp /data/inferenceserver/${REPO_VERSION}/qa_trt_format_model_repository/plan_CHW32_LINEAR_float32_float32_float32/1/model.plan \
102+
$modelpath/.
103+
done
104+
95105
# Copy variable-sized TensorRT plans into the test model repositories.
96106
for modelpath in \
97107
autofill_noplatform_success/tensorrt/no_name_platform_variable/1 \
@@ -593,7 +603,8 @@ for TARGET_DIR in `ls -d autofill_noplatform_success/*/*`; do
593603
# that the directory is an entire model repository.
594604
rm -fr models && mkdir models
595605
if [ -f ${TARGET_DIR}/config.pbtxt ] || [ "$TARGET" = "no_config" ] \
596-
|| [ "$TARGET" = "no_config_variable" ] || [ "$TARGET" = "no_config_shape_tensor" ] ; then
606+
|| [ "$TARGET" = "no_config_variable" ] || [ "$TARGET" = "no_config_shape_tensor" ] \
607+
|| [ "$TARGET" = "no_config_non_linear_format_io" ] ; then
597608
cp -r ${TARGET_DIR} models/.
598609
else
599610
cp -r ${TARGET_DIR}/* models/.

0 commit comments

Comments
 (0)