
C# OpenCL bindings ready for testing
Posted Tuesday, 11 August, 2009 - 20:22 by the FiddlerUpdate: current efforts are focused on Cloo (object-oriented CL wrapper), which can be found here. It provides a much cleaner OpenCL API compared to raw bindings (which are also available in case you need them).
The generator now supports generating C# OpenCL wrappers from the C headers. The OpenCL wrappers reside under the OpenTK.Compute.CL10 namespace of SVN trunk. An OpenCL sample has also been added to Examples.exe: if you have access to an OpenCL implementation, please run the VectorAdd sample and report your results here.
AMD has released a public beta of its OpenCL implementation that you can download from AMD's developer website (free registration needed). This implementation runs on all SSE3-capable CPUs and is available for Window and Linux platforms.
There is a lot of fine-tuning left to do for OpenTK's OpenCL wrappers and the sooner you test the bindings, the sooner they will become ready for release.


Comments
Re: C# OpenCL bindings ready for testing
I have made a report. I hope it is OK and informative. I get some memory error.
Will OpenCL get a nice OOP wrapper anytime soon?
Re: C# OpenCL bindings ready for testing
Thanks, I believe this error has been fixed in SVN and 0.9.9-3, but I cannot test right now.
Nythrix is working on an OOP wrapper and there's OpenCL.Net, but I don't know the current status of either project. Right now, we are focusing on core OpenTK and the GL & ES bindings and we'll work OpenTK.Compute.
Of course help is welcome:
Every little bit helps!
Re: C# OpenCL bindings ready for testing
The name mangling issue has been reported as fixed in AMD Stream 2.0 beta 4. Can someone please test and confirm whether VectorAdd works now?
Re: C# OpenCL bindings ready for testing
Well, I've tested it and it does not throw any exceptions for me. But the result I get is
0+0=0
0+0=0
0+0=0
0+0=0
0+0=0
0+0=0
...
To be honest I haven't checked what this example should do. I was only interested if the bindings work.
Re: C# OpenCL bindings ready for testing
Thanks, the important fact is that it doesn't crash anymore!
The 0 + 0 = 0 issue is a bug, I'll fix that.
Re: C# OpenCL bindings ready for testing
Hi,
the following line from the "vectorAdd" example returns an error 'OpenTK.Compute.CL10.ErrorCode.InvalidKernelName':
resulting in hKernel staying 0 so nothing gets ever called. That is why the result is still all 0.
I am using the ATi Beta 4 together with a HD 5770 using VS 2008.
Regards,
Bernd Krekeler.
Re: C# OpenCL bindings ready for testing
The 0+0=0 issue was unintended (simply forgot to initialize the arrays). Fixed now.
Still haven't been able to test on Ati Stream, due to #1299: [Compute] Ati Stream SDK 2.0 beta 4 causes DllNotFoundException.
Re: C# OpenCL bindings ready for testing
Hi,
I have a computer with :
- an Intel CPU
- an Intel Graphic Card
So, my question is... if I write an application based on OpenCL... will it work to on machines that doesn't support OpenCL ?
or I must write another version of my soft ?
Thanks
Re: C# OpenCL bindings ready for testing
I think, Intel does not provide OpenCL drivers, yet. You cannot run such an application without them.
Re: C# OpenCL bindings ready for testing
You can use Ati's Stream SDK (free registration required). It requires SSE3 (any Core 2 or newer will do), but otherwise runs on Intel CPUs just fine.