31 Dec

2018 Review

2018 has been a very busy year for me personally, and I thought for the sake of my own memory of the events I’d do a review of the things I’ve managed to achieve this year.

Vulkan 1.1 / SPIR-V 1.3 & Subgroup Operations

The single biggest item that I shipped this year was adding subgroup operations to Vulkan 1.1 and SPIR-V 1.3. It took just under two years of wrangling with all the hardware vendors to get a set of functionality that we could expose on all Vulkan 1.1 implementations. As part of adding this I wrote the Vulkan specification, SPIR-V specification, Vulkan conformance tests, glslang (both GLSL and HLSL frontends), and also wrote a very well received Vulkan Subgroup Tutorial (one of the highest viewed posts on the Khronos site to date!). Since joining AMD I’ve also been pleasantly surprised by the number of titles including some form of subgroup operations in their shaders – as the power they give the developer to get the most out of our hardware is immense.

Joined AMD

Having spent about eleven years at Codeplay I left to join AMD as an LLVM compiler engineer / Khronos representative / performance-junkie. I’ve managed to keep up with my work in the Khronos Group as the Vulkan/SPIR-V representative for AMD, meaning that I am bringing all my experience within Khronos and the relationships I’ve built up to play with my new focus on AMD’s hardware.

It is pretty awesome that I’m also able to more publicly work and contribute with the LLVM technology stack. I’ve been using LLVM in graphics driver stacks since 2010, but all the projects were under NDA as I was contracting for hardware customers during my time at Codeplay. It has often been frustrating to have as much experience with LLVM as I have, but be unable to get enough traction within the community to fix things because of the NDA’ed nature of my previous work. That has changed since I joined AMD though – I have committed significant performance optimisations to our AMDGPU backend and also some bug fixes into the core of LLVM proper:

I’ve also been making changes in our LLPC Vulkan compiler stack to get significantly more performance:

  • Added a peephole optimization pass that helped gain significant performance improvements (mostly by reducing VGPR pressure across control flow) in the compiler.
  • Fixed up the loop unrolling detection to do a much better job at figuring out loop trip counts with multiple exits (more than LLVM itself can do).
  • I solidified the pass manager strategy to move the optimization passes after all the lowering and patching phases. This means that we can explain to LLVM a lot more about what the code is actually doing, which is super important for things like Loop Invariant Code Motion (LICM) for hoisting things outside of loops.

I’m incredibly humbled to work for one of the most awesome human beings Rys Sommefeldt, and work with great people like Colin RileyGraham SellersNicolai Hähnle, Matthäus G. Chajdas, and many many more. It’s great to be back focused on making games fast which is where my real passion is.

Leaving Codeplay

It’d be wrong for me not to include a lament over leaving Codeplay. Codeplay is a great company, full of superbly talented engineers that work on crazy hard problems everyday, and has a very bright future ahead of it. The main reason for me leaving was simply that I wanted to work on games – and Codeplay has been pivoting towards AI and machine learning technologies in recent years (including an investment by the Williams F1 team into Codeplay!). So just to finally debunk many of the conspiratorial theories about my switch – I’m just not personally invested in ML and wanted to work on games technology where my passion is, and the AMD job gave me the chance to do that. I really do wish all the superbly talented people at Codeplay all the best for their future – and I’d very much like to thank Andrew Richards for hiring me, Verena Beckham for being a very formative person in educating me in how to actually function in a workplace, and Benie, Alastair MurrayPierre-Andre Saulais, Aaron Dron, and many others for making Codeplay such a fun place to work at. Good luck folks!

Conclusion

2018 has been a great year that has pushed me to learn new skills and survive in a new environment. I’m super proud of what I’ve achieved, and really looking forward to what I’ll get to do in 2019.

I hope everyone enjoys their Hogmanay and y’all can bring in the bells of 2019 with much joy. Bliadhna Mhath Ùr!