Live data from Hacker News

Ask HN: Best place to learn GPU programing?

news.ycombinator.com

31–40 of 57 posts

Re: Ask HN: Best place to learn GPU programing?

#31
post #30

I'm afraid there isn't a single best place. What is important first is to learn how GPU architecture is different from traditional before you start learning Cuda or linear algebra. Take a look at these sources for absolute beginners. https://thebookofshaders.com/ http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Tab... http://learnopengl.com/ edit: also when you are ready to pick a language and start writing c…

Would you recommend OpenGL? I was under the impression that OpenCL was the equivalent of Cuda and OpenGL was specifically for 2d / 3d rendering.

Re: Ask HN: Best place to learn GPU programing?

#33
post #31
post #30

I'm afraid there isn't a single best place. What is important first is to learn how GPU architecture is different from traditional before you start learning Cuda or linear algebra. Take a look at these sources for absolute beginners. https://thebookofshaders.com/ http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Tab... http://learnopengl.com/ edit: also when you are ready to pick a language and start writing c…

Would you recommend OpenGL? I was under the impression that OpenCL was the equivalent of Cuda and OpenGL was specifically for 2d / 3d rendering.

Yes my thoughts are the same, so I decided to learn CUDA and port to OpenCL if necessary

Re: Ask HN: Best place to learn GPU programing?

#34
post #9

Get a book on linear algebra, a book on C/C++, and download the OpenGL spec and build a graphics pipeline that can render a textured polygon, then add lights, shadows, animations... this will take you a month perhaps.

One month, sure :D Realistically, if you have no GPU or OpenGL experience, to build something like that, lightning, shadows.. And to really understand what is happening, in one month maybe if already know C++/your language of choice well, you can grasb the idea of how to draw a triangle with maybe some lightning. Shadows, animation, no way in a month. The whole OpenGL stack is pretty complex. My suggestion would be t…

Yes I am simply concentrating on parallel calculations and I dont need any graphics to work upon

Re: Ask HN: Best place to learn GPU programing?

#35
post #19

Earlier quoted context omitted.

ah ok then you're better off learning OpenCL, if you don't have access to a beefy graphics card just rent one by the hour off of amazon. You can prototype on your laptops CPU then run the real simulation on a remote machine.

thats an issue I already have NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2) to work on. but why OpenCL and not CUDA ?

edit: thats not an issue I already have NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2) to work on. but why OpenCL and not CUDA ?

Re: Ask HN: Best place to learn GPU programing?

#37
post #22

Earlier quoted context omitted.

> increase performance of an existing framework Cautionary tale following... I don't know the background on this but your goal might not be realistic, unless the rest of the framework architected in a GPU friendly way. I was once hired for such a project (some scientific applications in chemistry). They had a clear idea what needed to be improved, their Python framework called into C code for some non-trivial matrix…

Thanks for the insight, Well I am working on a research project, to redesign a CPU architecture framework into a GPU one, and luckly I am working on real time batch processed data, so as of now have some plans as to what should go on GPU and I want to try it out myself and see if there are ways to cut of those bus tranmsion latencies between CPU and GPU. Not sure how exaclty but I just started kearning CUDA now, one…

Latency hiding is the key for high throughput GPU applications. Make sure the GPU never waits for CPU and vice versa. Keep transfers to/from GPU flowing constantly and a queue of jobs scheduled. Each job should preferably be several megabytes in size.

Memory bandwidth is the bottleneck for most practical tasks. Bandwidths you should know: CPU 50 GB/s, GPU 300 GB/s, PCI-e DMA 16 (v. 3.x) or 32 (v. 4.x) GB/s.

Re: Ask HN: Best place to learn GPU programing?

#38
post #22

Earlier quoted context omitted.

Hello, sorry for my vague question, I want learn CUDA so I can increase performance of an existing framework, pure performance and throughput time in consideration. And no I dont have no prior experience on working with GPU's before.

> increase performance of an existing framework Cautionary tale following... I don't know the background on this but your goal might not be realistic, unless the rest of the framework architected in a GPU friendly way. I was once hired for such a project (some scientific applications in chemistry). They had a clear idea what needed to be improved, their Python framework called into C code for some non-trivial matrix…

Yes, agreed completely. I had a similar experience in a streaming context, and wrote a paper about it: http://www.scott-a-s.com/files/debs2010.pdf

Re: Ask HN: Best place to learn GPU programing?

#39

Earlier quoted context omitted.

thats an issue I already have NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2) to work on. but why OpenCL and not CUDA ?

edit: thats not an issue I already have NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2) to work on. but why OpenCL and not CUDA ?

OpenCL vs CUDA is pretty boring debate, both run on the same hardware and so have similar performance. Difference is in the tooling and ecosystems, you can run OpenCL on FPGA's for example.

Re: Ask HN: Best place to learn GPU programing?

#40
post #6

what does "GPU programming" mean? Does it mean you've never done anything GPU related ever and you want to start at "put a triangle on the screen" with OpenGL or WebGL? Does it mean some thing like GPGPU, you want to use GPUs to do computation? Does it mean something like Vulkan/DX12/Metal, you want do low level stuff? Maybe someone can give answers to all of those questions but they're arguably different things and…

Hello, sorry for my vague question, I want learn CUDA so I can increase performance of an existing framework, pure performance and throughput time in consideration. And no I dont have no prior experience on working with GPU's before.

The following blog series may provide additional insight into the process of applying CUDA to existing code:

http://blog.marcgravell.com/2016/05/cudagetting-started-in-n...

Post reply on HN