

Certains d’entre-eux sont définis afin d’assurer la légalité du portage, tandis que d’autres sont utilisés pour améliorer les temps d’exécution sur cette architecture. Cette méthodologie est guidée par un ensemble de critères de transformations de programme. Dans le cadre de cette thèse, nous avons développé une méthodologie permettant de porter des algorithmes sur GPU.
#CUDA DIM3 CONSTRUCTOR CODE#
Ainsi, les transformations de code visant à placer un algorithme sur GPU tout en optimisant l’exploitation des capacités de ce dernier, ne sont pas des opérations triviales. Cependant, le fait qu’un accélérateur tel que le GPU prenne place dans une architecture globale hétérogène, ou encore ait de multiples niveaux hiérarchiques, complexifient sa mise en œuvre.

L’enjeu est alors de trouver une solution présentant une consommation énergétique modérée, une puissance calculatoire soutenue et une bande passante élevée pour l’acheminement des données.Le GPU est une architecture adaptée pour ce genre de tâches notamment grâce à sa conception basée sur le parallélisme massif. Dans le cadre de l’embarqué, les mêmes algorithmes ont fréquemment pour contrainte supplémentaire de devoir supporter le temps réel. Finally we conclude and present the main directions for future work.ĭans le secteur industriel, la course à l’amélioration des définitions des capteurs vidéos se répercute directement dans le domaine du traitement d’images par une augmentation des quantités de données à traiter. The main part of our paper details our approach to transform an OpenMP annotated code into a fully human readable CUDA C compliant code.

Further on, we compare some major approaches that allow us to generate GPU-enabled code from a standard code. We start by briefly introducing the OpenMP programming paradigm and the CUDA programming framework with their particularities. The structure of the paper is the following. Having a user-friendly code in the end allows the developer to further analyze and tweak the application as needed. We wanted the entire process to be as transparent as possible and the generated code to be in a human readable format.

Following the same idea we present in this paper a source- to-source compiler capable of transforming an OpenMP anno- tated code into a fully compatible CUDA C application. With this aspect in mind several solutions, both open- source and commercial, emerged in the ecosystem with the aim to allow porting legacy applications to GPU-enabled systems with a minimal effort. Index Terms-compiler, code transformation, CUDA, OpenMP older than GPU computing and billions of lines of legacy code are using older parallel programming models like OpenMP or MPI. In this paper we present the entire transformation process, starting from the pragma split-up and kernel generation, passing through the data visibility clauses management and ending with the device memory management and kernel launch system. The generated code is fully NVIDIA CUDA compliant and can be compiled using the nvcc compiler. Using the OMPi compiler as a base ground, we implemented the "pragma omp parallel for" transformation along with data visibility clauses. Thus we propose a source-to-source compiler able to automatically transform an OpenMP C code into a CUDA code, while maintaining a human readable version of the code that can be further analyzed or optimized. Our goal was to allow developers to benefit from the simplicity of OpenMP code and at the same time permitting their code to be executed on GPUs manycore architectures. However a large amount of code benefits from the multicore architectures using either a shared memory model or a distributed model. Although their programmability has greatly improved and different tools have been developed to smooth down their learning curve, porting legacy code to the new programming models could reveal itself a cumbersome and time-consuming process.
#CUDA DIM3 CONSTRUCTOR FULL#
In recent years hardware accelerators have become a full part of the HPC domain as their peak performance has increased steadily.
