forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compilation_context.hpp
58 lines (40 loc) · 1.39 KB
/
compilation_context.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <istream>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include "openvino/core/any.hpp"
namespace InferenceEngine {
class CNNNetwork;
}
namespace ov {
class Tensor;
class Model;
struct NetworkCompilationContext final {
static std::string calculate_file_info(const std::string& filePath);
static std::string compute_hash(const std::shared_ptr<const ov::Model>& model, const ov::AnyMap& compileOptions);
static std::string compute_hash(const std::string& modelName, const ov::AnyMap& compileOptions);
static std::string compute_hash(const std::string& modeStr,
const ov::Tensor& data,
const ov::AnyMap& compileOptions);
};
class CompiledBlobHeader final {
std::string m_ieVersion;
std::string m_fileInfo;
public:
CompiledBlobHeader();
CompiledBlobHeader(const std::string& ieVersion, const std::string& fileInfo);
const std::string& getIeVersion() const {
return m_ieVersion;
}
const std::string& getFileInfo() const {
return m_fileInfo;
}
friend std::istream& operator>>(std::istream& stream, CompiledBlobHeader& header);
friend std::ostream& operator<<(std::ostream& stream, const CompiledBlobHeader& header);
};
} // namespace ov