CAL++ v. 0.8 release

Discussion created by hazeman on Feb 22, 2010
Latest reply on Mar 4, 2010 by hazeman
C++ to IL generator/compiler with C++ bindings for CAL

The CAL++ library has been just released. Project homepage is located here http://sourceforge.net/projects/calpp/ .

The project consist of two main components. One is C++ binding for CAL ( it's really much easier to develop new CAL applications using bindings ) and second is C++ to IL generator/compiler.

The C++ generator/compiler has syntax very similar to OpenCL ( with few necessary exceptions ). Also it supports all devices which can run CAL kernels ( finally OpenCL like language for 3xxx ).

It has some advantages over OpenCL compiler. To name few

- it's much closer to CAL - it allows to write code which is almost as good ( or as good ) as handwritten IL. Look at the matrix multiplication example - it has almost the same ISA as prunedtree original code ( it differs only where I've added some changes ).

- Advantage of using C++. I really wouldn't like to use double-double ( or quad float ) technique without C++.

- Powerfull control over loop unroling and code selection ( at IL compilation time ). The C++ language acts like preprocesor.

- It has LDS support for 4xxx, doubles, etc. And if something is missing it can be added really easy.

But as always there are some pitfalls to this approach

- it isn't OpenCL . Having standard is always usefull.

- Only partial support for structs ( it can be much improved but never as good as OpenCL ).

- CAL++ is much closer to IL and some more knowledge about IL is required to achive full potential ( hmmm I think this is also the case with OpenCL ).

- optimization is only performed by CAL IL compiler ( which isn't that good ).

With the library there are some examples included. I think the fastest matrix multiplication might be a small gem here .

I hope that CAL++ will be usefull to someone .