Two posts in one week! You guys are in for a treat!
This time, we’ll explore how we can use the open-source code analyzer osaca to dissect our Jacobi and textbook Gauss-Seidel kernels and understand why the latter is so slow despite the math saying its should converge in half as many iterations as Jacobi: critical path, loop carried dependencies, port pressure, and the likes. Then, we’ll see how we can use algebraic manipulations and loop unrolling to recover Gauss-Seidel’s convergence advantage without sacrificing the hardware efficiency of Jacobi. Here is the link to the blog post.
Big thank you to @ivanpribec for putting osaca under my radar as well as showing the unrolled Gauss-Seidel kernel.
@rsci : As you had correctly pinpointed last week, most of the Jacobi kernel’s performance comes from ILP. Vectorization gives you an extra speed-up but it really is just the cherry on top.