Error Reporting

I love the idea (and syntax & format) of the proposed diagnostic mechanism. It is beautiful and accurate.

I was wondering if it is possible to expand the scope of diagnostic. Right now, it works with Relay IR (IIUC), but I was thinking if it could be extended to

  • TIR hybrid script
  • The new TIR scheduling primitives
  • Target creation w/ tvm::Map and raw string

It is easier to enable working with Target creation, as long as we enable error reporting on generic tvm::Map and tvm::Array, we can accurately report which item causes trouble. Working with TIR hybrid script should be conceptually easy too, as the span information are naturally preserved in the parser (implemented by @spectrometerHBH). It is worth thinking the case working with scheduling primitives too.