FSCL – Compiling F# to OpenCL for High-Performance over Multi-core and Many-core devices


My friend Antonio Cisternino recently pointed me to FSCL – a compiler from F# to OpenCL.

Here is the abstract from the documentation for the compiler: https://t.co/vHQPzsxE0O. The project currently seems to live here: https://github.com/GabrieleCocco/

Nowadays, OpenCL is one of the most popular programming frameworks for high-performance computing over multicore and many-core devices. Thanks to OpenCL,different parallel architectures coming from an heterogeneous set of brands and companies can be programmed in an homogeneous, standard way. Nevertheless, OpenCL lacks of some aspects and facilities characterizing high-level parallel programming frameworks and, more generally, high-level languages, which makes parallel programming still difficult, error-prone and hardly portable. In the last few years there have been many activities toward raising abstraction over OpenCL, introducing facilities to write parallel code and enhancing portability of features and performances. In this document we present FSCL, an F# to OpenCL open compiler aimed at raising abstraction over OpenCL programming allowing programmers to express OpenCL kernels inside F# with all the benefits of integrated development, code completion and error reporting. Moreover, working over a Virtual Machine (VM) allows to automatize most of the effort. OpenCL programmers must spend in coding the host-side part of parallel computations, which means creating context, devices, buffers and coordinating the execution of the computation on the device.

 

I believe the project will also be able to make good use of the improved debugging information in F# quotations we’re introducing in F# 3.1.

 

Cheers

Don

 

 

Comments (5)

  1. Dmitri says:

    I remember a product for .Net to PTX conversion a while back, but I think it never took off.

  2. Antonio says:

    Yep, it was IL2PTX, but it was not that easy to maintain and once the author got his PhD the project stopped (also because it was missing the Brooks/CAL driver). FSCL sort of spawned from that early work but took a completely different approach by compiling F# quotations into OpenCL. It is much more usable (and debuggable) 🙂

  3. Alberto Fabiano says:

    Há algum projeto similar para many core com o Xeon Phi?

    Thanks.

  4. Gabriele Cocco says:

    Alberto, I'm the developer of FSCL. There are a plenty of news in the framework, which is becoming quite stable and rich of functionalities (F# collection to OpenCL compilation, metadata to drive buffer allocation and initialisation and more).

    As long as an architecture/device agrees to the OpenCL specification, FSCL supports it. The problem of the Xeon Phi, on which I'm currently working, is that is not supporting Mono (someone is trying to do a porting) yet, so the only solution I can think of by now is to run FSCL elsewhere and deploy the generated opencl kernel on the xeon phi from remote.

  5. James says:

    I ama beginner to F# and wan to learn more about FSCL. Where can I download the dll so i can use it in VS2013?