thesis

Automated tuning and code generation system for scientific computing

Defense date:

Jan. 1, 2005

Edit

Disciplines:

Directors:

Abstract EN:

Des interactions complexes entre les mécanismes matériels et les comportements des logiciels à l'exécution rendent la tâche des compilateurs difficile pour obtenir de hautes performances, indépendamment du contexte ou de paramètres micro-architecturaux. Dans le cas du calcul scientifique, nombreux sont les codes organisés autour de fonctions standardisées afin d'utiliser des bibliothèques. Ces dernières peuvent être optimisées, de façon manuelle ou automatiquement mais que pour un seul ensemble de noyaux prédéfinis. La performance est alors obtenue au détriment de la flexibilité. Cette thèse défend une approche empirique de l'optimisation automatique de boucles vectorielles. Nous détaillons l'infrastructure d'un système automatique prenant place après des transformations de code haut-niveau et remplaçant la génération de code bas niveau des compilateurs parfois défaillante. Notre processus d'optimisation repose sur une décomposition des boucles vectorielles en des motifs de code organisés de façon hiérarchique dont les performances sont systématiquement évaluées et permettent de déduire des techniques d'optimisation servant à en générer des versions optimisées. Celles ci sont alors stockées dans une base de donnée. Il n'y a pas de limitation au nombre de noyaux à optimisés, et ne repose pas sur la génération de code bas niveau des compilateurs. Ce système appliqué sur plate-formes à base d'Alpha 21264, Power 4 et Itanium 2 a permis de révéler des performances complexes. Des optimisations ont néanmoins été déduites et appliquées sur des codes réels, améliorant les performances de 20% à 100% selon le code considéré

Abstract FR:

Due to complex interactions between hardware mechanisms and software dynamic behaviours, achieving high performance independently from runtime or micro-architectural parameters is an extremely difficult task. As a solution, many scientific code sections are organized around optimized stand alone libraries that are either hand tuned or generated by an automatic tuning system targeting a single set of pre-defined codes. Performance is achieved at the cost of versatility. This thesis advocates an empirical approach for the automatic tuning of vector loops in most scientific applications. We detail the framework of an automated system taking place after high-level code transformation that resolves compiler code generation issues, and achieves high performance independently of many run-time parameters. Thus, it combines the high performance of libraries with the functionalities of compilers. The optimization process relies on the decomposition of critical vector loops into hierarchically organized code patterns. A systematic micro-benchmarking step is performed allowing to deduce optimizations techniques used to generate a new optimized vector loop stored in a database. Then, it is limited neither by the number of kernels nor to relying on a standardization of kernel calls and it avoids weak compiler low-level code generation. This framework was applied to the Alpha 21264, Power 4 and Itanium 2 processors and revealed performance behaviours due to complex interactions between hardware and software. Optimization techniques were deduced, applied to real-life codes and benchmarks and improved performance between 20% and 100% depending on the optimized code section.