News for hackers. Stuff that matters.
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by relix on Wednesday August 29, 2012 @05:08AM (#4447668)
Learning the syntax of programming for GPU is easy. The problem is porting algorithms to utilize the GPU most efficiently. This means taking into account SIMD architecture, warps, different kinds of memory, ... It's easy to port code to run on the GPU, it's not easy to actually make it run faster than a general purpose CPU.

If you understood this and still think it's easy, then congratulations you'll be able to pick and choose your jobs :)

Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by sillysaurus on Wednesday August 29, 2012 @05:16AM (#4447686)
Can you give an example of an algorithm that you feel is difficult to port to a GPU in a way that takes advantage of its capabilities? I'd like to try my hand at porting one. It's a lot of fun and hasn't been difficult so far. I'm genuinely curious whether it's odd that "taking advantage of the characteristics of different kinds of memory" is quite natural to me, or if I have a distorted view of my own capabilities. Either way I'll learn something, though, which is the fun part.

(Obviously something like scrypt would be difficult to port to a GPU since by definition it's un-parallelizable, but other algorithms should be doable.)

Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by spitfire on Wednesday August 29, 2012 @01:20PM (#4449801)
Dijkstra's shortest path. (IE: Pointer chasing). Goertzel's algorithm

If you have a simple, straight through algorithm running on a few million datapoints. GPU's are great. If it deviates even a little from there, gpu's start to fumble. Writing those two algorithms is an afternoons exercise in Mathematica or matlab, but several weeks adventure on a GPU.

And remember computers are cheaper than humans (Currently, $0.12/hr at amazon and $10/hr minimum wage).

Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by swordswinger12 on Wednesday August 29, 2012 @09:28AM (#4448387)
Try any P-complete problem or arbitrary integer multiplication.
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by eru on Wednesday August 29, 2012 @05:23AM (#4447705)
Have you started benchmarking, yet? Just see if you a) can do way better than the CPU, and b) are competitive with other people porting to the GPU. Of course, you'll have to choose an algorithm that's already ported for the second comparison.
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by sillysaurus on Wednesday August 29, 2012 @05:31AM (#4447731)
Regarding the second comparison, it's easy to do trivially better than someone else's work if you use their work as a starting point. But that type of optimization doesn't really matter as much as the first one you mentioned: the ability to "take that which would have run on a CPU, and parallelize it to run on a GPU.". It has always felt quite natural for me to do that, so it was strange to hear that it's so hard for others. Why is it difficult for them, but easy for me?

The easiest way for me to solve this mystery is to try to port an example someone considers difficult. Do you know of any?

Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by frownie on Wednesday August 29, 2012 @06:26AM (#4447851)
try matrix multplication. I mean a real matrices, say 10000x10000. And once you're there, try a LU decomposition of matrix, with proper numerical erro handling. You'll soon get to the point where you fell it's harder than you tought. And BTW, matrix multiplication or LU decomposition are super fundamental stuff when solving equations (which in turn is super fundamental when you want to compute bridges, constructions, aerodynamics, etc...)
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by eru on Thursday August 30, 2012 @08:32AM (#4454255)
Sparse or dense matrices?
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by encoderer on Wednesday August 29, 2012 @09:41AM (#4448457)
I don't know very much about this, but do you think that part of your success has just been the benefit you get from going from dynamic ram to static ram? Seems that alone would give you a baseline performance improvement?
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by cfallin on Saturday September 01, 2012 @02:01AM (#4462799)
GPUs use dynamic RAM too (though discrete cards usually have GDDR rather than DDR, which gives higher bandwidth). The most fundamental difference between a CPU and GPU isn't the memory hierarchy (modern GPUs are growing cache hierarchies as well) but the core architecture (vector/highly threaded "small cores", vs. out-of-order/superscalar "big cores").
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by duaneb on Wednesday August 29, 2012 @05:21AM (#4447699)
Also remember that each GPU architecture will likely have different strengths and weaknesses, making optimization difficult. To say the least.
Re:IBM unveils z-series with 5.5 GHz CPU and hardware transa... by sillysaurus on Wednesday August 29, 2012 @05:39AM (#4447749)
They do have different characteristics, but presently you can focus on just two architectures: the 7970 and the 680.