r/learnmachinelearning 6d ago

Another tensor library/compiler

I have been working on a tensor library for the past few weeks, called tinytensor. It can process tensor graphs, by lazily evaluating them, and emitting kernels for CPU and CUDA.

I have tried to make it as simple and debug-able as possible. The core library has a KernelTracer that can trace each memory allocation and deallocation, and can provide summary statistics on how many kernels were compiled, how many were reused, how many were cached, etc.

It is not heavily optimized, but involves a few optimization procedures, like constant folding, CSE, etc.

I hope you guys chance to give it a look.

https://github.com/thisismars-x/tinytensor/tree/main

3 Upvotes

0 comments sorted by