[BYOC] details about BYOC (newbie)

  1. Yes, because the codegen is now a part of TVM shared library. However, cmake with ccache should save your time for unchanged files.
  2. As the document indicates, you should apply a series of passes from AnnotateTarget to PartitionGraph. After that, you could print the IR to see if there’s any Relay function with attribute kCopiler="your-codegen-name". If so, then your codegen will be used when calling relay.build.
  3. Yes.
  4. As you already answered.
  5. I don’t understand this question, but a Relay program must have an output, and you cannot print message inside the Relay function. The error you got is a misuse. You should still use llvm as the target, which is the target for “non-offloaded” parts of the model. Again, as long as your IR includes function with kCompiler=your-codegen-name, then it will be offloaded to your codegen whatever the target you specify.