JuliaGL / GLVisualize.jl

Visualization library written in Julia and OpenGL
Other
247 stars 36 forks source link

Integration with CUBLAS/CLBLAS? #93

Open dlfivefifty opened 8 years ago

dlfivefifty commented 8 years ago

Does GLVisualize integrate well with any of the GPU programming packages? For example,

https://github.com/JuliaGPU/CLBLAS.jl

or

https://github.com/JuliaGPU/CUBLAS.jl

It would be nice to do the computation and plotting all on the GPU 😀

vchuravy commented 8 years ago

That is our secret master plan :) @SimonDanisch once experimented with OpenCL -> OpenGl interop, but we didn't get very far and I don't think anything has been done in that direction.

SimonDanisch commented 8 years ago

I have to correct you @vchuravy, I actually put ArrayFire and CUDArt integration into the mix since then ;) So this should also work with CUBLAS and CLBLAS, if they don't do anything weird. It happened quite recently and I haven't found time to nicely integrate it yet... But if you want to, I can share a few scripts which should get you started!

vchuravy commented 8 years ago

Please do share :)

dlfivefifty commented 8 years ago

ArrayFire looks really cool! Exactly what I need I think...

Sent from my iPhone

On 26 Apr 2016, at 18:44, Simon notifications@github.com wrote:

I have to correct you @vchuravy, I actually put (ArrayFire)[https://github.com/JuliaComputing/ArrayFire.jl] and CUDArt integration into the mix since then ;) So this should also work with CUBLAS and CLBLAS, if they don't do anything weird. It happened quite recently and I haven't found time to nicely integrate it yet... But if you want to, I can share a few scripts which should get you started!

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

SimonDanisch commented 8 years ago

It is pretty cool :) It has some performance problems, but I hope they're easily fixable (it consumes way too much GPU memory in my trivial example). But this is probably a problem with the Julia wrapper and might be fixed soon. Also, I wasn't using inplace operations and I'd be surprised if ArrayFire doesn't actually offer inplace variants in some way.

Here is how you can try things out:

# Cxx must be installed and working!
Pkg.checkout("CUDArt", "sd/gl_interop")
Pkg.clone("https://github.com/JuliaGPU/ArrayFire.jl")
Pkg.checkout("GLVisualize", "sd/gpgpu")
Pkg.checkout("GLWindow")

then you can try out the gravity notebook Haven't tried this out on any other machine yet and it took me quite a while to set up everything correctly, so this might as well not work out of the box...

SimonDanisch commented 8 years ago

The plan is to add this painlessly, by putting the interop code into GLAbstraction/AbstractGPU array and make GLVisualize accept any kind of GPUArray, which should be pretty straight forward ;)

musm commented 8 years ago

@SimonDanisch how are you able to get cxx.jl working on windows :O . ?

SimonDanisch commented 8 years ago

I'm not :( So this is OSX/Linux only so far...