Abstract
We present a shape inference analysis for a purely-functional language, named Futhark, that supports nested parallelism via array combinators such as map, reduce, filter, and scan. Our approach is to infer code for computing precise shape information at run-time, which in the most common cases can be effectively optimized by standard compiler optimizations. Instead of restricting the language or sacrificing ease of use, the language allows the occasional shape-dynamic, and even shape-misbehaving, constructs. Inherently shape-dynamic code is treated with a fall-back technique that preserves, asymptotically, the number of operations of the program and that computes and returns the array's shape alongside with its value. This approach leads to a shape-dependent system with existentially-quantified types, where static shape inference corresponds to eliminating existential quantifications from the types of program expressions. We optimize the common case to negligible overhead via size slicing: a technique that separates the computation of the array's shape from its values. This allows the shape to be calculated in advance and to be used to instantiate the previously existentiallyquantified shapes of the value slice. We report negligible overhead, on several mini-benchmarks and three real-world applications. Copyright is held by the owner/author(s).
Originalsprog | Engelsk |
---|---|
Titel | Proceedings of the 3rd ACM SIGPLAN workshop on Functional High-Performance Computing |
Antal sider | 12 |
Forlag | Association for Computing Machinery |
Publikationsdato | 3 sep. 2014 |
Sider | 31-42 |
ISBN (Elektronisk) | 978-1-4503-3040-4 |
DOI | |
Status | Udgivet - 3 sep. 2014 |
Begivenhed | ACM-SIGPLAN Workshop on Functional High-Performance Computing (FHPC) 2014 - Guthenburg, Sverige Varighed: 1 sep. 2014 → … Konferencens nummer: 3 |
Konference
Konference | ACM-SIGPLAN Workshop on Functional High-Performance Computing (FHPC) 2014 |
---|---|
Nummer | 3 |
Land/Område | Sverige |
By | Guthenburg |
Periode | 01/09/2014 → … |