Rich_Morin

Rich_Morin

Interesting article on GPUs - can anyone suggest another on how Axon and Nx make use of GPU capabilities?

Tales of the M1 GPU is a very nicely written discussion of GPUs in general and the Apple M1 GPU in particular. It would be great if someone could suggest a companion article to discuss how Axon and Nx make use of GPU capabilities.

-r

Most Liked

kip

kip

ex_cldr Core Team

Note I’m not an expert so the following may not be completely accurate although I think the broad brushstrokes aren’t too far off.

'Nx` can operate with different backends and some of those backends, like tensorflow utilise GPUs.

To make that work efficiently, GPU code needs to be loaded onto the GPU and the data needs to be efficiently accessed on it too.

The way that happens is with the defn (define numerical) functions which very cleverly compile your Elixir code (a subset of the full language) into backend code. And if that backend executes on the GPU then you get the appropriate performance outcome. Much of Nx (and therefore libraries which depend on it like Axon) is written as defn.

outlog

outlog

Note no expert as well

elixir-nx can use different backends.. the torchx backend has beta support for the m1 gpu - and in a few weeks/months it will be super easy to get going - right now the install with gpu support is a bit cumbersome afaik..

https://twitter.com/meanderingstrm/status/1589570845537894402

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement