C code generator


#1

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


#2

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.


#3

Thanks you for your response,

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


#4

no, as far as I know.


#5

related Will TVM suppurt GCC as an optional CPU compiler?


#6

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.


#7

yes, we now have it.


#8

Is there example to generate C code from host?