Ask HN: Best place to learn GPU programing?
41–50 of 57 posts
Re: Ask HN: Best place to learn GPU programing?
#42Earlier quoted context omitted.
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?
#43Earlier 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.
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...
Re: Ask HN: Best place to learn GPU programing?
#44I last did GPU programming around the transition from just-shaders to gpgpu... And I want to come back. However, I don't want to buy new hardware just yet. In addition to all the study materials posted, can anyone recommend a good hosted GPU setup for experiments? e.g. what kind of EC2/GCE instance would be a cost effective way to [re]learn GPU programming?
There are wrinkles like if you're doing double precision arithmetic, consumer cards from nvidia since the Titan blacks are 12:1 fp32:fp64 or higher i.e. double precision is relatively slow. Radeons/openCL might be better for the purpose
Re: Ask HN: Best place to learn GPU programing?
#45https://annufoundationblog.wordpress.com/ Annu foundation Shop no.6 , 2nd floor Gangania complex,Sikanderpur Ghosi Gurgaon ,Haryana,India
We are working for 1.Education 2.employment, 3.Empowerment Education: our main focus is on Digital literacy .We are educating students housewife (house maker) senior citizens and uneducated people who do not read or write (but they have smartphone) We are teaching them how to use the internet for getting any kind of information that is available for free for their personal and professional benefit. Employment : We are helping people who have not accessed for modern technology for getting jobs .We are employing people at the entry level of blue color jobs and domestic help staff like a maid,cook,nanny,governess,driver,patient care . Empowerment: We are working with various NGO for digital empowerment
Mission
We are a non-profit organization with a mission to create lasting solutions to poverty, hunger, and social injustice. We are connecting people with the job opportunity, educating people with new technology and empowering them by providing useful information and electronics devices mobile, laptop and tablet etc.
Vision We will live in a society where everybody is equal has the same opportunity and all the necessary resources for a peaceful and prosper life .There will be no boundaries on earth.
Re: Ask HN: Best place to learn GPU programing?
#46https://annufoundationblog.wordpress.com/ Annu foundation Shop no.6 , 2nd floor Gangania complex,Sikanderpur Ghosi Gurgaon ,Haryana,India
We are working for 1.Education 2.employment, 3.Empowerment Education: our main focus is on Digital literacy .We are educating students housewife (house maker) senior citizens and uneducated people who do not read or write (but they have smartphone) We are teaching them how to use the internet for getting any kind of information that is available for free for their personal and professional benefit. Employment : We are helping people who have not accessed for modern technology for getting jobs .We are employing people at the entry level of blue color jobs and domestic help staff like a maid,cook,nanny,governess,driver,patient care . Empowerment: We are working with various NGO for digital empowerment
Mission
We are a non-profit organization with a mission to create lasting solutions to poverty, hunger, and social injustice. We are connecting people with the job opportunity, educating people with new technology and empowering them by providing useful information and electronics devices mobile, laptop and tablet etc.
Vision We will live in a society where everybody is equal has the same opportunity and all the necessary resources for a peaceful and prosper life .There will be no boundaries on earth.
Re: Ask HN: Best place to learn GPU programing?
#47One more thing: how will I know if I should use OpenCL or CUDA ?
Re: Ask HN: Best place to learn GPU programing?
#48I'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…
That you don't seem to know the difference between OpenGL and OpenCL hardly makes your claims more plausible.
Anyway, Cuda is a general purpose framework as is OpenCL. OpenGL is a 3D graphics framework and different from both. Looking at these structure, Cuda is architected to allow straight forward general general purpose parallel computing - one has to know the broad structure of a GPU but one doesn't have to know all the principles of graphics programming. OpenCL is similar but more complex due to its efforts to take multiple processors into account. As far as I can tell, using Cuda is the simplest path to general purpose GPU computing (the op didn't do any favors by not really saying what kind of GPU computing he wanted to learn - he did say Cuda later - but your post seems confused regardless of what thing someone ultimately wants to learn).
Re: Ask HN: Best place to learn GPU programing?
#49I'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.
If it fits your goals, a useful mental model is that you are programming Numpy ndarray data, and all these tools just fit together to let you manage the data elements, apply transforms, and view them. You should be thinking about the math that solves your domain problem, using alternative mathematical formulations to optimize your algorithms, and only then worrying about using a tuned parallel implementation of that math.
I prototype new ideas and visualize results and intermediate data very easily, with easy transitions between using numpy/scipy routines, custom OpenCL kernels, and OpenGL shaders. I've even found myself using OpenGL to do the visual equivalent of "printf debugging" to look at intermediate array results when developing new array operations and wondering what I've done wrong or misunderstood about the problem. It's very instructive to create little sub-problems you can run as independent scripts during dev/test/microbenchmarking cycles. You should iterate on many small experiments, not assume you can design high-performance solution in one top-down adventure.
For high performance processing, you eventually need to understand architecture limitations and the impact of different problem decompositions. Non-trivial, multi-dimensional problems need to be decomposed into smaller blocks to get better cache locality for the vectorized/parallel code that will process each block. Otherwise, you won't enjoy the benefits of parallel hardware as all the compute units are stalled waiting for data fetches. I find myself doing more and more meta-programming in Python, where I reason about array shapes and sizes, compute slicing geometries, and then loop to extract and dispatch chunks of data to OpenCL jobs which in turn use a dense form of SIMD or SPMD execution on that block. Python is great for this kind of marshaling work.
Also, PyOpenCL makes it trivial to switch between backend drivers. The Intel OpenCL driver is quite good on recent laptop and server CPUs. You might be surprised how much performance you can get out of recent i5/i7 or Xeon E3/E5 CPUs when you use all cores and all SIMD units effectively. Plus, the CPU backend is able to use all system RAM and has a more uniform cache behavior, which makes it more forgiving for badly decomposed problems compared to GPU. This can be a big help for prototyping as well as for limited-run problems where you don't have time to invest in fully tuning your data structures for GPU requirements.
Re: Ask HN: Best place to learn GPU programing?
#50http://www.syedrezaali.com/store/fragment-osx-app
Here are a bunch of sketches (GPU Programs):