From High-Level Inference Algorithms to Efficient Code

被引:4
|
作者
Walia, Rajan [1 ]
Narayanan, Praveen [1 ]
Carette, Jacques [2 ]
Tobin-Hochstadt, Sam [1 ]
Shan, Chung-chieh [1 ]
机构
[1] Indiana Univ, Dept Comp Sci, Bloomington, IN 47405 USA
[2] McMaster Univ, Dept Comp & Software, Hamilton, ON, Canada
关键词
probabilistic programs; arrays; plates; multidimensional distributions; marginalization; conjugacy; map-reduce; loop optimization; collapsed Gibbs sampling; GIBBS SAMPLER; MODELS;
D O I
10.1145/3341702
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Probabilistic programming languages are valuable because they allow domain experts to express probabilistic models and inference algorithms without worrying about irrelevant details. However, for decades there remained an important and popular class of probabilistic inference algorithms whose efficient implementation required manual low-level coding that is tedious and error-prone. They are algorithms whose idiomatic expression requires random array variables that are latent or whose likelihood is conjugate. Although that is how practitioners communicate and compose these algorithms on paper, executing such expressions requires eliminating the latent variables and recognizing the conjugacy by symbolic mathematics. Moreover, matching the performance of handwritten code requires speeding up loops by more than a constant factor. We show how probabilistic programs that directly and concisely express these desired inference algorithms can be compiled while maintaining efficiency. We introduce new transformations that turn high-level probabilistic programs with arrays into pure loop code. We then make great use of domain-specific invariants and norms to optimize the code, and to specialize and JIT-compile the code per execution. The resulting performance is competitive with manual implementations.
引用
收藏
页数:30
相关论文
共 50 条
  • [1] Recovery of high-level intermediate representations of algorithms from binary code
    Bugerya, Alexander Borisovich
    Kulagin, Ivan Ivanovich
    Padaryan, Vartan Andronikovich
    Solovev, Mikhail Aleksandrovich
    Tikhonov, Andrei Yur'evich
    [J]. 2019 IVANNIKOV MEMORIAL WORKSHOP (IVMEM 2019), 2019, : 57 - 63
  • [2] Efficient Memory Arbitration in High-Level Synthesis From Multi-Threaded Code
    Cheng, Jianyi
    Fleming, Shane T.
    Chen, Yu Ting
    Anderson, Jason
    Wickerson, John
    Constantinides, George A.
    [J]. IEEE TRANSACTIONS ON COMPUTERS, 2022, 71 (04) : 933 - 946
  • [3] From High-Level Specification to High-Performance Code
    Franchetti, Franz
    Moura, Jose M. F.
    Padua, David A.
    Dongarra, Jack
    [J]. PROCEEDINGS OF THE IEEE, 2018, 106 (11) : 1875 - 1878
  • [4] ALGORITHMS FOR HIGH-LEVEL SYNTHESIS
    PAULIN, PG
    KNIGHT, JP
    [J]. IEEE DESIGN & TEST OF COMPUTERS, 1989, 6 (06): : 18 - 31
  • [5] Automated generation of marshaling code from high-level specifications
    Weigert, T
    Dietz, P
    [J]. SDL 2003: SYSTEM DESIGN, PROCEEDINGS, 2003, 2708 : 374 - 386
  • [6] Corento - SIMD Parallelism from Portable High-Level Code
    Helovuo, Juhana
    Niittylahti, Jarkko
    Berg, Heikki
    [J]. APPLICATIONS, TOOLS AND TECHNIQUES ON THE ROAD TO EXASCALE COMPUTING, 2012, 22 : 271 - 280
  • [7] Efficient Behavioral Intellectual Properties Source Code Obfuscation for High-Level Synthesis
    Veeranna, Nandeesha
    Schafer, Benjamin Carrion
    [J]. 2017 18TH IEEE LATIN AMERICAN TEST SYMPOSIUM (LATS 2017), 2017,
  • [8] From High-Level Task Descriptions to Executable Robot Code
    Stenmark, Maj
    Malec, Jacek
    Stolt, Andreas
    [J]. INTELLIGENT SYSTEMS'2014, VOL 2: TOOLS, ARCHITECTURES, SYSTEMS, APPLICATIONS, 2015, 323 : 189 - 202
  • [9] Separation Logic-Assisted Code Transformations for Efficient High-Level Synthesis
    Winterstein, Felix
    Bayliss, Samuel
    Constantinides, George A.
    [J]. 2014 IEEE 22ND ANNUAL INTERNATIONAL SYMPOSIUM ON FIELD-PROGRAMMABLE CUSTOM COMPUTING MACHINES (FCCM 2014), 2014, : 1 - 8
  • [10] Algorithms for the ATLAS high-level trigger
    Armstrong, S
    Baines, JT
    Bee, CP
    Biglietti, M
    Bogaerts, A
    Boisvert, V
    Bosman, M
    Brandt, S
    Caron, B
    Casado, P
    Cataldi, G
    Cavalli, D
    Cervetto, M
    Comune, G
    Corso-Radu, A
    Di Mattia, A
    Gomez, MD
    dos Anjos, A
    Drohan, J
    Ellis, N
    Elsing, M
    Epp, B
    Etienne, F
    Falciano, S
    Farilla, A
    George, S
    Ghete, V
    González, S
    Grothe, A
    Kaczmarska, A
    Karr, K
    Khomich, A
    Konstantinidis, N
    Krasny, W
    Li, W
    Lowe, A
    Luminari, L
    Meessen, C
    Mello, AG
    Merino, G
    Morettini, P
    Moyse, E
    Nairz, A
    Negri, A
    Nikitin, N
    Nisati, A
    Padilla, C
    Parodi, F
    Perez-Reale, V
    Pinfold, JL
    [J]. IEEE TRANSACTIONS ON NUCLEAR SCIENCE, 2004, 51 (03) : 367 - 374