A Dynamic to Static DSL Compiler for Image Processing Applications

Abstract : High-level interpreted programming languages, such as Python, are widely used because of their concise syntax and dynamic type system, which allow programmers to efficiently develop applications. However, they cannot offer the same guarantees provided by lower-level languages such as C in terms of portability on embedded systems. Is it possible for dynamic applications to benefit from lower-level compilation toolchain in order to increase their portability onto specialized hardware targets? We present in this paper (1) a methodology to convert a dynamic Domain-Specific Language (DSL) into a static one that preserves programmability, (2) a working implementation that takes care of types, memory allocation, polymorphism and API adaptation between the two DSLs, (3) and experimental results on portability and performance that show the efficiency of our approach. We illustrate our methodology with two image processing libraries: SMIL and FREIA. The SMIL library is a C++ image processing library offering ease of programming with a Python wrapper. However, SMIL applications also have to be executed on embedded platforms such as FPGAs on which a Python interpreter is not available. The generic answer to such an issue is to re-code the original Python applications in C or C++, which will be then optimized for every hardware target, or to try to compile Python into native code using tools such as Cython. The approach we suggest here is to ease portability of applications written in a DSL embedded in C (the FREIA API) by using specific optimizations such as image expressions evaluation, removal of temporary variables or image tiling.
Liste complète des métadonnées

Littérature citée [30 références]  Voir  Masquer  Télécharger

https://hal-mines-paristech.archives-ouvertes.fr/hal-01665055
Contributeur : Claire Medrala <>
Soumis le : vendredi 12 janvier 2018 - 14:32:57
Dernière modification le : lundi 12 novembre 2018 - 10:58:06
Document(s) archivé(s) le : vendredi 13 avril 2018 - 16:00:36

Fichier

A-670.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01665055, version 1

Citation

Pierre Guillou, Benoît Pin, Fabien Coelho, François Irigoin. A Dynamic to Static DSL Compiler for Image Processing Applications. 2017. ⟨hal-01665055⟩

Partager

Métriques

Consultations de la notice

247

Téléchargements de fichiers

115