News for hackers. Stuff that matters.
Re:Ask HN: What are good projects to understand CUDA and GPU... by nobody271 on Tuesday October 02, 2018 @07:49AM (#18120636)
I learned a little OpenCL a few years ago just because I wanted to see how GPUs were programmed. I tried several books:

- Heterogeneous Computing with OpenCL (http://www.hds.bme.hu/~fhegedus/C++/Heterogeneous_computing_...) - informative but not many examples

- The Art of Multiprocessor Programming (https://www.amazon.com/Art-Multiprocessor-Programming-Revise...) - I had a hard time getting traction with this book.

- OpenCL Parallel Programming Development Cookbook (https://www.amazon.com/dp/B00ESX1AH2/ref=dp-kindle-redirect?...) - Not a great reference but it had some easy to follow examples.

- Actually a few other books you might find when searching for parallel processing or parallel algorithms which just turn out to be entirely abstract math books.

People would ask my why I wanted to learn to program on a GPU and I didn't have an answer. Surely I would find an answer in one of those books. I saved a few of the projects:

- Edge detection (https://mega.nz/#!LJUwmLSa!dRijnB1xVhI9RAC1Xac_xRhT2IsfDG2sJ...) - fun!

- GPU template (https://mega.nz/#!yAsxATzb!Y4-9zRMCTSYHX1pKxWPQPl8WNDgnWkSAU...) - write GPU code with JavaScript

I have another one for bitonic sort somewhere (a parallel sort that sadly isn't even as good as quick sort).

The projects I enjoyed most were image filters (like edge detection). You could do a project that implements various image filters. If you did that you would not only get experience writing CUDA but you would learn how a lot of different filters are done.

Re:Ask HN: What are good projects to understand CUDA and GPU... by jason_slack on Tuesday October 02, 2018 @06:26PM (#18126225)
I've been delving into OpenCL to parallelize some algorithmic trading stuff I have been doing. One thing I did a few days ago was to thread the way I load data into a MySQL Server. What took over an hour normally is down to under 10 mins.

I'd be interested in knowing is what GPU's you were/are using. I'm using a Sonnet eGFX Breakaway Box 550 (with Radeon RX Vega 56 Card).

Re:Ask HN: What are good projects to understand CUDA and GPU... by nobody271 on Thursday October 04, 2018 @09:05PM (#18144928)
Oh, you mean the bottleneck was on some processing you were doing before sending it to the database? That's cool.

It was mostly on a low-end laptop with integrated graphics lol. I was more interested in learning how parallel algorithms work than anything. Now I feel like an idiot.

Re:Ask HN: What are good projects to understand CUDA and GPU... by jason_slack on Thursday October 04, 2018 @10:44PM (#18145347)
Nah don’t feel that way! We all have different goals or reasons for doing things. I had a specific reason to learn. You had one too. They were just different.

Yup my bottleneck was before hitting the database server so I used the GPU to take care of it.