[Other] Optimize OpenVINO backend (#1228)

* Optimize OpenVINO backend

* Update ov_backend.cc
This commit is contained in:
Jason
2023-02-03 14:18:30 +08:00
committed by GitHub
parent 3c5824c862
commit 5033000f41
6 changed files with 69 additions and 44 deletions
+3 -7
View File
@@ -183,14 +183,14 @@ struct FASTDEPLOY_DECL RuntimeOption {
*/
void SetOpenVINOShapeInfo(
const std::map<std::string, std::vector<int64_t>>& shape_info) {
ov_shape_infos = shape_info;
openvino_option.shape_infos = shape_info;
}
/**
* @brief While use OpenVINO backend with intel GPU, use this interface to specify operators run on CPU
*/
void SetOpenVINOCpuOperators(const std::vector<std::string>& operators) {
ov_cpu_operators = operators;
openvino_option.SetCpuOperators(operators);
}
/**
@@ -399,11 +399,7 @@ struct FASTDEPLOY_DECL RuntimeOption {
int unconst_ops_thres = -1;
std::string poros_file = "";
// ======Only for OpenVINO Backend=======
int ov_num_streams = 0;
std::string openvino_device = "CPU";
std::map<std::string, std::vector<int64_t>> ov_shape_infos;
std::vector<std::string> ov_cpu_operators;
OpenVINOBackendOption openvino_option;
// ======Only for RKNPU2 Backend=======
fastdeploy::rknpu2::CpuName rknpu2_cpu_name_ =