Obsidian: A Domain Specific Embedded Language for Parallel Programming of Graphics Processors

  • Joel Svensson
  • Mary Sheeran
  • Koen Claessen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5836)


We present a domain specific language, embedded in Haskell, for general purpose parallel programming on GPUs. Our intention is to explore the use of connection patterns in parallel programming. We briefly present our earlier work on hardware generation, and outline the current state of GPU architectures and programming models. Finally, we present the current status of the Obsidian project, which aims to make GPU programming easier, without relinquishing detailed control of GPU resources. Both a programming example and some details of the implementation are presented. This is a report on work in progress.


Graphic Processing Unit Shared Memory Parallel Programming Hardware Design Functional Programming 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: Hardware Design in Haskell. In: International Conference on Functional Programming, ICFP, pp. 174–184. ACM, New York (1998)Google Scholar
  2. 2.
    Blelloch, G.E.: NESL: A Nested Data-Parallel Language. Technical Report CMU-CS-95-170, CS Dept., Carnegie Mellon University (April 1995)Google Scholar
  3. 3.
    Buck, I., Foley, T., Horn, D., Sugerman, J., Fatahalian, K., Houston, M., Hanrahan, P.: Brook for GPUs: Stream computing on graphics hardware. In: SIGGRAPH (2004)Google Scholar
  4. 4.
    Chakravarty, M.M.T., Leshchinskiy, R., Jones, S.P., Keller, G., Marlow, S.: Data parallel haskell: a status report. In: DAMP 2007: Proceedings of the 2007 Workshop on Declarative Aspects of Multicore Programming, pp. 10–18. ACM Press, New York (2007)Google Scholar
  5. 5.
    Claessen, K.: Embedded Languages for Describing and Verifying Hardware. PhD thesis, Chalmers University of Technology (2001)Google Scholar
  6. 6.
    Claessen, K., Sheeran, M., Singh, S.: The design and verification of a sorter core. In: Margaria, T., Melham, T.F. (eds.) CHARME 2001. LNCS, vol. 2144, pp. 355–369. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  7. 7.
    Elliott, C.: Functional images. In: The Fun of Programming. “Cornerstones of Computing” series, Palgrave (March 2003)Google Scholar
  8. 8.
    Elliott, C.: Programming graphics processors functionally. In: Proceedings of the 2004 Haskell Workshop. ACM Press, New York (2004)Google Scholar
  9. 9.
    Elliott, C., Finne, S., de Moor, O.: Compiling embedded languages. Journal of Functional Programming 13(2) (2003)Google Scholar
  10. 10.
    Fatahalian, K., Knight, T.J., Houston, M., Erez, M., Horn, D.R., Leem, L., Park, J.Y., Ren, M., Aiken, A., Dally, W.J., Hanrahan, P.: Sequoia: Programming the memory hierarchy. In: Proceedings of the 2006 ACM/IEEE Conference on Supercomputing (2006)Google Scholar
  11. 11.
    Hinze, R.: An algebra of scans. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 186–210. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  12. 12.
    Jansen, T.C.: GPU++ An Embedded GPU Development System for General-Purpose Computations. PhD thesis, Technische Universitäat München and Forschungsinstitut caesar in Bonn (2007)Google Scholar
  13. 13.
    Jones, G., Sheeran, M.: Circuit design in Ruby. In: Staunstrup, J. (ed.) Formal Methods for VLSI Design, pp. 13–70. North-Holland, Amsterdam (1990)Google Scholar
  14. 14.
    Lee, S.: Bringing the power of gpus to haskell. Slides from Galois Tech. Talk (September 2008)Google Scholar
  15. 15.
    Lejdfors, C., Ohlsson, L.: Implementing an embedded GPU language by combining translation and generation. In: SAC 2006: Proceedings of the 2006 ACM Symposium on Applied Computing, pp. 1610–1614. ACM, New York (2006)Google Scholar
  16. 16.
    Lucas, P.: CGiS: High-Level Data-Parallel GPU Programming. PhD thesis, Saarland University, Saarbrücken (January 2008)Google Scholar
  17. 17.
    Luebke, D.: CUDA: Scalable parallel programming for high-performance scientific computing. In: 5th International Symposium on Biomedical Imaging: From Nano to Macro, ISBI 2008, pp. 836–838. IEEE, Los Alamitos (2008)CrossRefGoogle Scholar
  18. 18.
    McCool, M.D.: Data-Parallel Programming on the Cell BE and the GPU using the RapidMind Development Platform. In: GSPx Multicore Applications Conference (October 2006)Google Scholar
  19. 19.
    McCool, M.D., Qin, Z., Popa, T.S.: Shader Metaprogramming. In: SIGGRAPH/Eurographics Graphics Hardware Workshop (September 2002)Google Scholar
  20. 20.
    Owens, J.D., Houston, M., Luebke, D., Green, S., Stone, J.E., Phillips, J.C.: GPU Computing. Proceedings of the IEEE 96(5), 879–899 (2008)CrossRefGoogle Scholar
  21. 21.
    Püschel, M., Moura, J.M.F., Johnson, J., Padua, D., Veloso, M., Singer, B., Xiong, J., Franchetti, F., Gacic, A., Voronenko, Y., Chen, K., Johnson, R.W., Rizzolo, N.: SPIRAL: Code Generation for DSP Transforms. Proceedings of the IEEE special issue on Program Generation, Optimization, and Adaptation V93(2), 232–275 (2005)Google Scholar
  22. 22.
    Seiler, L., Carmean, D., Sprangle, T., Forsyth, D., Abrash, M., Dubey, P., Junkins, S., Lake, A., Sugerman, J., Cavin, R., Espasa, R., Grochowski, E., Juan, T., Hanrahan, P.: Larrabee: A Many-Core x86 Architecture for Visual Computing. ACM Transactions on Graphics (2008)Google Scholar
  23. 23.
    Sheeran, M.: muFP, A Language for VLSI Design. In: LISP and Functional Programming, pp. 104–112. ACM, New York (1984)Google Scholar
  24. 24.
    Sheeran, M.: Hardware design and functional programming: a perfect match. Journal of Universal Computer Science 11(7), 1135–1158 (2005)Google Scholar
  25. 25.
    Svensson, J.: An embedded language for data-parallel programming. Master’s thesis, Göteborg University (2008),
  26. 26.
    Taha, W.: A gentle introduction to multi-stage programming. In: Lengauer, C., Batory, D., Blum, A., Vetta, A. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 30–50. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  27. 27.
    Tarditi, D., Puri, S., Oglesby, J.: Accelerator: Using Data Parallelism to Program GPUs for General-Purpose Uses. In: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Joel Svensson
    • 1
  • Mary Sheeran
    • 1
  • Koen Claessen
    • 1
  1. 1.Chalmers University of TechnologyGöteborgSweden

Personalised recommendations