From f4b4aa04e2ef4987643bf29a6232c3b7940b84b9 Mon Sep 17 00:00:00 2001 From: sunxiaoxia2022 Date: Tue, 21 Nov 2023 09:21:55 +0800 Subject: [PATCH 1/3] change thrading related interface from API 1.0 to 2.0 --- modules/nvidia_plugin/src/cuda_compiled_model.cpp | 10 ++++------ modules/nvidia_plugin/src/cuda_config.hpp | 2 +- modules/nvidia_plugin/src/cuda_infer_request.cpp | 2 +- modules/nvidia_plugin/src/cuda_plugin.cpp | 12 +++++++----- modules/nvidia_plugin/src/cuda_thread_pool.hpp | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/nvidia_plugin/src/cuda_compiled_model.cpp b/modules/nvidia_plugin/src/cuda_compiled_model.cpp index f0e139991..e514b3be3 100644 --- a/modules/nvidia_plugin/src/cuda_compiled_model.cpp +++ b/modules/nvidia_plugin/src/cuda_compiled_model.cpp @@ -9,9 +9,9 @@ #include #include +#include #include #include -#include #include #include "cuda_compiled_model.hpp" @@ -26,16 +26,14 @@ #include "memory_manager/model/cuda_memory_model_builder.hpp" #include "nvidia/nvidia_config.hpp" #include "nvidia/properties.hpp" - +#include "openvino/runtime/exec_model_info.hpp" +#include "openvino/runtime/internal_properties.hpp" +#include "openvino/runtime/iplugin.hpp" #include "ops/parameter.hpp" #include "ops/result.hpp" #include "transformations/utils/utils.hpp" #include "transformer/cuda_graph_transformer.hpp" -#include "openvino/runtime/exec_model_info.hpp" -#include "openvino/runtime/internal_properties.hpp" -#include "openvino/runtime/iplugin.hpp" - namespace { static constexpr const char* nv_stream_executor_name = "NvidiaStreamExecutor"; static constexpr const char* nv_exclusive_executor = "NvidiaExecutor"; diff --git a/modules/nvidia_plugin/src/cuda_config.hpp b/modules/nvidia_plugin/src/cuda_config.hpp index cca0c2956..94cc18cdd 100644 --- a/modules/nvidia_plugin/src/cuda_config.hpp +++ b/modules/nvidia_plugin/src/cuda_config.hpp @@ -10,7 +10,7 @@ #include "nvidia/nvidia_config.hpp" #include "openvino/runtime/properties.hpp" -#include "threading/ie_istreams_executor.hpp" +#include "openvino/runtime/threading/istreams_executor.hpp" namespace ov { namespace nvidia_gpu { diff --git a/modules/nvidia_plugin/src/cuda_infer_request.cpp b/modules/nvidia_plugin/src/cuda_infer_request.cpp index 0f37f2c68..0add9af15 100644 --- a/modules/nvidia_plugin/src/cuda_infer_request.cpp +++ b/modules/nvidia_plugin/src/cuda_infer_request.cpp @@ -13,8 +13,8 @@ #include #include #include +#include #include -#include #include #include "cuda_compiled_model.hpp" diff --git a/modules/nvidia_plugin/src/cuda_plugin.cpp b/modules/nvidia_plugin/src/cuda_plugin.cpp index ebe27e624..a64cf870b 100644 --- a/modules/nvidia_plugin/src/cuda_plugin.cpp +++ b/modules/nvidia_plugin/src/cuda_plugin.cpp @@ -1,9 +1,9 @@ // Copyright (C) 2018-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include +#include "cuda_plugin.hpp" -#include "ie_metric_helpers.hpp" +#include #include "cpp_interfaces/interface/ie_internal_plugin_config.hpp" #include "cuda/props.hpp" @@ -11,13 +11,13 @@ #include "cuda_infer_request.hpp" #include "cuda_itt.hpp" #include "cuda_operation_registry.hpp" -#include "cuda_plugin.hpp" +#include "ie_metric_helpers.hpp" #include "nvidia/nvidia_config.hpp" #include "openvino/core/op_extension.hpp" #include "openvino/op/util/op_types.hpp" #include "openvino/runtime/core.hpp" #include "openvino/runtime/properties.hpp" -#include "threading/ie_executor_manager.hpp" +#include "openvino/runtime/threading/executor_manager.hpp" #include "transformations/rt_info/fused_names_attribute.hpp" using namespace ov::nvidia_gpu; @@ -215,7 +215,9 @@ ov::Any Plugin::get_property(const std::string& name, const ov::AnyMap& properti } else if (METRIC_KEY(SUPPORTED_CONFIG_KEYS) == name) { std::vector configKeys = { CONFIG_KEY(DEVICE_ID), CONFIG_KEY(PERF_COUNT), NVIDIA_CONFIG_KEY(THROUGHPUT_STREAMS)}; - auto streamExecutorConfigKeys = InferenceEngine::IStreamsExecutor::Config{}.SupportedKeys(); + auto streamExecutorConfigKeys = ov::threading::IStreamsExecutor::Config{} + .get_property(ov::supported_properties.name()) + .as>(); for (auto&& configKey : streamExecutorConfigKeys) { if (configKey != InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS) { configKeys.emplace_back(configKey); diff --git a/modules/nvidia_plugin/src/cuda_thread_pool.hpp b/modules/nvidia_plugin/src/cuda_thread_pool.hpp index 82ed73904..0689067a4 100644 --- a/modules/nvidia_plugin/src/cuda_thread_pool.hpp +++ b/modules/nvidia_plugin/src/cuda_thread_pool.hpp @@ -9,9 +9,9 @@ #include #include #include +#include #include #include -#include #include "cuda_jthread.hpp" From af198b16b65c5246813fe5b43ee17d5df87f0810 Mon Sep 17 00:00:00 2001 From: sunxiaoxia2022 Date: Tue, 21 Nov 2023 09:41:14 +0800 Subject: [PATCH 2/3] restore the order of header files --- modules/nvidia_plugin/src/cuda_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nvidia_plugin/src/cuda_plugin.cpp b/modules/nvidia_plugin/src/cuda_plugin.cpp index a64cf870b..ecb04c9f1 100644 --- a/modules/nvidia_plugin/src/cuda_plugin.cpp +++ b/modules/nvidia_plugin/src/cuda_plugin.cpp @@ -1,17 +1,17 @@ // Copyright (C) 2018-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include "cuda_plugin.hpp" - #include +#include "ie_metric_helpers.hpp" + #include "cpp_interfaces/interface/ie_internal_plugin_config.hpp" #include "cuda/props.hpp" #include "cuda_compiled_model.hpp" #include "cuda_infer_request.hpp" #include "cuda_itt.hpp" #include "cuda_operation_registry.hpp" -#include "ie_metric_helpers.hpp" +#include "cuda_plugin.hpp" #include "nvidia/nvidia_config.hpp" #include "openvino/core/op_extension.hpp" #include "openvino/op/util/op_types.hpp" From 51f0fb50422eec4b687c6394008943ed88d9f1b4 Mon Sep 17 00:00:00 2001 From: sunxiaoxia2022 Date: Wed, 22 Nov 2023 09:52:59 +0800 Subject: [PATCH 3/3] change <> to quotation marks --- modules/nvidia_plugin/src/cuda_compiled_model.cpp | 2 +- modules/nvidia_plugin/src/cuda_infer_request.cpp | 2 +- modules/nvidia_plugin/src/cuda_thread_pool.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nvidia_plugin/src/cuda_compiled_model.cpp b/modules/nvidia_plugin/src/cuda_compiled_model.cpp index e514b3be3..0add8e16e 100644 --- a/modules/nvidia_plugin/src/cuda_compiled_model.cpp +++ b/modules/nvidia_plugin/src/cuda_compiled_model.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -29,6 +28,7 @@ #include "openvino/runtime/exec_model_info.hpp" #include "openvino/runtime/internal_properties.hpp" #include "openvino/runtime/iplugin.hpp" +#include "openvino/runtime/threading/executor_manager.hpp" #include "ops/parameter.hpp" #include "ops/result.hpp" #include "transformations/utils/utils.hpp" diff --git a/modules/nvidia_plugin/src/cuda_infer_request.cpp b/modules/nvidia_plugin/src/cuda_infer_request.cpp index 0add9af15..4098ac389 100644 --- a/modules/nvidia_plugin/src/cuda_infer_request.cpp +++ b/modules/nvidia_plugin/src/cuda_infer_request.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -25,6 +24,7 @@ #include "cuda_simple_execution_delegator.hpp" #include "nvidia/properties.hpp" #include "openvino/runtime/make_tensor.hpp" +#include "openvino/runtime/threading/executor_manager.hpp" namespace ov { namespace nvidia_gpu { diff --git a/modules/nvidia_plugin/src/cuda_thread_pool.hpp b/modules/nvidia_plugin/src/cuda_thread_pool.hpp index 0689067a4..4dc7c6dc7 100644 --- a/modules/nvidia_plugin/src/cuda_thread_pool.hpp +++ b/modules/nvidia_plugin/src/cuda_thread_pool.hpp @@ -9,11 +9,11 @@ #include #include #include -#include #include #include #include "cuda_jthread.hpp" +#include "openvino/runtime/threading/itask_executor.hpp" namespace ov { namespace nvidia_gpu {