Switch from CUDA to OpenCL easily with Swan

Are you a fan of NVidia’s CUDA, but know that you should be using OpenCL instead?  Nobody enjoys porting code between languages, and porting GPU code can be especially nasty.  A new open-source tool called ‘Swan’ aims to make it easier via a completely automated onversion.

Swan is a small tool that aids the reversible conversion of existing CUDA codebases to OpenCL. It does several useful things:

  • Translates CUDA kernel source-code to OpenCL.
  • Provides a common API that abstracts both CUDA and OpenCL runtimes.
  • Preserves the convenience of the CUDA <<< grid, block >>> kernel launch syntax by generating C source-code for kernel entry-point functions.

It’s GPL licensed and completely command-line driven, so it should be relatively simple to integrate it into your build procedure as an alternative to NVidia-centric CUDA.

You may also want to consider reading this article from Douglas Eadline in Linux Magazine which discusses the importance of OpenCL as a more cross-platform tool for HPC computing.

via swan – Multiscale Laboratory.

PG

This story written by Randall Hand

Randall Hand is a visualization scientist working for a federal research lab, aiding researchers to discover the insights buried within their terabyte datasets generated on some of the most powerful supercomputers in the world. He also runs VizWorld.com .

Science , , , ,

  • http://www.ugg-21cn.com swan

    This look is my favorite so far. Beautiful!!

  • http://www.cheapghdoutlet.com/ skyblue

    Comment Submission Error

    Your comment submission failed for the following reasons:

    Please enter the correct letter for anti-spam verification

    Return to the original entry

  • http://www.cheapghdoutlet.com/ skyblue

    Thanks for share…

VizWorld.com is a production of VizWorld, LLC © 2009