Automatically Batching Control-Intensive Programs for Modern Accelerators

10/23/2019
by   Alexey Radul, et al.
0

We present a general approach to batching arbitrary computations for accelerators such as GPUs. We show orders-of-magnitude speedups using our method on the No U-Turn Sampler (NUTS), a workhorse algorithm in Bayesian statistics. The central challenge of batching NUTS and other Markov chain Monte Carlo algorithms is data-dependent control flow and recursion. We overcome this by mechanically transforming a single-example implementation into a form that explicitly tracks the current program point for each batch member, and only steps forward those in the same place. We present two different batching algorithms: a simpler, previously published one that inherits recursion from the host Python, and a more complex, novel one that implemenents recursion directly and can batch across it. We implement these batching methods as a general program transformation on Python source. Both the batching system and the NUTS implementation presented here are available as part of the popular TensorFlow Probability software package.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/02/2017

sgmcmc: An R Package for Stochastic Gradient Markov Chain Monte Carlo

This paper introduces the R package sgmcmc; which can be used for Bayesi...
research
12/30/2019

Dynamic Gauss Newton Metropolis Algorithm

GNM: The MCMC Jagger. A rocking awesome sampler. This python package is ...
research
01/17/2020

Unit Testing for MCMC and other Monte Carlo Methods

We propose approaches for testing implementations of Markov Chain Monte ...
research
12/16/2014

Testing MCMC code

Markov Chain Monte Carlo (MCMC) algorithms are a workhorse of probabilis...
research
09/05/2022

Parallel sampling of decomposable graphs using Markov chain on junction trees

Bayesian inference for undirected graphical models is mostly restricted ...
research
03/27/2019

High Performance Monte Carlo Simulation of Ising Model on TPU Clusters

Large scale deep neural networks profited from an emerging class of AI a...

Please sign up or login with your details

Forgot password? Click here to reset