diff --git a/CMakeLists.txt b/CMakeLists.txt index e564452b6..457b71d05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ option(TRITON_CORE_HEADERS_ONLY "Build only headers and stub" ON) # # Specifying min required C++ standard # -set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard which features are requested to build this target.") +set(TRITON_MIN_CXX_STANDARD 20 CACHE STRING "The minimum C++ standard which features are requested to build this target.") # # Triton Server API diff --git a/python/tritonserver/CMakeLists.txt b/python/tritonserver/CMakeLists.txt index cc491d0a7..aeebaa48f 100644 --- a/python/tritonserver/CMakeLists.txt +++ b/python/tritonserver/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2023-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 @@ -58,7 +58,7 @@ target_link_libraries( triton-core-serverapi # from repo-core triton-core-serverstub # from repo-core ) -target_compile_features(python-bindings PRIVATE cxx_std_17) +target_compile_features(python-bindings PRIVATE cxx_std_${TRITON_MIN_CXX_STANDARD}) set_property(TARGET python-bindings PROPERTY OUTPUT_NAME triton_bindings) # Add Triton library default path in 'rpath' for runtime library lookup diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c0bff2f0..2e24e566e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -133,7 +133,7 @@ set( infer_trace.cc instance_queue.cc label_provider.cc - memory.cc + triton_memory.cc metric_model_reporter.cc metrics.cc metric_family.cc @@ -180,7 +180,7 @@ set( infer_trace.h instance_queue.h label_provider.h - memory.h + triton_memory.h metric_model_reporter.h metrics.h metric_family.h diff --git a/src/backend_model.cc b/src/backend_model.cc index ba80e58b7..0b84b779a 100644 --- a/src/backend_model.cc +++ b/src/backend_model.cc @@ -682,7 +682,7 @@ TritonModel::PrepareInstances( // Note that the local variables should be captured by value creation_results.emplace_back( - std::async(launch_policy, [=, &instance_mu]() { + std::async(launch_policy, [=, this, &instance_mu]() { // The requested instance did not match an existing instance. // Create a new instance. std::shared_ptr new_instance; diff --git a/src/backend_model_instance.h b/src/backend_model_instance.h index 1a031917e..fab3ece35 100644 --- a/src/backend_model_instance.h +++ b/src/backend_model_instance.h @@ -1,4 +1,4 @@ -// Copyright 2020-2022, 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 @@ -33,13 +33,13 @@ #include #include "constants.h" -#include "memory.h" #include "metric_model_reporter.h" #include "model_config.pb.h" #include "model_config_utils.h" #include "server_message.h" #include "status.h" #include "triton/common/sync_queue.h" +#include "triton_memory.h" namespace triton { namespace core { diff --git a/src/infer_request.h b/src/infer_request.h index 02ab5a4f0..d5c0b5e60 100644 --- a/src/infer_request.h +++ b/src/infer_request.h @@ -34,12 +34,12 @@ #include "infer_response.h" #include "infer_stats.h" #include "infer_trace.h" -#include "memory.h" #include "response_allocator.h" #include "sequence_state.h" #include "status.h" #include "triton/common/logging.h" #include "triton/common/model_config.h" +#include "triton_memory.h" #include "tritonserver_apis.h" namespace triton { namespace core { diff --git a/src/sequence_state.cc b/src/sequence_state.cc index 66e03b9f8..d23e186fa 100644 --- a/src/sequence_state.cc +++ b/src/sequence_state.cc @@ -29,9 +29,9 @@ #include #include "cuda_utils.h" -#include "memory.h" #include "model_config_utils.h" #include "triton/common/logging.h" +#include "triton_memory.h" namespace triton { namespace core { diff --git a/src/sequence_state.h b/src/sequence_state.h index c2e9fe909..ec1fef42d 100644 --- a/src/sequence_state.h +++ b/src/sequence_state.h @@ -28,9 +28,9 @@ #include #include -#include "memory.h" #include "status.h" #include "triton/common/model_config.h" +#include "triton_memory.h" #pragma once diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 47cf8a1e3..e470acc0d 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -75,13 +75,13 @@ set( set( MEMORY_SRCS ../buffer_attributes.cc - ../memory.cc + ../triton_memory.cc ) set( MEMORY_HDRS ../buffer_attributes.h - ../memory.h + ../triton_memory.h ) # diff --git a/src/test/memory_test.cc b/src/test/memory_test.cc index 66558e907..f3e8d40c9 100644 --- a/src/test/memory_test.cc +++ b/src/test/memory_test.cc @@ -1,4 +1,4 @@ -// Copyright 2020-2022, 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 @@ -23,8 +23,6 @@ // 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. -#include "memory.h" - #include #include "cuda_block_manager.h" @@ -33,6 +31,7 @@ #include "gtest/gtest.h" #include "pinned_memory_manager.h" #include "triton/core/tritonserver.h" +#include "triton_memory.h" namespace tc = triton::core; diff --git a/src/test/response_cache_test.cc b/src/test/response_cache_test.cc index 6d7d35db7..6dcf7100d 100644 --- a/src/test/response_cache_test.cc +++ b/src/test/response_cache_test.cc @@ -1,4 +1,4 @@ -// Copyright 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright 2021-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 @@ -29,8 +29,8 @@ #include "cache_manager.h" #include "gtest/gtest-spi.h" #include "gtest/gtest.h" -#include "memory.h" #include "triton/common/logging.h" +#include "triton_memory.h" namespace tc = triton::core; diff --git a/src/memory.cc b/src/triton_memory.cc similarity index 99% rename from src/memory.cc rename to src/triton_memory.cc index 3cde5b494..14425bb50 100644 --- a/src/memory.cc +++ b/src/triton_memory.cc @@ -1,4 +1,4 @@ -// Copyright 2018-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright 2018-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 @@ -24,7 +24,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "memory.h" +#include "triton_memory.h" #include "pinned_memory_manager.h" #include "triton/common/logging.h" diff --git a/src/memory.h b/src/triton_memory.h similarity index 99% rename from src/memory.h rename to src/triton_memory.h index 65eb87177..11b62fc36 100644 --- a/src/memory.h +++ b/src/triton_memory.h @@ -1,4 +1,4 @@ -// Copyright 2018-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright 2018-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