Divergence Analysis with Affine Constraints - Archive ouverte HAL Accéder directement au contenu
Rapport (Rapport De Recherche) Année : 2011

Divergence Analysis with Affine Constraints

Diogo Sampaio
  • Fonction : Auteur
  • PersonId : 1126176
Rafael Martins
  • Fonction : Auteur
  • PersonId : 1126177
Caroline Collange
Fernando Magno
  • Fonction : Auteur
  • PersonId : 995420
Quintão Pereira
  • Fonction : Auteur

Résumé

The rise of graphics processing units in high-performance computing is bringing renewed interest in code optimization techniques that target SIMD processors. Many of these optimizations rely on divergence analyses, which classify variables as uniform, if they have the same value on every thread, or divergent, if they might not. This paper introduces a new kind of divergence analysis, that is able to represent variables as affine functions of thread identifiers. We have implemented our divergence analysis with affine constraints on top of Ocelot, an open source compiler, and use it to analyze a suite of 177 CUDA kernels from well-known benchmarks. These experiments show that our algorithm reports 4% less divergent variables than the previous state-of-the-art algorithm of Coutinho et al. Furthermore, we can mark about one fourth of all divergent variables as affine functions of thread identifiers. In addition to the novel divergence analysis, we also introduce the notion of a divergence aware register allocator. This allocator uses information from our analysis to either rematerialize affine variables, or to move uniform variables to shared memory. As a testimony of its effectiveness, our divergence aware allocator produces GPU code that is 29.70% faster than the code produced by Ocelot's register allocator.
Fichier principal
Vignette du fichier
Sampaio_DivergenceAnalysisAffine_SBAC12.pdf (372.08 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-00650235 , version 1 (09-12-2011)

Identifiants

  • HAL Id : hal-00650235 , version 1

Citer

Diogo Sampaio, Rafael Martins, Fernando Magno Quintão Pereira, Caroline Collange, Fernando Magno, et al.. Divergence Analysis with Affine Constraints. [Research Report] ENS Lyon. 2011. ⟨hal-00650235⟩
688 Consultations
534 Téléchargements

Partager

Gmail Facebook X LinkedIn More