Improvements to GPU integration with Julia

340 views
Skip to first unread message

Michael Jin

unread,
Apr 25, 2016, 4:47:40 AM4/25/16
to julia-dev
Hi, I'm an undergraduate student and I've been using Julia since 2013. I've been trying to use the GPU seamlessly for projects involving Julia matrices. For that end, I have started working on my own OpenCL BLAS Julia library to test the clBLAS library at the lowest level possible for the GPU with the OpenCL C library.

Here's a link to my project: https://github.com/mikhail-j/OpenCLBLAS.jl

This project has been tested on a NVIDIA GTX 780 Ti.

Any suggestions on what I can do to improve the state of GPU integration with Julia?

Andrei Zhabinski

unread,
Apr 26, 2016, 4:59:06 AM4/26/16
to julia-dev
The problem with GPUs is that you can't work with them seamlessly. GPU is a separate device and loading data to and from this device takes time, often much larger than computation itself. Moreover, GPU is optimized for high throughput, so applying it to considerably small arrays (say, 1024x1024 matrix) in most cases will be slower than the same task on CPU. 

So normally we use GPU only for large computations and try to minimize IO with GPU, trying to keep data on device when possible. Thus I heavily suggest to do performance testing before proceeding with the approach you started in OpenCLBLAS.jl. Also note that we already have a similar project - JuliaGPU/CLBLAS.jl - so you may be interested in contributing to it. 
Reply all
Reply to author
Forward
0 new messages