Reddit - r/MachineLearning

How does torch.compile() achieve massive speedups despite highly optimized NumPy functions? [D]

How does torch.compile() achieve massive speedups despite highly optimized NumPy functions?

I was pondering on this question and decided to dive deep into torch.compile. It was a lot of fun learning about operator fusion as the central idea behind torch.compile.

So I created a tiny version of torch.compile in 500 lines of Python and a notebook showing how this works:

https://github.com/purohit10saurabh/tinytorchcompile

Let me know if you find this interesting! 🙂

Comments

No comments yet. Start the discussion.