Skip to content

Commit d5eb467

Browse files
authored
ci: Add INT64 Datatype Support for Shape Tensors in TensorRT Backend (#7329)
1 parent f43cedd commit d5eb467

File tree

11 files changed

+1019
-719
lines changed

11 files changed

+1019
-719
lines changed

qa/L0_model_config/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ for modelpath in \
8888
autofill_noplatform/tensorrt/mixed_batch_hint_shape_values/1 \
8989
autofill_noplatform_success/tensorrt/no_config_shape_tensor/1 ; do
9090
mkdir -p $modelpath
91-
cp /data/inferenceserver/${REPO_VERSION}/qa_shapetensor_model_repository/plan_zero_1_float32/1/model.plan \
91+
cp /data/inferenceserver/${REPO_VERSION}/qa_shapetensor_model_repository/plan_zero_1_float32_int32/1/model.plan \
9292
$modelpath/.
9393
done
9494

qa/L0_perf_analyzer/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ cp -r /data/inferenceserver/${REPO_VERSION}/qa_variable_model_repository/graphde
9393
cp -r /data/inferenceserver/${REPO_VERSION}/qa_variable_model_repository/graphdef_int32_int32_float32 $DATADIR/
9494

9595
# Copy shape tensor models
96-
cp -r /data/inferenceserver/${REPO_VERSION}/qa_shapetensor_model_repository/plan_zero_1_float32 $DATADIR/
96+
cp -r /data/inferenceserver/${REPO_VERSION}/qa_shapetensor_model_repository/plan_zero_1_float32_int32 $DATADIR/
9797

9898
# Copying ensemble including a sequential model
9999
cp -r /data/inferenceserver/${REPO_VERSION}/qa_sequence_model_repository/savedmodel_sequence_object $DATADIR
@@ -564,7 +564,7 @@ for PROTOCOL in grpc http; do
564564
# Shape tensor I/O model (server needs the shape tensor on the CPU)
565565
for SHARED_MEMORY_TYPE in none system; do
566566
set +e
567-
$PERF_ANALYZER -v -i $PROTOCOL -m plan_zero_1_float32 --input-data=$SHAPETENSORADTAFILE \
567+
$PERF_ANALYZER -v -i $PROTOCOL -m plan_zero_1_float32_int32 --input-data=$SHAPETENSORADTAFILE \
568568
--shape DUMMY_INPUT0:4,4 -p2000 --shared-memory=$SHARED_MEMORY_TYPE -b 8 -s ${STABILITY_THRESHOLD} \
569569
>$CLIENT_LOG 2>&1
570570
if [ $? -ne 0 ]; then

qa/L0_perf_analyzer_capi/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions
@@ -73,7 +73,7 @@ cp -r /data/inferenceserver/${REPO_VERSION}/qa_variable_model_repository/graphde
7373
cp -r /data/inferenceserver/${REPO_VERSION}/qa_variable_model_repository/graphdef_int32_int32_float32 $DATADIR/
7474

7575
# Copy shape tensor models
76-
cp -r /data/inferenceserver/${REPO_VERSION}/qa_shapetensor_model_repository/plan_zero_1_float32 $DATADIR/
76+
cp -r /data/inferenceserver/${REPO_VERSION}/qa_shapetensor_model_repository/plan_zero_1_float32_int32 $DATADIR/
7777

7878
# Copying ensemble including a sequential model
7979
cp -r /data/inferenceserver/${REPO_VERSION}/qa_sequence_model_repository/savedmodel_sequence_object $DATADIR
@@ -201,7 +201,7 @@ if [ $(cat $CLIENT_LOG | grep "${ERROR_STRING}" | wc -l) -ne 0 ]; then
201201
fi
202202

203203
# Shape tensor I/O model (server needs the shape tensor on the CPU)
204-
$PERF_ANALYZER -v -m plan_zero_1_float32 --input-data=$SHAPETENSORADTAFILE \
204+
$PERF_ANALYZER -v -m plan_zero_1_float32_int32 --input-data=$SHAPETENSORADTAFILE \
205205
--shape DUMMY_INPUT0:4,4 -p2000 -b 8 \
206206
--service-kind=triton_c_api --model-repository=$DATADIR \
207207
--triton-server-directory=$SERVER_LIBRARY_PATH -s ${STABILITY_THRESHOLD} \

qa/L0_trt_shape_tensors/test.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2+
# Copyright (c) 2019-2024, NVIDIA CORPORATION. All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions
@@ -127,10 +127,13 @@ else
127127
fi
128128

129129
# Prepare the config file for dynamic batching tests
130-
CONFIG_FILE="models/plan_zero_1_float32/config.pbtxt"
131-
sed -i "s/^max_batch_size:.*/max_batch_size: 8/" $CONFIG_FILE && \
132-
sed -i "s/^version_policy:.*/version_policy: { specific { versions: [1] }}/" $CONFIG_FILE && \
133-
echo "dynamic_batching { preferred_batch_size: [ 2, 6 ], max_queue_delay_microseconds: 10000000 }" >> $CONFIG_FILE
130+
for dtype in int32 int64; do
131+
CONFIG_FILE="models/plan_zero_1_float32_${dtype}/config.pbtxt"
132+
sed -i "s/^max_batch_size:.*/max_batch_size: 8/" "$CONFIG_FILE"
133+
sed -i "s/^version_policy:.*/version_policy: { specific { versions: [1] }}/" "$CONFIG_FILE"
134+
echo "dynamic_batching { preferred_batch_size: [ 2, 6 ], max_queue_delay_microseconds: 10000000 }" >>"$CONFIG_FILE"
135+
done
136+
134137
for i in \
135138
test_dynamic_different_shape_values \
136139
test_dynamic_identical_shape_values; do
@@ -202,9 +205,11 @@ for i in \
202205
done
203206

204207
# Prepare the config file for dynamic sequence batching tests
205-
CONFIG_FILE="models/plan_dyna_sequence_float32/config.pbtxt"
206-
sed -i "s/max_candidate_sequences:.*/max_candidate_sequences:4/" $CONFIG_FILE && \
207-
sed -i "s/max_queue_delay_microseconds:.*/max_queue_delay_microseconds:5000000/" $CONFIG_FILE
208+
for dtype in int32 int64; do
209+
CONFIG_FILE="models/plan_dyna_sequence_float32_${dtype}/config.pbtxt"
210+
sed -i "s/max_candidate_sequences:.*/max_candidate_sequences:4/" "$CONFIG_FILE"
211+
sed -i "s/max_queue_delay_microseconds:.*/max_queue_delay_microseconds:5000000/" "$CONFIG_FILE"
212+
done
208213

209214
export NO_BATCHING=0
210215

0 commit comments

Comments
 (0)