Hi,
I am a beginner with TVM and trying the BYOC example tutorial for the JSON codegen and runtime. I have enabled the DNNL codegen in the config.cmake and am able to generate the json output corresponding to module using the following code.
mod = relay.transform.AnnotateTarget(["dnnl"])(mod)
mod = relay.transform.MergeCompilerRegions()(mod)
mod = relay.transform.PartitionGraph()(mod)
graph_json, lib, params = relay.build(mod, target='llvm')
print('Graph json:', graph_json)
I have the following questions:
- Why is the target “llvm” and not “DNNL” which was registered in the codegen.cc ?
- For a custom code generator, would it mean that the target would be still “llvm” ?
- Is it possible to write a code generator without a runtime?
- In case I would like to compile the generated json along with the parameters into executable outside the TVM environment for a custom accelerator, what would be the role of the lib generated by relay.build ()?
Regards, Debjyoti