Skip to content

Commit 6743fd9

Browse files
authored
ci: Stabilize L0_pinned_memory flakiness (#7929)
1 parent 2be6f90 commit 6743fd9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

qa/L0_pinned_memory/test.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
2+
# Copyright (c) 2019-2025, 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
@@ -38,6 +38,9 @@ if [ ! -z "$TEST_REPO_ARCH" ]; then
3838
REPO_VERSION=${REPO_VERSION}_${TEST_REPO_ARCH}
3939
fi
4040

41+
# Use "--request-count" throughout the test to PA stability criteria and
42+
# reduce flaky failures from PA unstable measurements.
43+
REQUEST_COUNT=10
4144
CLIENT=../clients/perf_client
4245
# Only use libtorch as it accepts GPU I/O and it can handle variable shape
4346
BACKENDS=${BACKENDS:="libtorch"}
@@ -91,7 +94,7 @@ for BACKEND in $BACKENDS; do
9194

9295
# Sanity check that the server allocates pinned memory for large size
9396
set +e
94-
$CLIENT -m${ENSEMBLE_NAME} --shape INPUT0:16777216
97+
$CLIENT -m${ENSEMBLE_NAME} --shape INPUT0:16777216 --request-count ${REQUEST_COUNT}
9598
if (( $? != 0 )); then
9699
RET=1
97100
fi
@@ -128,6 +131,7 @@ for BACKEND in $BACKENDS; do
128131
for TENSOR_SIZE in 16384 1048576 2097152 4194304 8388608 16777216; do
129132
$CLIENT -i grpc -u localhost:8001 -m${ENSEMBLE_NAME} \
130133
--shape INPUT0:${TENSOR_SIZE} \
134+
--request-count ${REQUEST_COUNT} \
131135
>> ${BACKEND}.${TENSOR_SIZE}.pinned.log 2>&1
132136
if (( $? != 0 )); then
133137
RET=1
@@ -150,7 +154,7 @@ for BACKEND in $BACKENDS; do
150154

151155
# Sanity check that the server allocates non-pinned memory
152156
set +e
153-
$CLIENT -m${ENSEMBLE_NAME} --shape INPUT0:1
157+
$CLIENT -m${ENSEMBLE_NAME} --shape INPUT0:1 --request-count ${REQUEST_COUNT}
154158
if (( $? != 0 )); then
155159
RET=1
156160
fi
@@ -180,6 +184,7 @@ for BACKEND in $BACKENDS; do
180184
for TENSOR_SIZE in 16384 1048576 2097152 4194304 8388608 16777216; do
181185
$CLIENT -i grpc -u localhost:8001 -m${ENSEMBLE_NAME} \
182186
--shape INPUT0:${TENSOR_SIZE} \
187+
--request-count ${REQUEST_COUNT} \
183188
>> ${BACKEND}.${TENSOR_SIZE}.nonpinned.log 2>&1
184189
if (( $? != 0 )); then
185190
RET=1

0 commit comments

Comments
 (0)