1 篇文章带有标签 “profiling”

OpenVINO 神经网络性能分析

网络性能分析

查看每层的性能测量值,可以获得最耗时的层。

实现方式

通过配置收集指定设备上的性能分析

core = Core()
core.set_property(device_name, {"PERF_COUNT": "YES"})

通过推理请求获得性能分析数据

request = compiled_model.create_infer_request()
results = request.infer({0: input_tensor})
prof_info = request.get_profiling_info()

可视化性能分析 def print_infer_request_profiling_info(prof_info): column_max_widths = { 'node_name': 0, 'node_type': 0, 'exec_type': 0 } for node in prof_info: if len(node.node_name) > column_max_widths['node_name'] : column_max_widths['node_name'] = len(node.