CodeGen to convert Pytorch graphs to C code?

Is there a recommended (or any) way to generate C code corresponding to a pytorch graph computation? I have seen https://github.com/lantiga/pytorch2c, but it seems like that is no longer supported. That page has talk of some native capabilities coming to Pytorch, but I’m not sure I can find them.

Is this something that is possible?

Context: Pytorch is great, but the python surrounding it can be slow. I am hoping that I can use pytorch to create my graph, output it to C, and compile it for large speedups.

Normally, by vectorizing things, the performance hit of using python is very low. Your use-case is therefore I think uncommon, and likely to be weakly supported IMHO. For sections of your own code with tight inner-loops, and which arent obviously vectorizable (topic model comes to mind, as something that is hard to parallelize), could Cython help?