Skip to content

Taichi: A Language for High-Performance Computation on Spatially Sparse Data Structures

Algorithm
Taichi

Abstract

3D visual computing data are often spatially sparse. To exploit such sparsity, people have developed hierarchical sparse data structures, such as multilevel sparse voxel grids, particles, and 3D hash tables. However, developing and using these high-performance sparse data structures is challenging, due to their intrinsic complexity and overhead. We propose Taichi , a new data-oriented programming language for efficiently authoring, accessing, and maintaining such data structures. The language offers a high-level, data structure-agnostic interface for writing computation code. The user independently specifies the data structure. We provide several elementary components with different sparsity properties that can be arbitrarily composed to create a wide range of multi-level sparse data structures. This decoupling of data structures from computation makes it easy to experiment with different data structures without changing computation code, and allows users to write computation as if they are working with a dense array. Our compiler then uses the semantics of the data structure and index analysis to automatically optimize for locality, remove redundant operations for coherent accesses, maintain sparsity and memory allocations, and generate efficient parallel and vectorized instructions for CPUs and GPUs. Our approach yields competitive performance on common computational kernels such as stencil applications, neighbor lookups, and particle scattering. We demonstrate our language by implementing simulation, rendering, and vision tasks including a material point method simulation, finite element analysis, a multigrid Poisson solver for pressure projection, volumetric path tracing, and 3D convolution on sparse grids. Our computation-data structure decoupling allows us to quickly experiment with different data arrangements, and to develop high-performance data structures tailored for specific computational tasks. With 1/10 th as many lines of code, we achieve 4.55× higher performance on average, compared to hand-optimized reference implementations.

Summary

Introduces a data-oriented language that separates computation from sparse data layout and compiles both into efficient CPU and GPU kernels for simulation, rendering, and vision.

Tags

Similar Papers

3
60%

Theano: A Python Framework for Fast Computation of Mathematical Expressions

Theano

('Rami Al-Rfou', 'Guillaume Alain', 'Amjad Almahairi', 'Christof Angermueller', 'Dzmitry Bahdanau', 'Nicolas Ballas', 'Frederic Bastien', 'Justin Bayer', 'Anatoly Belikov', 'Alexander Belopolsky', 'Yoshua Bengio', 'Arnaud Bergeron', 'James Bergstra', 'Valentin Bisson', 'Josh Bleecher Snyder', 'Nicolas Bouchard', 'Nicolas Boulanger-Lewandowski', 'Xavier Bouthillier', 'Alexandre de Brebisson', 'Olivier Breuleux', 'Pierre-Luc Carrier', 'Kyunghyun Cho', 'Jan Chorowski', 'Paul Christiano', 'Tim Cooijmans', 'Marc-Alexandre Cote', 'Myriam Cote', 'Aaron Courville', 'Yann N. Dauphin', 'Olivier Delalleau', 'Julien Demouth', 'Guillaume Desjardins', 'Sander Dieleman', 'Laurent Dinh', 'Melanie Ducoffe', 'Vincent Dumoulin', 'Samira Ebrahimi Kahou', 'Dumitru Erhan', 'Ziye Fan', 'Orhan Firat', 'Mathieu Germain', 'Xavier Glorot', 'Ian Goodfellow', 'Matt Graham', 'Caglar Gulcehre', 'Philippe Hamel', 'Iban Harlouchet', 'Jean-Philippe Heng', 'Balazs Hidasi', 'Sina Honari', 'Arjun Jain', 'Sebastien Jean', 'Kai Jia', 'Mikhail Korobov', 'Vivek Kulkarni', 'Alex Lamb', 'Pascal Lamblin', 'Eric Larsen', 'Cesar Laurent', 'Sean Lee', 'Simon Lefrancois', 'Simon Lemieux', 'Nicholas Leonard', 'Zhouhan Lin', 'Jesse A. Livezey', 'Cory Lorenz', 'Jeremiah Lowin', 'Qianli Ma', 'Pierre-Antoine Manzagol', 'Olivier Mastropietro', 'Robert T. McGibbon', 'Roland Memisevic', 'Bart van Merrienboer', 'Vincent Michalski', 'Mehdi Mirza', 'Alberto Orlandi', 'Christopher Pal', 'Razvan Pascanu', 'Mohammad Pezeshki', 'Colin Raffel', 'Daniel Renshaw', 'Matthew Rocklin', 'Adriana Romero', 'Markus Roth', 'Peter Sadowski', 'John Salvatier', 'Francois Savard', 'Jan Schluter', 'John Schulman', 'Gabriel Schwartz', 'Iulian Vlad Serban', 'Dmitriy Serdyuk', 'Samira Shabanian', 'Etienne Simon', 'Sigurd Spieckermann', 'S. Ramana Subramanyam', 'Jakub Sygnowski', 'Jeremie Tanguay', 'Gijs van Tulder', 'Joseph Turian', 'Sebastian Urban', 'Pascal Vincent', 'Francesco Visin', 'Harm de Vries', 'David Warde-Farley', 'Dustin J. Webb', 'Matthew Willson', 'Kelvin Xu', 'Lijun Xue', 'Li Yao', 'Saizheng Zhang', 'Ying Zhang') / 2016