remove reference of g_qnn_mgr in qnn_instance
This commit is contained in:
parent
99320620b0
commit
3c491a3263
2 changed files with 5 additions and 2 deletions
|
@ -1743,6 +1743,7 @@ ggml_backend_t ggml_backend_qnn_init(size_t device, const char * qnn_lib_path) {
|
|||
g_qnn_mgr[device].instance = instance;
|
||||
g_qnn_mgr[device].raw_interface = instance->get_qnn_raw_interface();
|
||||
g_qnn_mgr[device].raw_system_interface = instance->get_qnn_raw_system_interface();
|
||||
g_qnn_mgr[device].socinfo = instance->get_soc_info();
|
||||
|
||||
ggml_backend_t qnn_backend =
|
||||
new ggml_backend{/* .guid = */ ggml_backend_qnn_guid(),
|
||||
|
|
|
@ -262,7 +262,7 @@ namespace qnn_internal {
|
|||
QNN_LOG_INFO("qualcomm soc_model:%d(%s), htp_arch:%d(%s), vtcm_size:%d MB",
|
||||
chipinfo.socModel, qnn::get_chipset_desc(chipinfo.socModel),
|
||||
htp_arch, qnn::get_htparch_desc(htp_arch), chipinfo.vtcmSize);
|
||||
g_qnn_mgr[QNN_BACKEND_NPU].socinfo = { chipinfo.socModel, htp_arch, chipinfo.vtcmSize };
|
||||
_soc_info = { chipinfo.socModel, htp_arch, chipinfo.vtcmSize };
|
||||
}
|
||||
_qnn_raw_interface.deviceFreePlatformInfo(nullptr, p_info);
|
||||
|
||||
|
@ -864,6 +864,7 @@ namespace qnn_internal {
|
|||
return _qnn_mem_set.count(buf) != 0U;
|
||||
}
|
||||
|
||||
const qnn::qcom_socinfo &get_soc_info() { return _soc_info; }
|
||||
|
||||
public:
|
||||
std::map<std::string, std::tuple<Qnn_GraphHandle_t, Qnn_Tensor_t*,
|
||||
|
@ -1079,7 +1080,6 @@ namespace qnn_internal {
|
|||
private:
|
||||
static constexpr const int _required_num_providers = 1;
|
||||
|
||||
private:
|
||||
std::string _lib_path;
|
||||
std::string _backend_name;
|
||||
std::string _model_name; // Qualcomm's dedicated prebuilt model name, keep it for further usage
|
||||
|
@ -1134,6 +1134,8 @@ namespace qnn_internal {
|
|||
size_t _rpcmem_capacity = 512;
|
||||
|
||||
std::string _graph_name;
|
||||
|
||||
qnn::qcom_socinfo _soc_info = {};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue