News for hackers. Stuff that matters.
Re:Minimal auto-differentiation engine in Rust (for educatio... by tnlogy on Friday June 20, 2025 @02:30PM (#44330543)
Nice! I made a small toy version myself to learn Rust and freshen up on ML. https://github.com/tnlogy/telegrad

I wanted to store the graph in a heap to be able to send it to the gpu later on, but then I got lazy and abandoned it. But you always learn something. :)

Re:Minimal auto-differentiation engine in Rust (for educatio... by kragen on Friday June 20, 2025 @03:48PM (#44331334)
That sounds interesting; what do you mean by "in a heap"? Is the stack they're currently linearized into not GPU-friendly? I don't know much about GPU programming, so this might be a dumb question.
Re:Minimal auto-differentiation engine in Rust (for educatio... by tnlogy on Friday June 20, 2025 @04:07PM (#44331560)
My idea was to make a Vec of nodes with pointers to indexes in the vec, so it would be easier to send this array into the gpu. I wanted to make a minimal version example of making a micrograd network run on the gpu, with wgpu or macroquad, but I didn’t complete it, so would be nice if someone else did it. :)
Re:Minimal auto-differentiation engine in Rust (for educatio... by kragen on Friday June 20, 2025 @05:02PM (#44332073)
I see! I thought that was the stack.