Friday, November 11, 2011

Presentation, presentation, presentation

Who would have said that working on a presentation would mean so much time invested?

My presentation is (apparently) going to be on Conjugate Gradient on the GPU.

My references are:

For an introduction to the Conjugate Gradient Method:
For more in depth GPU CG:

For Samples on CG with Cuda (CUBLAS, cuSPARCE):

For fluids simulation:

And I was going to read more about fluids simulation on the GPU but decided it was time to update my blog.

So what have I learnt?

- The samples from CUDA are helpful to understand CG behind the scenes. Unfortunately, they aren't optimized (to make code clearer to understand) but I think I should be able to use them as a starting point.
- In CH 38, the code was implemented in the fragment shaders using Cg. They also moved every step to the GPU (i.e. advection, diffusion, etc).
- The dominating operations for CG is the matrix-vector multiplication. So this is where the most of the optimizations should be centered. 

This has given me a good idea what to read next, if not for the presentation, for the implementation of the CG solver later on, after ditchinig CUBLAS and cuSPARCE. Hopefully, one day I'll be done with the reading and get on with the code.

I have also started playing around with the code. I think I now understand how the A matrix is built in the framework so that I can translate it to the data structures asked for in the methods used from the libraries to implement the CG solver. What is holding me back is a crash when I try to print out... My guess: some memory leak or plain bad luck. 

Next steps:
  • Finish the presentation (which means start the presentation in PowerPoint)
  • Find out why the code is breaking.
  • Tackle the feedback received from the checkpoint presentation (probably for the final video):
    • Get running times (FPS in current implementation in the CPU)
    • Try larger grids; report sizes and FPS 
    • Explain the A-Matrix better and the semi lagrangian method

No comments:

Post a Comment