Polytonic/Chlorine

Is it possible to not copy back the arrays to host automatically?

Closed this issue · 4 comments

I'd like to perform multiple kernel operations, so I'd like to know if it is possible to maintain the data on gpu while I still have kernels using them.

Thanks for the api, it's awasome!

Hiya! Glad you found this useful!

So the short version: yes, it's possible to do what you're asking with the regular OpenCL API. No, I probably won't add support for this for ... reasons.

The longer version: OpenCL (especially 1.2) is pretty ancient by now, almost a decade old! I keep Chlorine for posterity mostly, but it's unlikely that I'll add support for it compared to writing a new(er) library backed by say, Vulkan instead.

The longest version: the original intent of this project was to avoid having to write the copy/copy-back patterns constantly, so while it's not "antithetical" to "add" this per se, if you're at that level of performance tuning, it's likely you would benefit from implementing the actual OpenCL API methods directly, or better yet, move to Vulkan/CUDA.

Wow, thx for the answer. I understand completely. I used to code in CUDA, but since I am forced to run it in a server since I do not have a nvidia gpu here, I've been looking for other options.
You mentioned Vulkan a few times, do you have any tips on using it for GPGPU? I work with scientific programming and I very interested on the subject. I actually found this, which is a library just for that that uses vulkan as a backend. However, I do find it still overly complicated, so I looking for more straightfoward options.

Thx again!

I've never actually used Vulkan for Compute purposes, only graphics. I'm not familiar with what's out there, to be honest. Sorry I can't be more help here. 😞

No problem, thx!