How does JAX allocate memory on a TPU? An interactive C++ walkthrough
Learning and science
interactive tutorial
SHOW HN2021
How does JAX allocate memory on a TPU? An interactive C++ walkthrough
How does JAX allocate memory on a TPU? An interactive C++ walkthrough
gist.github.com78points
28comments
#649of 2,533 in 2021
Top 26%of 2021 by points
How HN took it
MixedNo clear lean
2 positive, 6 neutral or asking, 2 mixed, 3 critical, out of 13 comments about the project. Thread score -0.10.
Execution: 1 for, 1 againstDocs: 1 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Jax debugging and TPU VM access praised as enjoyable
From 2 comments
> The downside of Jax is it’s not easy to debug. PyTorch, for better or for worse, will actually run your Python code as you wrote it. Hmm. Jax's ease of debugging was the very…
sillysaurusx on HN> So I'm surprised you can run linux userspace on it? For what it's worth, I was equally shocked! Felt like a miracle. That special hardware also turns out to be…
sillysaurusx on HN
Objections
Memory scheduling claims in XLA questioned as unverified
From 2 comments
>The memory usage and schedule of a given program/graph is statically optimized by the compiler Is it really though? The only thing I see is…
tubby12345 on HNI believe you but I'm wondering what that memory scheduling actually looks like (e.g. solving the full MIP?). do you have a code pointer to that scheduling routine?
tubby12345 on HN
PyTorch XLA on TPU performs poorly and recompiles often
From 1 comment
A terrible one. It’s literally one of the worst experiences you can have. I say that without an ounce of bias. When tpu SSH first came out, I immediately went to my pytorch buddy…
sillysaurusx on HN
Questions
How does XLA schedule memory inside compiled programs
From 1 comment
I believe you but I'm wondering what that memory scheduling actually looks like (e.g. solving the full MIP?). do you have a code pointer to that scheduling routine?
tubby12345 on HN
Alternatives named
PyTorch with XLA backend
From 2 comments
Jax uses XLA (a IR that targets multiple platforms, including the Google TPU) as backend. Pytorch also has a XLA backend.
boibombeiro on HNA terrible one. It’s literally one of the worst experiences you can have. I say that without an ounce of bias. When tpu SSH first came out, I immediately went to my pytorch buddy…
sillysaurusx on HN
Google Colab for TPU/GPU training
From 1 comment
Plenty of free services like Google Colab exist for Tensorflow/Pytorch and offer gpu/tpu. I pay just $10 a month to train my models at my leisure on it, and the free version is…
Salgat on HN