Skip to content

Commit

Permalink
Proper name for the CompiledNetwork holder
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Nov 12, 2024
1 parent 74d6ff8 commit 146bcea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/plugins/intel_cpu/src/compiled_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CompiledModel : public ov::ICompiledModel {

private:
std::shared_ptr<ov::ISyncInferRequest> create_sync_infer_request() const override;
friend class CompiledModelHandler;
friend class CompiledModelHolder;

const std::shared_ptr<ov::Model> m_model;
const std::shared_ptr<const ov::IPlugin> m_plugin;
Expand Down Expand Up @@ -102,9 +102,9 @@ class CompiledModel : public ov::ICompiledModel {

// This class provides safe access to the internal CompiledModel structures and helps to decouple SyncInferRequest and
// the CompiledModel internal structures
class CompiledModelHandler {
class CompiledModelHolder {
public:
CompiledModelHandler(std::shared_ptr<const CompiledModel> compiled_model)
CompiledModelHolder(std::shared_ptr<const CompiledModel> compiled_model)
: m_compiled_model(std::move(compiled_model)) {
OPENVINO_ASSERT(!m_compiled_model->m_graphs.empty(),
"No graph was found in the compiled model: ",
Expand All @@ -114,17 +114,17 @@ class CompiledModelHandler {
m_id = (m_compiled_model->m_numRequests)++;
}

~CompiledModelHandler() {
~CompiledModelHolder() {
if (m_compiled_model) {
--(m_compiled_model->m_numRequests);
}
}

CompiledModelHandler(const CompiledModelHandler&) = delete;
CompiledModelHandler& operator=(const CompiledModelHandler&) = delete;
CompiledModelHolder(const CompiledModelHolder&) = delete;
CompiledModelHolder& operator=(const CompiledModelHolder&) = delete;

CompiledModelHandler(CompiledModelHandler&&) = default;
CompiledModelHandler& operator=(CompiledModelHandler&&) = default;
CompiledModelHolder(CompiledModelHolder&&) = default;
CompiledModelHolder& operator=(CompiledModelHolder&&) = default;

const Graph& graph() const {
return *m_graph;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using OvString = ov::element_type_traits<ov::element::string>::value_type;

namespace ov {
namespace intel_cpu {
SyncInferRequest::SyncInferRequest(CompiledModelHandler compiled_model)
SyncInferRequest::SyncInferRequest(CompiledModelHolder compiled_model)
: ov::ISyncInferRequest(compiled_model.compiled_model()),
m_compiled_model(std::move(compiled_model)) {
const auto& inputs = get_inputs();
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_cpu/src/infer_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AsyncInferRequest;

class SyncInferRequest : public ov::ISyncInferRequest {
public:
SyncInferRequest(CompiledModelHandler compiled_model);
SyncInferRequest(CompiledModelHolder compiled_model);

void infer() override;

Expand Down Expand Up @@ -113,7 +113,7 @@ class SyncInferRequest : public ov::ISyncInferRequest {
openvino::itt::handle_t m_profiling_task;
std::vector<MemStatePtr> m_memory_states;
AsyncInferRequest* m_asyncRequest = nullptr;
CompiledModelHandler m_compiled_model;
CompiledModelHolder m_compiled_model;

std::unordered_map<std::size_t, ov::Output<const ov::Node>> m_input_ports_map;
std::unordered_map<std::size_t, ov::Output<const ov::Node>> m_output_ports_map;
Expand Down

0 comments on commit 146bcea

Please sign in to comment.