Also interesting in this context is the PyTorch Developer Podcast [1] by the same author. Very comforting to learn about PyTorch internals while doing the dishes. [1] https://pytorch-dev-podcast.simplecast.com/
PyTorch Internals: Ezyang's Blog
21–30 of 35 posts
Re: PyTorch Internals: Ezyang's Blog
#22It is a modern and clean codebase without legacies, and I could understand most things without seeking external articles.
Re: PyTorch Internals: Ezyang's Blog
#23 TORCH_CHECK(self.dim() == 1)
Turns out it's possible to write TORCH_CHECK() so that it evaluates the streaming operators only if the check fails. (Check out how glog works.)Re: PyTorch Internals: Ezyang's Blog
#24For learning internals of ML frameworks I recommend reading the source code of MLX: https://github.com/ml-explore/mlx . It is a modern and clean codebase without legacies, and I could understand most things without seeking external articles.
I'm asking because it seems to have nice autodiff functionality. It even supports differentiating array mutation (https://ml-explore.github.io/mlx/build/html/usage/indexing.h...), which is something JAX and Zygote.jl can't do. Instead, both have ugly tricks like `array.at[index].set` and the `Buffer` struct.
So it would be cool to have this functionality on a "regular" CPU.
Re: PyTorch Internals: Ezyang's Blog
#25Re: PyTorch Internals: Ezyang's Blog
#26For learning internals of ML frameworks I recommend reading the source code of MLX: https://github.com/ml-explore/mlx . It is a modern and clean codebase without legacies, and I could understand most things without seeking external articles.
Why is MLX Apple silicon only? Is there something fundamental that prevents it from working on x86? Are some core features only possible on Apple silicon? Or do the devs specifically refuse to port to x86? (Which is understandable, I guess) I'm asking because it seems to have nice autodiff functionality. It even supports differentiating array mutation ( https://ml-explore.github.io/mlx/build/html/usage/indexing.h...…
Re: PyTorch Internals: Ezyang's Blog
#27Re: PyTorch Internals: Ezyang's Blog
#28Also interesting in this context is the PyTorch Developer Podcast [1] by the same author. Very comforting to learn about PyTorch internals while doing the dishes. [1] https://pytorch-dev-podcast.simplecast.com/
i think the problem w the podcast format (ironic for me to say) is that it assumes a lot higher familiarity with the apis than is afforded by any visual medium including blogs
Re: PyTorch Internals: Ezyang's Blog
#29Re: PyTorch Internals: Ezyang's Blog
#30For learning internals of ML frameworks I recommend reading the source code of MLX: https://github.com/ml-explore/mlx . It is a modern and clean codebase without legacies, and I could understand most things without seeking external articles.
Why is MLX Apple silicon only? Is there something fundamental that prevents it from working on x86? Are some core features only possible on Apple silicon? Or do the devs specifically refuse to port to x86? (Which is understandable, I guess) I'm asking because it seems to have nice autodiff functionality. It even supports differentiating array mutation ( https://ml-explore.github.io/mlx/build/html/usage/indexing.h...…