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

被引:230
作者
Hu, Yuanming [1 ]
Li, Tzu-Mao [1 ,2 ]
Anderson, Luke [1 ]
Ragan-Kelley, Jonathan [2 ]
Durand, Fredo [1 ]
机构
[1] MIT CSAIL, Cambridge, MA 02139 USA
[2] Univ Calif Berkeley, Berkeley, CA USA
来源
ACM TRANSACTIONS ON GRAPHICS | 2019年 / 38卷 / 06期
关键词
Sparse Data Structures; GPU Computing; ALGORITHMS;
D O I
10.1145/3355089.3356506
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.55x higher performance on average, compared to hand-optimized reference implementations.
引用
收藏
页数:16
相关论文
共 50 条
[1]  
Acton Mike, 2014, Data-oriented design and c++. Luento
[2]   Efficient gradient-domain compositing using quadtrees [J].
Agarwala, Aseem .
ACM TRANSACTIONS ON GRAPHICS, 2007, 26 (03)
[3]  
[Anonymous], 2018, ACM T GRAPH SIGGRAPH
[4]  
[Anonymous], THESIS
[5]  
Baghdadi R, 2019, INT SYM CODE GENER, P193, DOI [10.1109/CGO.2019.8661197, 10.5281/zenodo.2375075]
[6]   PENCIL: A Platform-Neutral Compute Intermediate Language for Accelerator Programming [J].
Baghdadi, Riyadh ;
Beaugnon, Ulysse ;
Cohen, Albert ;
Grosser, Tobias ;
Kruse, Michael ;
Reddy, Chandan ;
Verdoolaege, Sven ;
Absar, Javed ;
van Haastregt, Sven ;
Kravets, Alexey ;
Lokhmotov, Anton ;
Betts, Adam ;
Donaldson, Alastair F. ;
Ketema, Jeroen ;
David, Robert ;
Hajiyev, Elnar .
2015 INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURE AND COMPILATION (PACT), 2015, :138-149
[7]  
Bailey Dan, 2013, ACM SIGGRAPH 2013 TA, V15
[8]   Ebb: A DSL for Physical Simulation on CPUs and GPUs [J].
Bernstein, Gilbert Louis ;
Shah, Chinmayee ;
Lemire, Crystal ;
Devito, Zachary ;
Fisher, Matthew ;
Levis, Philip ;
Hanrahan, Pat .
ACM TRANSACTIONS ON GRAPHICS, 2016, 35 (02)
[9]   Scalable Real-time Volumetric Surface Reconstruction [J].
Chen, Jiawen ;
Bautembach, Dennis ;
Izadi, Shahram .
ACM TRANSACTIONS ON GRAPHICS, 2013, 32 (04)
[10]   Sympiler: Transforming Sparse Matrix Codes by Decoupling Symbolic Analysis [J].
Cheshmi, Kazem ;
Kamil, Shoaib ;
Strout, Michelle Mills ;
Dehnavi, Maryam Mehri .
SC'17: PROCEEDINGS OF THE INTERNATIONAL CONFERENCE FOR HIGH PERFORMANCE COMPUTING, NETWORKING, STORAGE AND ANALYSIS, 2017,