I can add this line to test_target_codegen_c_host.py to see the generated code, and I can check the generated cod by this line
print(mhost.get_source())
However the generated code doesn’t seem like it is from codegen.cc.
So my question is what target should I put in tvm.buil to generate the C code from codegen.cc .
The C codegen you pointed out in BYOC is only used to demonstrate how BYOC works, so TVM backend for CPU doesn’t go through it.
Instead, TVM backend for CPU directly generates LLVM IR, so you won’t get the generated C source code. Although TVM does have C codgen base class, it is an abstract class and derived for OpenCL code generation for GPUs.