New blog post. I tried something new, got good results, and learned some surprising nuances of GPU programming.

https://probablymarcus.com/blocks/2023/10/19/vectorizing-wide-pytorch-expressions.html

What happens when you vectorize wide PyTorch expressions?

Marcus Lewis

Marcus Lewis

In machine learning and scientific computing, there are a lot of scenarios where code could be much more vectorized, but there's seemingly no way to exploit that opportunity while keeping the code readable.

I created a library called Vexpr to try to fill this gap.

In this blog post, I demonstrate Vexpr in one of these scenarios, running a customized Gaussian Process on a GPU.

I was excited to write this up. It's fun to learn the nuances and build up a cartoon mental model of what vectorization really does.

For more info on Vexpr, check out https://vexpr.org
Vexpr

Represent expressions as data structures, then transform them

Vexpr