2 research outputs found
Search-based Model-driven Loop Optimizations for Tensor Contractions
Complex tensor contraction expressions arise in accurate electronic structure models in quantum chemistry, such as the coupled cluster method. The Tensor Contraction Engine (TCE) is a high-level program synthesis system that facilitates the generation of high-performance parallel programs from tensor contraction equations. We are developing a new software infrastructure for the TCE that is designed to allow experimentation with optimization algorithms for modern computing platforms, including for heterogeneous architectures employing general-purpose graphics processing units (GPGPUs). In this dissertation, we present improvements and extensions to the loop fusion optimization algorithm, which can be used with cost models, e.g., for minimizing memory usage or for minimizing data movement costs under a memory constraint. We show that our data structure and pruning improvements to the loop fusion algorithm result in significant performance improvements that enable complex cost models being use for large input equations. We also present an algorithm for optimizing the fused loop structure of handwritten code. It determines the regions in handwritten code that are safe to be optimized and then runs the loop fusion algorithm on the dependency graph of the code. Finally, we develop an optimization framework for generating GPGPU code consisting of loop fusion optimization with a novel cost model, tiling optimization, and layout optimization. Depending on the memory available on the GPGPU and the sizes of the tensors, our framework decides which processor (CPU or GPGPU) should perform an operation and where the result should be moved. We present extensive measurements for tuning the loop fusion algorithm, for validating our optimization framework, and for measuring the performance characteristics of GPGPUs. Our measurements demonstrate that our optimization framework outperforms existing general-purpose optimization approaches both on multi-core CPUs and on GPGPUs
Transitive Closures of Affine Integer Tuple Relations and their Overapproximations
The set of paths in a graph is an important concept with many applications in system analysis. In the context of integer tuple relations, which can be used to represent possibly infinite graphs, this set corresponds to the transitive closure of the relation. Relations described using only affine constraints and projection are fairly efficient to use in practice and capture Presburger arithmetic. Unfortunately, the transitive closure of such a quasi-affine relation may not be quasi-affine and so there is a need for approximations. In particular, most applications in system analysis require overapproximations. Previous work has mostly focused either on underapproximations or special cases of affine relations. We present a novel algorithm for computing overapproximations of transitive closures for the general case of quasi-affine relations (convex or not). Experiments on non-trivial relations from real-world applications show our algorithm to be on average more accurate and faster than the best known alternatives.L'ensemble des chemins dans un graphe joue un rôle important pour de nombreuses applications dans le domaine de l'analyse des systèmes. Dans le cas des relations entre tuples d'entiers, lesquelles permettent de représenter des graphes potentiellement infinis, cet ensemble correspond à la clôture transitive de la relation. Lorsque ces relations sont décrites uniquement à l'aide de contraintes affines et de projections, elles ont la puissance d'expression de l'arithmétique de Presburger, et elles donnent lieu à des algorithmes relativement efficaces en pratique. Malheureusement, la clôture transitive d'une telle relation quasi-affine n'est pas forcément quasi-affine, impliquant le recours à des approximations. En particulier, la plupart des applications à l'analyse des systèmes requiert des sur-approximations. Les résultats antérieurs se concentrent soit sur des sous-approximations soit sur des cas particuliers de relations affines. Nous proposons un nouvel algorithme pour le calcul de sur-approximations de clôtures transitives, dans le cas général des relations quasi-affines (convexes ou non). Nos résultats expérimentaux portent sur des relations non-triviales issues d'applications réelles, et démontrent que notre algorithme est plus précis et plus rapide en moyenne que les meilleures alternatives connues