Live data from Hacker News

PyTorch Internals: Ezyang's Blog

blog.ezyang.com

21–30 of 35 posts

Re: PyTorch Internals: Ezyang's Blog

#21
post #15

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/

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

#23
Huh. I'd have written TORCH_CHECK like this:

    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

#24
post #22

For 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...), 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

#26
post #22

For 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...…

Most features are already supported on x86 CPUs, you can pip install mlx on Linux , and you can even use it on Windows (no official binary release yet but it is building and tests are passing).

Re: PyTorch Internals: Ezyang's Blog

#28
post #21
post #15

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/

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

[flagged]

Re: PyTorch Internals: Ezyang's Blog

#30
post #22

For 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...…

I think it relies heavily on unified memory.
Post reply on HN