Live data from Hacker News

Chlorine: Dead Simple GPGPU

github.com

1–10 of 13 posts

Re: Chlorine: Dead Simple GPGPU

#5
I haven't used OpenCL before. This library seemed sort of reasonable but I had some questions about whether it was really that much better than the native OpenCL API. So I found an OpenCL "hello world" program here: http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-r...

Holy crap. The "kernel" code is basically the same, but the native API setup code (which that tutorial even calls "boiler plate") is insane, starting with the fact that the source code for the CL on-device program has to be passed as a string. There is no API to pass a filename--only a string containing the entire program source!

Re: Chlorine: Dead Simple GPGPU

#7
post #5

I haven't used OpenCL before. This library seemed sort of reasonable but I had some questions about whether it was really that much better than the native OpenCL API. So I found an OpenCL "hello world" program here: http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-r... Holy crap. The "kernel" code is basically the same, but the native API setup code (which that tutorial even calls "boiler plate") is insane,…

"There is no API to pass a filename"

Use:

convertToString(filename, sourceStr);

and pass sourceStr.

You are right about how much boilerplate there is - though you can hide it a bit with helper fns and a few macros.

Re: Chlorine: Dead Simple GPGPU

#8
post #5

I haven't used OpenCL before. This library seemed sort of reasonable but I had some questions about whether it was really that much better than the native OpenCL API. So I found an OpenCL "hello world" program here: http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-r... Holy crap. The "kernel" code is basically the same, but the native API setup code (which that tutorial even calls "boiler plate") is insane,…

OpenCL bootstrap sure is complex, but there are many possible configurations. I think this library is too simple right now. As soon as you need to optimize host code, you need to rewrite it with default API. On the other hand, I'd love to use this, if there were more options available.

Re: Chlorine: Dead Simple GPGPU

#9
post #8
post #5

I haven't used OpenCL before. This library seemed sort of reasonable but I had some questions about whether it was really that much better than the native OpenCL API. So I found an OpenCL "hello world" program here: http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-r... Holy crap. The "kernel" code is basically the same, but the native API setup code (which that tutorial even calls "boiler plate") is insane,…

OpenCL bootstrap sure is complex, but there are many possible configurations. I think this library is too simple right now. As soon as you need to optimize host code, you need to rewrite it with default API. On the other hand, I'd love to use this, if there were more options available.

The idea is to be super simple and easy to pick up. I'd rather spend my day to day time working on interesting problems, rather than slapping together boilerplate. Hence, my goal is to make it very easy to get started. When you need the performance, you can always reach for the C++ or C API.

>I'd love to use this, if there were more options available.

Did you have anything specific in mind? I'd be happy to add features.

Post reply on HN