arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.09868cs.PLcs.LGstat.ML
收藏

Julia程序和ML模型到云TPU的自动完整编译

Automatic Full Compilation of Julia Programs and ML Models to Cloud TPUs

Julia Computing, Inc.(朱莉娅计算公司)

Keno Fischer, Elliot Saba

摘要:

Google的Cloud TPU是机器学习工作负载的一种有前途的新硬件架构。近年来,它们为谷歌的许多里程碑式的机器学习成就提供了动力。谷歌现在已经在其云平台上提供了TPU的一般用途,并且最近已经进一步开放它们,允许非TensorFlow前端使用。我们描述了一种方法和实现,通过这个新的API和Google XLA编译器将Julia程序的适当部分卸载到TPU。我们的方法是能够完全融合的VGG19模型表示为一个朱莉娅程序到一个单一的TPU可执行文件被卸载到设备的前向传递。我们的方法与Julia代码上现有的基于编译器的自动微分技术组合良好,因此我们也能够自动获得VGG19向后传递,并类似地将其卸载到TPU。使用我们的编译器针对TPU,我们能够在0.23秒内对一批100张图像进行VGG19正向传递评估,这与CPU上原始模型所需的52.4秒相比毫不逊色。我们的实现不到1000行Julia,没有对核心Julia编译器或任何其他Julia包进行TPU特定的更改。

英文摘要:

Google's Cloud TPUs are a promising new hardware architecture for machine learning workloads. They have powered many of Google's milestone machine learning achievements in recent years. Google has now made TPUs available for general use on their cloud platform and as of very recently has opened them up further to allow use by non-TensorFlow frontends. We describe a method and implementation for offloading suitable sections of Julia programs to TPUs via this new API and the Google XLA compiler. Our method is able to completely fuse the forward pass of a VGG19 model expressed as a Julia program into a single TPU executable to be offloaded to the device. Our method composes well with existing compiler-based automatic differentiation techniques on Julia code, and we are thus able to also automatically obtain the VGG19 backwards pass and similarly offload it to the TPU. Targeting TPUs using our compiler, we are able to evaluate the VGG19 forward pass on a batch of 100 images in 0.23s which compares favorably to the 52.4s required for the original model on the CPU. Our implementation is less than 1000 lines of Julia, with no TPU specific changes made to the core Julia compiler or any other Julia packages.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑