C code generator

Dear contributors,

I’d like to generate C code from tvm and found a related issue:

Follow me, the tvm::codegen::CodeGenC function may provide the C source code from TVM program but it is not currently enabled .

My question is that there are any ways to enable this feature or another method to generate C code from TVM program?

Regards

no, it is not possible. tvm::codegen::CodeGenC is only meant to be used internally by other C-like code generators such as cuda and opencl.

2 Likes

Thanks you for your response,

Is there another way to generate C code from TVM program or work-around, follow you?

no, as far as I know.

1 Like

related Will TVM suppurt GCC as an optional CPU compiler?

1 Like

Any update on this topic?
This might actually be an interesting use case if one wants to use TVM as a source-to-source compiler.

yes, we now have it.

Is there example to generate C code from host?

I have the same question.

I would like to generate the code C out of a given input model. Is there any example available? I have not been able to find it.

Thanks

Hello, did you solve this question? I’m also confused with this problem.

hey did you find out a way how to do this

Thanks