3,770
社区成员




qnn-context-binary-generator如何将多个不同类型的模型打包成一个serialized文件?
使用qnn-context-binary-generator可以将多个模型打包成一个文件,如何在配置htp_config.json时针对每个模型设置graph device属性,不同不同模型在prepare阶段设置不同优先级?
实际是有两个配置文件,请在“config_file_path”对应的文件设置每个模型的graph device属性,对应到“backend extension config”配置文件中对应"graph_name"修改优先级以及其他属性:
backend extension config:
{
"backend_extensions": {
"shared_library_path": "path_to_shared_library",
"config_file_path": "path_to_config_file"
},
"context_configs": {
"context_priority": "low | normal | normal_high | high",
"async_execute_queue_depth": uint32_value,
"enable_graphs": ["<graph_name_1>", "<graph_name_2>", "..."],
"memory_limit_hint": uint64_value,
"is_persistent_binary": boolean_value,
"cache_compatibility_mode": "permissive | strict"
},
"graph_configs": [
{
"graph_name": "graph_name_2",
"graph_priority": "low | normal | normal_high | high",
"graph_profiling_start_delay": double_value,
"graph_profiling_num_executions": uint64_value
},
{
"graph_name": "graph_name_1",
"graph_priority": "low | normal | normal_high | high",
"graph_profiling_start_delay": double_value,
"graph_profiling_num_executions": uint64_value
}
],
"profile_configs": {
"num_max_events": uint64_value
},
"async_graph_execution_config": {
"input_tensors_creation_tasks_limit": uint32_value,
"execute_enqueue_tasks_limit": uint32_value
}
}
文件路径配置: "config_file_path":
{
"graphs": [
{
"graph_names": [
"qnn"
],
"vtcm_mb": 8,
"O": 3
}
],
"devices": [
{
"dsp_arch": "v73"
}
]
}