Improvements to GPU integration with Julia

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Improvements to GPU integration with Julia

Michael Jin
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?
Reply | Threaded
Open this post in threaded view
|

Re: Improvements to GPU integration with Julia

Andrei Zh
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. 

On Monday, April 25, 2016 at 11:47:40 AM UTC+3, Michael Jin wrote:
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: <a href="https://github.com/mikhail-j/OpenCLBLAS.jl" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmikhail-j%2FOpenCLBLAS.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFemkEBXG0puvJHfDGZFS3Ze8GDkg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmikhail-j%2FOpenCLBLAS.jl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFemkEBXG0puvJHfDGZFS3Ze8GDkg&#39;;return true;">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?