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
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
20 changes: 17 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
#
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions src/client_backend/triton/triton_client_backend.cc
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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);
Comment on lines 192 to 195

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Subtle semantic difference from the replaced field

always_print_fields_with_no_presence is the documented protobuf v33 replacement for always_print_primitive_fields, but the two options diverge for proto3 optional scalar fields and oneof members: the old option printed those at their default value regardless of whether they were explicitly set; the new option will omit them when they are not set (because optional and oneof fields carry explicit presence).

If any field in ModelMetadataResponse or ModelConfigResponse is a proto3 optional scalar (or is a oneof member), callers that previously received a full JSON object with default-zero values will now get a sparse object and may hit missing-key errors. The same applies to the TFS GetModelMetadataResponse site. Worth confirming against the actual .proto definitions that no optional/oneof scalars are relied upon at their default values.


Expand Down Expand Up @@ -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);

Expand Down
Loading