diff --git a/CMakeLists.txt b/CMakeLists.txt index b5333168..5052347a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2020-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 @@ -61,6 +61,7 @@ set(TRITON_REPO_ORGANIZATION "https://github.com/triton-inference-server" CACHE set(TRITON_COMMON_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server/common repo") set(TRITON_CORE_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server/core repo") set(TRITON_CLIENT_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server/core repo") +set(TRITON_THIRD_PARTY_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server/third_party repo") # # Install locations @@ -97,6 +98,7 @@ ExternalProject_Add( -DTRITON_REPO_ORGANIZATION:STRING=${TRITON_REPO_ORGANIZATION} -DTRITON_CORE_REPO_TAG:STRING=${TRITON_CORE_REPO_TAG} -DTRITON_COMMON_REPO_TAG:STRING=${TRITON_COMMON_REPO_TAG} + -DTRITON_THIRD_PARTY_REPO_TAG:STRING=${TRITON_THIRD_PARTY_REPO_TAG} -DTRITON_ENABLE_CC_HTTP:BOOL=${TRITON_ENABLE_CC_HTTP} -DTRITON_ENABLE_CC_GRPC:BOOL=${TRITON_ENABLE_CC_GRPC} -DTRITON_ENABLE_PYTHON_HTTP:BOOL=OFF @@ -159,6 +161,7 @@ if(TRITON_ENABLE_PYTHON_HTTP OR TRITON_ENABLE_PYTHON_GRPC) -DTRITON_REPO_ORGANIZATION:STRING=${TRITON_REPO_ORGANIZATION} -DTRITON_CORE_REPO_TAG:STRING=${TRITON_CORE_REPO_TAG} -DTRITON_COMMON_REPO_TAG:STRING=${TRITON_COMMON_REPO_TAG} + -DTRITON_THIRD_PARTY_REPO_TAG:STRING=${TRITON_THIRD_PARTY_REPO_TAG} -DTRITON_ENABLE_CC_HTTP:BOOL=OFF -DTRITON_ENABLE_CC_GRPC:BOOL=OFF -DTRITON_ENABLE_EXAMPLES:BOOL=ON diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ae5f56e9..619a3b27 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2020-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 @@ -28,6 +28,16 @@ cmake_minimum_required (VERSION 3.31.8) project(perf-analyzer LANGUAGES C CXX) +# Compile every target at the same standard the third-party stack was +# built with. The abseil install pins its options (e.g. C++20 +# std-ordering types) to the standard used at build time, so targets +# that fall back to the compiler default standard fail to compile +# against its headers. +if(TRITON_MIN_CXX_STANDARD) + set(CMAKE_CXX_STANDARD ${TRITON_MIN_CXX_STANDARD}) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() + # # Perf Analyzer Options # @@ -53,8 +63,12 @@ set(TRITON_CORE_REPO_TAG "main" CACHE STRING "Tag for triton-inference-server/co # Install locations set(TRITON_THIRD_PARTY_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/third-party-install" CACHE STRING "Location of third-party build") -# Add third party installation to the search path -set(CMAKE_PREFIX_PATH ${TRITON_THIRD_PARTY_INSTALL_PREFIX} ${CMAKE_PREFIX_PATH}) +# Add third party installation to the search path. The protobuf install +# tree is listed as its own prefix so that the utf8_range package config +# it nests (required by protobuf-config since protobuf v33) is found. +set(CMAKE_PREFIX_PATH + ${TRITON_THIRD_PARTY_INSTALL_PREFIX} + "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf" ${CMAKE_PREFIX_PATH}) # Triton CC Client Libraries find_library(TRITON_HTTP_STATIC_LIB diff --git a/src/client_backend/tensorflow_serving/tfserve_client_backend.cc b/src/client_backend/tensorflow_serving/tfserve_client_backend.cc index 95147bbd..38243565 100644 --- a/src/client_backend/tensorflow_serving/tfserve_client_backend.cc +++ b/src/client_backend/tensorflow_serving/tfserve_client_backend.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. +// Copyright (c) 2020-2026, NVIDIA CORPORATION. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -67,7 +67,7 @@ TFServeClientBackend::ModelMetadata( std::string metadata; ::google::protobuf::util::JsonPrintOptions options; options.preserve_proto_field_names = true; - options.always_print_primitive_fields = true; + options.always_print_fields_with_no_presence = true; ::google::protobuf::util::MessageToJsonString( metadata_proto, &metadata, options); diff --git a/src/client_backend/triton/triton_client_backend.cc b/src/client_backend/triton/triton_client_backend.cc index 40ce3489..78f0037b 100644 --- a/src/client_backend/triton/triton_client_backend.cc +++ b/src/client_backend/triton/triton_client_backend.cc @@ -1,4 +1,4 @@ -// Copyright 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright 2020-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 @@ -190,7 +190,7 @@ TritonClientBackend::ModelMetadata( std::string metadata; ::google::protobuf::util::JsonPrintOptions options; options.preserve_proto_field_names = true; - options.always_print_primitive_fields = true; + options.always_print_fields_with_no_presence = true; ::google::protobuf::util::MessageToJsonString( model_metadata_proto, &metadata, options); @@ -218,7 +218,7 @@ TritonClientBackend::ModelConfig( std::string config; ::google::protobuf::util::JsonPrintOptions options; options.preserve_proto_field_names = true; - options.always_print_primitive_fields = true; + options.always_print_fields_with_no_presence = true; ::google::protobuf::util::MessageToJsonString( model_config_proto, &config, options);