# ZGC: Tensor Graphs/Numerical computation compiler

**URL:** <https://ziggit.dev/t/zgc-tensor-graphs-numerical-computation-compiler/17866>\
**Category:** Showcase\
**Tags:** comptime, llm, zig-0-16\
**Created:** [October 6, 2026, 7:15am UTC](https://ziggit.dev/t/zgc-tensor-graphs-numerical-computation-compiler/17866 "2026-10-06T07:15:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krypticlogan](https://ziggit.dev/user_avatar/ziggit.dev/krypticlogan/32/8214_2.png) [@krypticlogan](https://ziggit.dev/u/krypticlogan)\
**Post date:** [October 6, 2026, 7:15am UTC](https://ziggit.dev/t/zgc-tensor-graphs-numerical-computation-compiler/17866/1 "2026-10-06T07:15:48Z")

</div>

# Zig-Graph-Compiler(ZGC):

* * *

Started as a specialized runtime for neural network graphs, and pivoted to a tensor graph compiler, but really they’re the same thing?  
[https://github.com/krypticlogan/zig-graph-compiler](https://github.com/krypticlogan/zig-graph-compiler)

Around February/March I got curious about zig comptime and how I could use it effectively. I figured I would use it to truly specialize a particular program, and the forward step for a neural network graph was a good task. I got it to work, but in my quest for optimization, I realized it might be better to just have an underlying tensor computation system that can specialize itself. That’s how I wound up with ZGC, and it’s reached a stage that I would like to share and gather feedback. Though it was a bit of a new domain for me, it felt like comptime made implementations easy to reason about and I’ve had a lot of fun working on it.

One problem that I’ve begun to run into as the compiler (and compile-time work) grows is the eval branch quota. It’s simple enough to scale, but it also becomes user-facing at times. I’m not sure how this is properly dealt with, or more likely, is intentional design that I shouldn’t try to avoid?

### Supported Zig versions

0.16.0, 0.17.0 soon

### AI / LLM usage disclosure

LLMs assisted in problem-space exploration, architectural ideas/concerns, refactors, validation, and testing.  
Final implementation decisions were made by me, the developer, and any LLM-generated code was reviewed and edited by me.
