HigherOrderCO / Bend

A massively parallel, high-level programming language
https://higherorderco.com
Apache License 2.0
17.63k stars 433 forks source link

(Request) Autograd / Neural network library #411

Open j6k4m8 opened 6 months ago

j6k4m8 commented 6 months ago

Wondering if anyone on the Bend team or in the community has started thinking about a neural network library that runs on Bend or more generally on the HVM. Is the Bend API mature enough for that right now? Interested in writing one if no one else has started yet :)

developedby commented 6 months ago

Right now our priority is in finishing more basic things. For a library like that we first need to finish the package manager and finish implementing IO.

Also, traditional neural networks are designed to be extremely performant on the GPU (it's broken down into mostly very homogenous matrix operations). So it probably won't be our priority once we start developing libraries and applications, but if someone in the community want to do it, we'd be very happy.

anandijain commented 6 months ago

it would be interesting to see if you could kludge in to the bend c codegen some usage of the Enzyme autodiff library and compile the c code with clang

akaashdash commented 6 months ago

I made a simple MLP if you want to mess around with something similar: https://github.com/akaashdash/bend-mlp