Skip to content

Commit

Permalink
Change threading related interface from API 1.0 to 2.0 (#766)
Browse files Browse the repository at this point in the history
* change thrading related interface from API 1.0 to 2.0

* restore the order of header files

* change <> to quotation marks
  • Loading branch information
sunxiaoxia2022 authored Nov 22, 2023
1 parent 7d8f701 commit 7c3d3da
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 4 additions & 6 deletions modules/nvidia_plugin/src/cuda_compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <memory_manager/cuda_memory_manager.hpp>
#include <ops/nop_op.hpp>
#include <ops/subgraph.hpp>
#include <threading/ie_executor_manager.hpp>
#include <utility>

#include "cuda_compiled_model.hpp"
Expand All @@ -26,16 +25,15 @@
#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 "openvino/runtime/threading/executor_manager.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";
Expand Down
2 changes: 1 addition & 1 deletion modules/nvidia_plugin/src/cuda_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion modules/nvidia_plugin/src/cuda_infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <map>
#include <memory>
#include <string>
#include <threading/ie_executor_manager.hpp>
#include <utility>

#include "cuda_compiled_model.hpp"
Expand All @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions modules/nvidia_plugin/src/cuda_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#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;
Expand Down Expand Up @@ -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<std::string> 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<std::vector<std::string>>();
for (auto&& configKey : streamExecutorConfigKeys) {
if (configKey != InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS) {
configKeys.emplace_back(configKey);
Expand Down
2 changes: 1 addition & 1 deletion modules/nvidia_plugin/src/cuda_thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include <mutex>
#include <queue>
#include <thread>
#include <threading/ie_itask_executor.hpp>

#include "cuda_jthread.hpp"
#include "openvino/runtime/threading/itask_executor.hpp"

namespace ov {
namespace nvidia_gpu {
Expand Down

0 comments on commit 7c3d3da

Please sign in to comment.