I'm bored teach me about something you like

Guys I'm bored I don't feel like playing my video games tonight I want you to drop a few lines about something you're interested in and why you're interested in it.

Lets have a conversation about it.

I like learning things :) :) :)

Parents
  • The video games you play almost certainly use GPUs or graphics processing units to generate the graphics but did you know they can also be used for hardcore scientific computation?

    each GPU is bit like a CPU (standard computer processor) linked to thousands of ALUs or arithmetic logic units. The ALU is the CPUs calculator and by having so many the gpu can do many calculations at once. But it can only run one program at once which means every ALU has to perform the same calculation just on different numbers. The programmes GPUs run can’t do conditional jumps like a cpu can.

    a cpu can check if two numbers are the same and if they are go to some other part of the program to do something difrent. But in a GPU some ALU would have to jump and some not. That’s not allowed, there is only one program running on the gpu so you can’t be in two different parts of the program at the same time.

    this makes writing good code for GPUs hard. Instead of conditional jumps you have conditional saves. Where an output gets saved only if a condition is satisfied.

    so if in a GPU program you want each ALU to calculate 1 of 2 alternative formulas every ALU has to compute both formulas and save the answer from the one you wanted in each case. 
    avoiding these sections where you have to do redundant work is a big part of good GPU programing.

  • isnt this now dealt with thread based software where the different cores of processors process threads at same time

  • no. That's also a thing but GPUs operate on a different principal. In a multicore cpu each core is like its own mini cpu capable of running its own separate program. threading allows multiple programs to time share a single core as if there were more 'virtual' cores. A GPU is supper specialised to run one program at a time but the program can do hugely parallel calculations, It's like vector arithmetic.

    So a GPU command might be C=A+B but what that actually means is C_0=A_0+B_0, C_1=A_1+B_1 etc. In a CPU you are allowed an instruction like IF C>0 GOTO line X but not in a GPU. after all would that be if C_0>0 or if C_1>0? instead you have instructions like IF C>0 D=C else D=0 which will give you a D where any values in C less than 0 have been set to 0. 

    So say I want to write a program that involves doing the same sums over at over on a lot of different numbers and I can design this program in such a way that a lot of the calculations can be done at the same time independently an involve almost exactly the same series of mathematical operations ... well GPUs are great at that.

Reply
  • no. That's also a thing but GPUs operate on a different principal. In a multicore cpu each core is like its own mini cpu capable of running its own separate program. threading allows multiple programs to time share a single core as if there were more 'virtual' cores. A GPU is supper specialised to run one program at a time but the program can do hugely parallel calculations, It's like vector arithmetic.

    So a GPU command might be C=A+B but what that actually means is C_0=A_0+B_0, C_1=A_1+B_1 etc. In a CPU you are allowed an instruction like IF C>0 GOTO line X but not in a GPU. after all would that be if C_0>0 or if C_1>0? instead you have instructions like IF C>0 D=C else D=0 which will give you a D where any values in C less than 0 have been set to 0. 

    So say I want to write a program that involves doing the same sums over at over on a lot of different numbers and I can design this program in such a way that a lot of the calculations can be done at the same time independently an involve almost exactly the same series of mathematical operations ... well GPUs are great at that.

Children
No Data