AutoGraph: Imperative-style Coding with Graph-based Performance

10/16/2018
by   Dan Moldovan, et al.
0

There is a perceived trade-off between machine learning code that is easy to write, and machine learning code that is scalable or fast to execute. In machine learning, imperative style libraries like Autograd and PyTorch are easy to write, but suffer from high interpretive overhead and are not easily deployable in production or mobile settings. Graph-based libraries like TensorFlow and Theano benefit from whole-program optimization and can be deployed broadly, but make expressing complex models more cumbersome. We describe how the use of staged programming in Python, via source code transformation, offers a midpoint between these two library design patterns, capturing the benefits of both. A key insight is to delay all type-dependent decisions until runtime, via dynamic dispatch. We instantiate these principles in AutoGraph, a software system that improves the programming experience of the TensorFlow library, and demonstrate usability improvements with no loss in performance compared to native TensorFlow graphs. We also show that our system is backend agnostic, and demonstrate targeting an alternate IR with characteristics not found in TensorFlow graphs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/27/2019

TensorFlow Eager: A Multi-Stage, Python-Embedded DSL for Machine Learning

TensorFlow Eager is a multi-stage, Python-embedded domain-specific langu...
research
12/03/2019

PyTorch: An Imperative Style, High-Performance Deep Learning Library

Deep learning frameworks have often focused on either usability or speed...
research
12/29/2020

TensorX: Extensible API for Neural Network Model Design and Deployment

TensorX is a Python library for prototyping, design, and deployment of c...
research
05/10/2018

Ariadne: Analysis for Machine Learning Program

Machine learning has transformed domains like vision and translation, an...
research
12/04/2019

Gobi: WebAssembly as a Practical Path to Library Sandboxing

Software based fault isolation (SFI) is a powerful approach to reduce th...
research
03/08/2018

Communication Scheduling as a First-Class Citizen in Distributed Machine Learning Systems

State-of-the-art machine learning systems rely on graph-based models, wi...
research
11/26/2020

ShapeFlow: Dynamic Shape Interpreter for TensorFlow

We present ShapeFlow, a dynamic abstract interpreter for TensorFlow whic...

Please sign up or login with your details

Forgot password? Click here to reset