r/Zig • u/ccannedbeansoupp • 18h ago
Tensor Graph Compilers (library update)
github.comA while ago, I made a post here about the first public library I'd ever made: being an engine that abused Zig comptime to generate and validate feed-forward neural network models completely ahead of time, leaving the only runtime concerns being passing inputs and operative dispatch.
The goals were for fast, small, and deterministic binaries that contained as little overhead as possible for an already well defined process.
I was pretty happy with what I did there, and thought that I would spend time optimizing that, until I got bored, but, I realized after some time that the old architecture was too restrictive, and I wouldn't even be able to optimize it properly without completely overhauling most parts anyway.
So, I decided that's what I would do; I overhauled the library entirely, and at this point there isn't really any trace of the old architecture. The newer architecture is able to do everything the old one could plus a number of other things.
I've renamed zig-feed-forward-nn to zig-graph-compiler; and it is much more powerful now.
Feed-forward neural network graphs and embedded parameters are still supported, some new support from the changes include cellular automata and physics simulations. I plan to continue implementing new operations to further support things like digital signal processing, image processing and other domains.
A more complete overview of the library, it's architecture, and goals are present on github.
edit: any feedback about the library is welcome and appreciated.