RPC被认为是有害的:在RDMA上进行快速分布式深度学习
RPC Considered Harmful: Fast Distributed Deep Learning on RDMA
摘要:
深度学习作为一种重要的新的资源密集型工作负载出现,并已成功应用于计算机视觉、语音、自然语言处理等领域。分布式深度学习正成为应对不断增长的数据和模型规模的必要手段。其计算的典型特征是一个简单的张量数据抽象来建模多维矩阵,一个数据流图来建模计算,以及相对频繁的同步迭代执行,从而使其与Map/Reduce风格的分布式大数据计算有很大的不同。RPC通常用作通信原语,已被流行的深度学习框架所采用,例如使用gRPC的TensorFlow。我们证明了RPC对于分布式深度学习计算是次优的,特别是在支持RDMA的网络上。张量抽象和数据流图与RDMA网络相结合,提供了减少不必要开销的机会(例如,存储器拷贝)而不牺牲可编程性和通用性。特别是,从数据访问的角度来看,远程机器被抽象为RDMA通道上的“设备”,具有用于分配、读取和写入内存区域的简单内存接口。我们的图分析器同时查看数据流图和张量,以使用此接口优化内存分配和远程数据访问。结果是,与TensorFlow中的标准gRPC相比,代表性深度学习基准测试的速度提高了25倍,即使是针对RDMA优化的RPC实现也提高了169%,从而在训练过程中实现了更快的收敛。
英文摘要:
Deep learning emerges as an important new resource-intensive workload and has been successfully applied in computer vision, speech, natural language processing, and so on. Distributed deep learning is becoming a necessity to cope with growing data and model sizes. Its computation is typically characterized by a simple tensor data abstraction to model multi-dimensional matrices, a data-flow graph to model computation, and iterative executions with relatively frequent synchronizations, thereby making it substantially different from Map/Reduce style distributed big data computation. RPC, commonly used as the communication primitive, has been adopted by popular deep learning frameworks such as TensorFlow, which uses gRPC. We show that RPC is sub-optimal for distributed deep learning computation, especially on an RDMA-capable network. The tensor abstraction and data-flow graph, coupled with an RDMA network, offers the opportunity to reduce the unnecessary overhead (e.g., memory copy) without sacrificing programmability and generality. In particular, from a data access point of view, a remote machine is abstracted just as a "device" on an RDMA channel, with a simple memory interface for allocating, reading, and writing memory regions. Our graph analyzer looks at both the data flow graph and the tensors to optimize memory allocation and remote data access using this interface. The result is up to 25 times speedup in representative deep learning benchmarks against the standard gRPC in TensorFlow and up to 169% improvement even against an RPC implementation optimized for RDMA, leading to faster convergence in the training process.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。