Close Navigation
Learn more about IBKR accounts
Automatic Full Compilation of Julia Programs and ML Models to Cloud TPUs

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

Posted May 23, 2019
Keno Fischer and Elliot Saba
Julia Computing

Author: Keno Fischer and Elliot Saba

One of the fundamental changes that has enabled the steady progress of machine learning techniques over the past several years has been the availability of vast amounts of compute power to train and optimize machine learning models.

Excerpt:

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.

Read the full paper here: https://arxiv.org/pdf/1810.09868.pdf

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

About Julia Computing

Julia is the fastest modern open-source language for data science, machine learning and scientific computing. Julia provides the functionality, ease-of-use and intuitive syntax of R, Python, Matlab, SAS or Stata combined with the speed, capacity and performance of C, C++ or Java. Julia also provides parallel and distributed computing capabilities out of the box, and unlimited scalability with minimal effort.

About the authors: Keno Fischer is Julia Computing co-founder and CTO, and Eliot Saba is the Senior Research Engineer. Keno Fischer can be contacted at <keno at juliacomputing.com>

Julia Computing provides products, training and consulting to make Julia easy to use, easy to deploy and easy to scale in your organization. Email us: info@juliacomputing.com

Disclosure: Interactive Brokers

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from Julia Computing and is being posted with its permission. The views expressed in this material are solely those of the author and/or Julia Computing and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.