<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Notes on Leo's blog</title><link>https://blog.leokrglv.net/notes/</link><description>Recent content in Notes on Leo's blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 11 Jul 2026 00:00:00 +0200</lastBuildDate><atom:link href="https://blog.leokrglv.net/notes/index.xml" rel="self" type="application/rss+xml"/><item><title>jax-based samplers on AMD's ROCm - a recipe</title><link>https://blog.leokrglv.net/notes/jax_sampler_amd/</link><pubDate>Sat, 11 Jul 2026 00:00:00 +0200</pubDate><guid>https://blog.leokrglv.net/notes/jax_sampler_amd/</guid><description>&lt;p&gt;This is a small note on how to use a GPU-based sampler on linux with an AMD GPU.&lt;/p&gt;
&lt;p&gt;When using &lt;code&gt;PyMC&lt;/code&gt;, it is possible to use external samplers, that increase the sampling speed.
For CPU-based samplers, the best-known choice is the Rust-based &lt;code&gt;nutpie&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the underlying model has a high number of levels and/or any type of significant hierarchies, one may want to consider a GPU-based sampler.
For that, the common solutions are jax-based &lt;code&gt;numpyro&lt;/code&gt; and &lt;code&gt;blackjax&lt;/code&gt; samplers. To properly perform them, we need a dedicated GPU.
As of today, the most solid ecosystem, even on Linux, is, of course, the Nvidia&amp;rsquo;s CUDA. So the most frictionless way to make the common libraries is using the CUDA infrastructure.
I am, currently, an AMD user, so making common libraries work to use GPU&amp;rsquo;s capability, is often not trivial.&lt;/p&gt;</description></item></channel></rss>