From ffa1768335a81886acb545140d0fc5c17e046a35 Mon Sep 17 00:00:00 2001 From: Vinya Kestur Date: Mon, 27 Jul 2026 23:35:13 +0000 Subject: [PATCH 1/2] test: wire instance_queue_test into L0 CI path Add L0_instance_queue runner and copy the core unit-test binary in Dockerfile.QA so instance_queue_test actually executes in CI (TRI-1626). --- Dockerfile.QA | 3 ++- qa/L0_instance_queue/test.sh | 52 ++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100755 qa/L0_instance_queue/test.sh diff --git a/Dockerfile.QA b/Dockerfile.QA index 282dfa409c..c56a27f17b 100644 --- a/Dockerfile.QA +++ b/Dockerfile.QA @@ -147,7 +147,8 @@ RUN mkdir -p qa/common && \ cp bin/logging_test qa/L0_logging/. && \ cp bin/backend_output_detail_test qa/L0_backend_output_detail/. && \ cp -r deploy/mlflow-triton-plugin qa/L0_mlflow/. && \ - cp bin/input_byte_size_test qa/L0_input_validation/. + cp bin/input_byte_size_test qa/L0_input_validation/. && \ + cp bin/instance_queue_test qa/L0_instance_queue/. RUN mkdir -p qa/pkgs && \ cp python/triton*.whl qa/pkgs/. && \ diff --git a/qa/L0_instance_queue/test.sh b/qa/L0_instance_queue/test.sh new file mode 100755 index 0000000000..5448197e77 --- /dev/null +++ b/qa/L0_instance_queue/test.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NVIDIA CORPORATION nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +RET=0 + +export CUDA_VISIBLE_DEVICES=0 + +rm -f *.log + +TEST_LOG="./instance_queue_test.log" +TEST_EXEC=./instance_queue_test + +set +e +LD_LIBRARY_PATH=/opt/tritonserver/lib:$LD_LIBRARY_PATH $TEST_EXEC >>$TEST_LOG 2>&1 +if [ $? -ne 0 ]; then + echo -e "\n***\n*** Instance Queue Unit Test Failed\n***" + RET=1 +fi +set -e + +if [ $RET -eq 0 ]; then + echo -e "\n***\n*** Test Passed\n***" +else + cat $TEST_LOG + echo -e "\n***\n*** Test FAILED\n***" +fi + +exit $RET From 339bef627e3ec7cc7a97a74937109f19a084fba7 Mon Sep 17 00:00:00 2001 From: Vinya Kestur Date: Wed, 29 Jul 2026 18:20:47 +0000 Subject: [PATCH 2/2] test: run instance_queue_test from L0_batcher Move the unit test into the existing batcher L0 suite instead of a separate L0_instance_queue path, per review feedback. --- Dockerfile.QA | 2 +- qa/L0_batcher/test.sh | 13 +++++++++ qa/L0_instance_queue/test.sh | 52 ------------------------------------ 3 files changed, 14 insertions(+), 53 deletions(-) delete mode 100755 qa/L0_instance_queue/test.sh diff --git a/Dockerfile.QA b/Dockerfile.QA index c56a27f17b..6560b2c5e6 100644 --- a/Dockerfile.QA +++ b/Dockerfile.QA @@ -148,7 +148,7 @@ RUN mkdir -p qa/common && \ cp bin/backend_output_detail_test qa/L0_backend_output_detail/. && \ cp -r deploy/mlflow-triton-plugin qa/L0_mlflow/. && \ cp bin/input_byte_size_test qa/L0_input_validation/. && \ - cp bin/instance_queue_test qa/L0_instance_queue/. + cp bin/instance_queue_test qa/L0_batcher/. RUN mkdir -p qa/pkgs && \ cp python/triton*.whl qa/pkgs/. && \ diff --git a/qa/L0_batcher/test.sh b/qa/L0_batcher/test.sh index a17594f8f9..5e4c20a79a 100755 --- a/qa/L0_batcher/test.sh +++ b/qa/L0_batcher/test.sh @@ -837,6 +837,19 @@ set -e kill_server +# instance_queue_test: unit test for waiting_consumer_count_ merge accounting +# (core dynamic-batcher / InstanceQueue path). +INSTANCE_QUEUE_TEST_LOG="./instance_queue_test.log" +INSTANCE_QUEUE_TEST_EXEC=./instance_queue_test +set +e +LD_LIBRARY_PATH=/opt/tritonserver/lib:$LD_LIBRARY_PATH $INSTANCE_QUEUE_TEST_EXEC >>$INSTANCE_QUEUE_TEST_LOG 2>&1 +if [ $? -ne 0 ]; then + cat $INSTANCE_QUEUE_TEST_LOG + echo -e "\n***\n*** Instance Queue Unit Test Failed\n***" + RET=1 +fi +set -e + if [ $RET -eq 0 ]; then echo -e "\n***\n*** Test Passed\n***" else diff --git a/qa/L0_instance_queue/test.sh b/qa/L0_instance_queue/test.sh deleted file mode 100755 index 5448197e77..0000000000 --- a/qa/L0_instance_queue/test.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of NVIDIA CORPORATION nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -RET=0 - -export CUDA_VISIBLE_DEVICES=0 - -rm -f *.log - -TEST_LOG="./instance_queue_test.log" -TEST_EXEC=./instance_queue_test - -set +e -LD_LIBRARY_PATH=/opt/tritonserver/lib:$LD_LIBRARY_PATH $TEST_EXEC >>$TEST_LOG 2>&1 -if [ $? -ne 0 ]; then - echo -e "\n***\n*** Instance Queue Unit Test Failed\n***" - RET=1 -fi -set -e - -if [ $RET -eq 0 ]; then - echo -e "\n***\n*** Test Passed\n***" -else - cat $TEST_LOG - echo -e "\n***\n*** Test FAILED\n***" -fi - -exit $RET