集成OpenVINO工具包的Analytics Zoo大数据平台组件设计与实现

 2022-05-06 08:05

论文总字数:33494字

摘 要

随着数据规模的扩大和模型的扩展,深度学习对计算资源,尤其是GPU资源的需求也在飞速增长。但是,由于大量的算法训练及推理服务需求,云端GPU资源经常处于短缺状态。为了缓解GPU资源的压力,使用GPU进行训练,将推理的负载迁移到CPU上成为了一种可能的思路。然而使用CPU进行的推理服务常常由于性能问题,无法满足服务指标。在此背景下,本文基于Analytics Zoo大数据平台提出了一种CPU深度学习推理服务优化方案,通过提升推理服务在CPU上的性能,完成服务从GPU迁移到CPU上的目的,以利用现有集群中大量的CPU服务器,同时节省GPU计算资源。

本文首先对Analytics Zoo大数据平台和它的前身BigDL进行了简短的介绍,然后分析了Analytics Zoo和OpenVINO的相关接口,在已有工作基础之上,提出了OpenVINO集成组件的接口设计和OpenVINO集成组件的实现方案。最后,本文设置了对比实验比较集成前后的性能差异,结果显示经OpenVINO优化后的推理速度相比传统方式提升了约12倍,验证了本文方法的有效性。

关键词:Analytics Zoo,OpenVINO,性能优化,深度学习,大数据

Abstract

With the expansion of data scale and models, the demand for computing resources, especially GPU resources, is also growing rapidly in the area of deep learning. However, due to the large number of training and inference service requirements, the GPU resources on cloud are often in a state of shortage. In order to alleviate the pressure of GPU resources, using the GPU for training and migrating the inference load to the CPU becomes a possible way. However, inference services using the CPU often fail to meet service metrics due to performance issues. In this context, this paper proposes a deep learning inference service optimization scheme on CPU based on Analytics Zoo. By improving the performance of the inference service on the CPU, the purpose of migrating the service from the GPU to the CPU is achieved. In this way, a large number of CPU servers in the existing cluster is utilized and the GPU computing resources is saved.

This paper first introduces Analytics Zoo and its predecessor BigDL, then analyzes the relevant interfaces of Analytics Zoo and OpenVINO. Based on the existing work, it proposes the interface design and the implementation plan of the OpenVINO integration components. Finally, this paper sets the experiments to compare the performance difference before and after the integration. The results show that the speed of inference after OpenVINO optimization is about 12 times higher than that of the traditional method, which verifies the effectiveness of the proposed method.

KEY WORDS: Analytics Zoo, OpenVINO, Performance Optimization, Deep Learning, Big Data

目 录

摘要 I

Abstract II

第一章 绪论 1

1.1 研究背景及意义 1

1.2 研究现状 2

1.3 研究内容 3

1.4 论文章节安排 3

第二章 相关工作 5

2.1 BigDL与Analytics Zoo框架简介 5

2.2 基于Analytics Zoo的深度学习推理实例 7

2.2.1 加载预训练的模型 7

2.2.2 推理已加载模型 7

2.3 本章小结 8

第三章 OpenVINO集成组件的接口设计 9

3.1 OpenVINO概述 9

3.2 模型优化器 10

3.2.1 模型优化器的优化技术 10

3.2.2 模型优化器的函数接口设计 13

3.3 推理引擎 18

3.3.1 推理引擎的工作流 19

3.3.2 推理引擎的函数接口设计 20

3.4 本章小结 24

第四章 OpenVINO集成组件的实现与性能测试 25

4.1 设计策略 25

4.2 系统架构 25

4.3 模型优化器模块 26

4.4 推理引擎模块 27

4.5 前后处理模块 29

4.6 性能测试 31

4.6.1 实验设计 31

4.6.2 实验准备 31

4.6.3 实验结果 32

4.7 本章小结 34

第五章 总结和展望 35

5.1 总结 35

5.2 展望 36

参考文献 37

致谢 38

第一章 绪论

    1. 研究背景及意义

由英特尔公司开发的Analytics Zoo是一个构建于Apache Spark的分布式TensorFlow,Keras和BigDL的统一分析和AI平台。在过去的几年里,许多用户已经基于Analytics Zoo构建了应用程序,这些应用包括基于迁移学习的图像分类、用于降水临近预报的序列到序列预测、用于作业推荐的神经社会过滤以及无监督的时间序列异常检测等。但是,随着数据规模的扩大和模型的扩展,对计算资源,尤其是GPU资源的需求也在飞速增长。如何提高深度学习应用部署效率,降低运行成本,帮助算法及业务团队快速落地应用和服务,是我们所要考虑的问题。

从基础架构的角度,GPU资源的紧缺和CPU利用率的不足是我们面临的主要挑战。由于大量的算法训练及推理服务需求,云端GPU资源经常处于短缺状态,相对的,CPU在云环境中是大量存在的,但是由于业界主要将训练和推理的负载加在GPU之上,这就导致CPU利用率经常处于较低的状态。除此之外,某些客户可能在他们的环境下只部署了CPU集群,对他们来说,重新部署一套GPU集群的代价是相对昂贵的。为了缓解GPU资源的压力以及降低某些客户的成本,使用GPU进行训练,将推理的负载迁移到CPU上成为了一种可能的模式。然而使用CPU进行的推理服务常常由于性能问题,无法满足服务指标。在此背景下,我们希望实现基于CPU的深度学习推理服务优化,通过提升推理服务在CPU上的性能,完成服务从GPU迁移到CPU上的目的,以利用现有集群中大量的CPU服务器,同时节省GPU计算资源。

剩余内容已隐藏,请支付后下载全文,论文总字数:33494字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;