qnn-context-binary-generator如何将多个不同类型的模型打包成一个serialized文件?

富春山水图 2025-01-17 11:15:44

qnn-context-binary-generator如何将多个不同类型的模型打包成一个serialized文件?
使用qnn-context-binary-generator可以将多个模型打包成一个文件,如何在配置htp_config.json时针对每个模型设置graph device属性,不同不同模型在prepare阶段设置不同优先级?

...全文
711 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复

实际是有两个配置文件,请在“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" 
    }
  ]
}

3,770

社区成员

发帖
与我相关
我的任务
社区描述
本论坛以AI、WoS 、XR、IoT、Auto、生成式AI等核心板块组成,为开发者提供便捷及高效的学习和交流平台。 高通开发者专区主页:https://qualcomm.csdn.net/
人工智能物联网机器学习 技术论坛(原bbs) 北京·东城区
社区管理员
  • csdnsqst0050
  • chipseeker
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧