dpohanlon / jax-autovec-bench

A quick Jax auto-vectorisation benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jax auto-vectorisation benchmark

How does Jax auto-vectorisation compare against manually-vectorised equivalents?

This is a quick benchmark of a section of batched Kalman filter with a matrix inverse, using auto-graphed and manually-vectorised TensorFlow, manually-vectorised Numpy, manually-vectorised Jax, and auto-vectorised Jax using vmap.

Here NumPy has a natural disadvantage of not being able to make use of (here) all four CPU cores. For this section of code at least, auto-vectorised Jax is able to replicate the performance of the more fiddly manually-vectorised code.

About

A quick Jax auto-vectorisation benchmark

License:MIT License


Languages

Language:Python 100.0%