plugin  0.1.0
config_factory.h
1 /*
2 // Copyright (C) 2020-2024 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16 
17 #pragma once
18 #include <stdint.h>
19 
20 #include <map>
21 #include <set>
22 #include <string>
23 
24 #include <openvino/openvino.hpp>
25 
26 struct ModelConfig {
27  std::string deviceName;
28  std::string cpuExtensionsPath;
29  std::string clKernelsConfigPath;
30  unsigned int maxAsyncRequests;
31  ov::AnyMap compiledModelConfig;
32 
33  std::set<std::string> getDevices();
34  std::map<std::string, std::string> getLegacyConfig() const;
35 
36 protected:
37  std::set<std::string> devices;
38 };
39 
41 public:
42  static ModelConfig getUserConfig(const std::string& flags_d,
43  uint32_t flags_nireq,
44  const std::string& flags_nstreams,
45  uint32_t flags_nthreads);
46  static ModelConfig getMinLatencyConfig(const std::string& flags_d, uint32_t flags_nireq);
47 
48 protected:
49  static ModelConfig getCommonConfig(const std::string& flags_d, uint32_t flags_nireq);
50 };
Definition: config_factory.h:40
Definition: config_factory.h:26