[{"data":1,"prerenderedAt":289},["ShallowReactive",2],{"content-query-phQlvdb6Xo":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"state":13,"body":14,"_type":283,"_id":284,"_source":285,"_file":286,"_stem":287,"_extension":288},"/activities/zh/190","zh",false,"","MindSpore直播首秀回顾，第二场开始报名！","4 月 23 日，机器之心联合华为昇腾学院开设的线上公开课《轻松上手开源框架 MindSpore》第一课正式开讲，MindSpore 前端开发工程师龚子妍为大家带来了主题分享《MindSpore 分布式自动并行训练》","2020-04-24","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/09/21/c1dfe0bb2f79477797d159758ceb8e18.png","activities",1,{"type":15,"children":16,"toc":277},"root",[17,25,31,37,42,50,55,60,65,70,75,80,85,90,95,100,105,110,115,144,150,157,162,167,172,177,182,191,206,213,217,238,253,270],{"type":18,"tag":19,"props":20,"children":22},"element","h1",{"id":21},"mindspore直播首秀回顾第二场开始报名",[23],{"type":24,"value":8},"text",{"type":18,"tag":26,"props":27,"children":28},"p",{},[29],{"type":24,"value":30},"4 月 23 日，机器之心联合华为昇腾学院开设的线上公开课**《轻松上手开源框架 MindSpore》**第一课正式开讲，MindSpore 前端开发工程师龚子妍为大家带来了主题分享《MindSpore 分布式自动并行训练》，第一课回顾视频如下",{"type":18,"tag":32,"props":33,"children":35},"h3",{"id":34},"第一课精彩回顾",[36],{"type":24,"value":34},{"type":18,"tag":26,"props":38,"children":39},{},[40],{"type":24,"value":41},"在第一课《MindSpore分布式自动并行训练》中，我们主要介绍了几种相关的并行模式，包括数据并行，通过分发数据集的方式来提升训练效率；模型并行，通过拆分模型参数来突破单卡的内存瓶颈；混合并行是融合了数据并行和模型并行的一种并行模式。",{"type":18,"tag":26,"props":43,"children":44},{},[45],{"type":18,"tag":46,"props":47,"children":49},"img",{"alt":7,"src":48},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/05/07/6d151628ebbd47a181bd64b05d3e4c6a.png",[],{"type":18,"tag":26,"props":51,"children":52},{},[53],{"type":24,"value":54},"这以上的并行模式在 MindSpore中 都是依赖集合通信来完成多卡间数据同步的。而自动并行特性主要的特点有：通过算子自动切分，推导张量的排布模型；利用构建代价模型的方式，自动搜索了切分策略；并将自动微分扩展到了分布式的领域，可以自动求导通信算子的反向梯度。MindSpore的分布式训练，支持数字并行、模型并行、自动并行的多层次接口，其中，自动并行更加易用，可以有效的帮助网络提升性能。",{"type":18,"tag":26,"props":56,"children":57},{},[58],{"type":24,"value":59},"在第一课的 QA 环节中，有一些问题被大家广泛提到，龚子妍讲师再次做了精选与编辑，供大家参考。",{"type":18,"tag":26,"props":61,"children":62},{},[63],{"type":24,"value":64},"Q1：切分是平均切分吗? 如果是 5 个分四份会怎样？",{"type":18,"tag":26,"props":66,"children":67},{},[68],{"type":24,"value":69},"首先就是在切分方式这里，其实是有并行切分的约束的，比如说它的维度的数据和计算资源其实是需要均匀切分，是以 2 为基，也就是说指定的切分策略中的数字必须都是 2 的倍数。另外像刚刚提到的，如果无法均分的问题，其实在框架中我们是会做校验的，如果是出现了没有办法均分的张量排布模型，我们会在校验中直接报错。",{"type":18,"tag":26,"props":71,"children":72},{},[73],{"type":24,"value":74},"Q2：需要什么硬件支持呢？自己的笔记本电脑是否可以来执行网络？",{"type":18,"tag":26,"props":76,"children":77},{},[78],{"type":24,"value":79},"目前来说的话笔记本电脑或者有 GPU 的环境都可以通过 docker 镜像来简单试用，至于自动并行的特性，对 CPU 和 GPU 的支持还在完善中。我们推荐用户在昇腾芯片上使用自动并行，作为普通用户的话，可以关注我们的开源社区，可以去申请 MindSpore 开发者体验环境进行试用。",{"type":18,"tag":26,"props":81,"children":82},{},[83],{"type":24,"value":84},"Q3：效率具体上有多大提升？有对照数据吗",{"type":18,"tag":26,"props":86,"children":87},{},[88],{"type":24,"value":89},"在开源社区我们公布了 Cifar10 数据集的训练性能数据。对于自动并行特性的话，和业界横向对比的数据还在测试收集中，目前公布的性能数据，是基于 mindspore+昇腾芯片，和其他的并行模式做的比较。从刚刚展示的表格中其实可以看到，自动并行在大分类数的情况下相比数据并行模式性能有比较大的提升。",{"type":18,"tag":26,"props":91,"children":92},{},[93],{"type":24,"value":94},"Q4：讲一下 pipeline 并行？",{"type":18,"tag":26,"props":96,"children":97},{},[98],{"type":24,"value":99},"在我们的框架规划图上是可以看到是有提到 pipeline 并行这个概念的，是自动并行特性其中的一个规划方向。pipeline 并行，也就是我们刚刚提到的层间模型并行的概念，需要把模型按层切分到多个卡上，如果让用户手动实现对开发者来说难度非常大，需要考虑性能、内存、通信、训练效果等问题，我们期望通过框架完成模型按层自动切分到卡上的目标。",{"type":18,"tag":26,"props":101,"children":102},{},[103],{"type":24,"value":104},"Q5：请问数据并行是 allreduce 实现吗？",{"type":18,"tag":26,"props":106,"children":107},{},[108],{"type":24,"value":109},"数据并行，在 MindSpore 中是用集合通信这个方式来实现的。利用到了 AllReduce 操作完成的梯度聚合部分，BroadCast 完成的是参数初始化的广播操作。",{"type":18,"tag":26,"props":111,"children":112},{},[113],{"type":24,"value":114},"大家后续如有更多问题，欢迎关注 MindSpore 的gitee和github，随时提 issue，官方人员将及时为大家解答。",{"type":18,"tag":116,"props":117,"children":118},"ul",{},[119,133],{"type":18,"tag":120,"props":121,"children":122},"li",{},[123,125],{"type":24,"value":124},"Gitee：",{"type":18,"tag":126,"props":127,"children":131},"a",{"href":128,"rel":129},"https://gitee.com/mindspore",[130],"nofollow",[132],{"type":24,"value":128},{"type":18,"tag":120,"props":134,"children":135},{},[136,138],{"type":24,"value":137},"GitHub：",{"type":18,"tag":126,"props":139,"children":142},{"href":140,"rel":141},"https://github.com/mindspore-ai",[130],[143],{"type":24,"value":140},{"type":18,"tag":32,"props":145,"children":147},{"id":146},"公开课第2讲-整图下沉",[148],{"type":24,"value":149},"公开课第2讲 —— 整图下沉",{"type":18,"tag":26,"props":151,"children":152},{},[153],{"type":18,"tag":46,"props":154,"children":156},{"alt":7,"src":155},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/05/07/64efce0281154f42963c177c496b07bc.png",[],{"type":18,"tag":26,"props":158,"children":159},{},[160],{"type":24,"value":161},"**课程主题：**MindSpore中GraphEngine浅析",{"type":18,"tag":26,"props":163,"children":164},{},[165],{"type":24,"value":166},"**课程时间：**4月26日（周日）20:00",{"type":18,"tag":26,"props":168,"children":169},{},[170],{"type":24,"value":171},"**课程讲师：**王俊",{"type":18,"tag":26,"props":173,"children":174},{},[175],{"type":24,"value":176},"**讲师简介：**浙江大学博士，GraphEngine 高级工程师，拥有丰富的基于 MindSpore 的深度学习模型端到端调试、部署经验，熟悉 GE 实现逻辑与细节。",{"type":18,"tag":26,"props":178,"children":179},{},[180],{"type":24,"value":181},"**课程摘要：**本次课程将为大家简介昇腾芯片的特性、MindSpore 中 GraphEngine 如何适配昇腾做整图下沉以及 GraphEngine 提供的底层 debug 工具是如何帮助开发者便捷使用的。",{"type":18,"tag":26,"props":183,"children":184},{},[185],{"type":18,"tag":186,"props":187,"children":188},"strong",{},[189],{"type":24,"value":190},"如何加入",{"type":18,"tag":26,"props":192,"children":193},{},[194,196,204],{"type":24,"value":195},"《轻松上手开源框架 MindSpore》系列课程全程免费，**添加机器之心小助手（syncedai6），备注「",{"type":18,"tag":186,"props":197,"children":198},{},[199],{"type":18,"tag":186,"props":200,"children":201},{},[202],{"type":24,"value":203},"开源",{"type":24,"value":205},"」，**即可加入学习交流群，一起看直播学理论、做作业动手实践。",{"type":18,"tag":26,"props":207,"children":208},{},[209],{"type":18,"tag":46,"props":210,"children":212},{"alt":7,"src":211},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/05/07/81175cd574c9409fa07032efe39fb530.png",[],{"type":18,"tag":26,"props":214,"children":215},{},[216],{"type":24,"value":114},{"type":18,"tag":116,"props":218,"children":219},{},[220,229],{"type":18,"tag":120,"props":221,"children":222},{},[223,224],{"type":24,"value":124},{"type":18,"tag":126,"props":225,"children":227},{"href":128,"rel":226},[130],[228],{"type":24,"value":128},{"type":18,"tag":120,"props":230,"children":231},{},[232,233],{"type":24,"value":137},{"type":18,"tag":126,"props":234,"children":236},{"href":140,"rel":235},[130],[237],{"type":24,"value":140},{"type":18,"tag":26,"props":239,"children":240},{},[241],{"type":18,"tag":186,"props":242,"children":243},{},[244,246,251],{"type":24,"value":245},"感兴趣的同学也可以后台回复：",{"type":18,"tag":186,"props":247,"children":248},{},[249],{"type":24,"value":250},"QQ群",{"type":24,"value":252},"，直接加入我们的官方QQ群与专家直接交流哦~",{"type":18,"tag":26,"props":254,"children":255},{},[256,268],{"type":18,"tag":186,"props":257,"children":258},{},[259,261,266],{"type":24,"value":260},"PPT下载方式：",{"type":18,"tag":186,"props":262,"children":263},{},[264],{"type":24,"value":265},"在MindSpore公众号后台回复关键词",{"type":24,"value":267},"「分布式」",{"type":24,"value":269},"，即可下载。",{"type":18,"tag":26,"props":271,"children":272},{},[273],{"type":18,"tag":46,"props":274,"children":276},{"alt":7,"src":275},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2020/05/07/328570aab6fa49a39a70d20d59423160.jpg",[],{"title":7,"searchDepth":278,"depth":278,"links":279},4,[280,282],{"id":34,"depth":281,"text":34},3,{"id":146,"depth":281,"text":149},"markdown","content:activities:zh:190.md","content","activities/zh/190.md","activities/zh/190","md",1776506010500]