Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile.QA
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ RUN mkdir -p qa/common && \
mkdir qa/L0_data_compression/models && \
cp -r docs/examples/model_repository/simple qa/L0_data_compression/models && \
cp bin/data_compressor_test qa/L0_data_compression/. && \
cp bin/backend_tensor_size_test qa/L0_input_validation/. && \
cp bin/metrics_api_test qa/L0_metrics/. && \
cp bin/response_cache_test qa/L0_response_cache/. && \
cp bin/request_cancellation_test qa/L0_request_cancellation/. && \
Expand Down
17 changes: 15 additions & 2 deletions qa/L0_input_validation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ CLIENT_LOG="./input_validation_client.log"
TEST_PY=./input_validation_test.py
TEST_RESULT_FILE='./test_results.txt'
SERVER_LOG="./inference_server.log"
TEST_LOG="./input_byte_size_test.log"
TEST_EXEC=./input_byte_size_test

export CUDA_VISIBLE_DEVICES=0

Expand Down Expand Up @@ -151,6 +149,8 @@ kill $SERVER_PID
wait $SERVER_PID

# input_byte_size_test
TEST_LOG="./input_byte_size_test.log"
TEST_EXEC=./input_byte_size_test
cp -r /data/inferenceserver/${REPO_VERSION}/qa_identity_model_repository/{onnx_zero_1_float32,onnx_zero_1_object,onnx_zero_1_bool} ./models

set +e
Expand All @@ -162,6 +162,19 @@ if [ $? -ne 0 ]; then
fi
set -e

# backend_tensor_size_test
TEST_LOG="./backend_tensor_size_test.log"
TEST_EXEC=./backend_tensor_size_test

set +e
LD_LIBRARY_PATH=/opt/tritonserver/lib:$LD_LIBRARY_PATH $TEST_EXEC >> $TEST_LOG 2>&1
if [ $? -ne 0 ]; then
cat $TEST_LOG
echo -e "\n***\n*** backend_tensor_size_test FAILED\n***"
RET=1
fi
set -e

if [ $RET -eq 0 ]; then
echo -e "\n***\n*** Input Validation Test Passed\n***"
else
Expand Down
41 changes: 40 additions & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2019-2025, 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
Expand Down Expand Up @@ -77,6 +77,45 @@ if(${TRITON_ENABLE_HTTP} OR ${TRITON_ENABLE_METRICS} OR
)
endif()

#
# Unit test for Backend API
#
add_executable(
backend_tensor_size_test
backend_tensor_size_test.cc
)

set_target_properties(
backend_tensor_size_test
PROPERTIES
SKIP_BUILD_RPATH TRUE
BUILD_WITH_INSTALL_RPATH TRUE
INSTALL_RPATH_USE_LINK_PATH FALSE
INSTALL_RPATH ""
)

target_include_directories(
backend_tensor_size_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/..
${GTEST_INCLUDE_DIRS}
)

target_link_libraries(
backend_tensor_size_test
PRIVATE
triton-backend-utils # from repo-backend
triton-core-serverapi # from repo-core
triton-core-serverstub # from repo-core
GTest::gtest
GTest::gtest_main
)

install(
TARGETS backend_tensor_size_test
RUNTIME DESTINATION bin
)

add_subdirectory(repoagent/relocation_repoagent repoagent/relocation_repoagent)

add_subdirectory(distributed_addsub distributed_addsub)
Expand Down
Loading
Loading