[BYOC] Overall questions

Hi, I have been following TVM for a little while and trying to get my grip around BYOC but always felt like missing some bits. Here a summary of my understanding and a few questions that I have:

Under BYOC there are two approaches:

  • normal runtime
  • microtvm aot runtime

Under the normal runtime approach there are two ways:

  • C code generator → extend the provided C codegen base class
  • Any other graph representation → create your own runtime module type and codegen for it

Now if you are providing a new hardware there is also the device api to implement for the normal runtime case. Is it supposed to handle memory copies within different scopes on the hardware? Does that mean I don’t have to codegen myself memory operations?

Also for a new type of hardware I need to legalize operations. However I haven’t found what was the canonical way to register the legalisations for the codegen.

Can anyone help me with this?