17 #include "fastdeploy/core/fd_type.h" 29 std::string device =
"CPU";
30 int cpu_thread_num = -1;
39 std::string
hint =
"UNDEFINED";
52 const std::map<std::string, std::vector<int64_t>>& _shape_infos) {
53 shape_infos = _shape_infos;
60 for (
const auto& op : operators) {
61 cpu_operators.insert(op);
69 FDASSERT(_affinity ==
"YES" || _affinity ==
"NO" || _affinity ==
"NUMA" ||
70 _affinity ==
"HYBRID_AWARE",
71 "The affinity mode should be one of the list " 72 "['YES', 'NO', 'NUMA', " 81 FDASSERT(_hint ==
"LATENCY" || _hint ==
"THROUGHPUT" ||
82 _hint ==
"CUMULATIVE_THROUGHPUT" || _hint ==
"UNDEFINED",
83 "The performance hint should be one of the list " 84 "['LATENCY', 'THROUGHPUT', 'CUMULATIVE_THROUGHPUT', " 93 FDASSERT(_num_streams > 0,
"The stream_num must be greater than 0.");
94 num_streams = _num_streams;
98 std::map<std::string, std::vector<int64_t>> shape_infos;
99 std::set<std::string> cpu_operators{
"MulticlassNms"};
std::string hint
Performance hint mode.
Definition: option.h:39
void SetShapeInfo(const std::map< std::string, std::vector< int64_t >> &_shape_infos)
Set shape info for OpenVINO.
Definition: option.h:51
void SetPerformanceHint(const std::string &_hint)
Set the Performance Hint.
Definition: option.h:80
void SetStreamNum(int _num_streams)
Set the number of streams.
Definition: option.h:92
void SetCpuOperators(const std::vector< std::string > &operators)
While use OpenVINO backend with intel GPU, use this interface to specify operators run on CPU...
Definition: option.h:59
std::string affinity
Affinity mode.
Definition: option.h:36
void SetAffinity(const std::string &_affinity)
Set Affinity mode.
Definition: option.h:68
int num_streams
Number of streams while use OpenVINO.
Definition: option.h:33
void SetDevice(const std::string &name="CPU")
Set device name for OpenVINO, default 'CPU', can also be 'AUTO', 'GPU', 'GPU.1'....
Definition: option.h:44
Option object to configure OpenVINO backend.
Definition: option.h:28
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16