I’ve been building my own BYOC backend, following the docs on BYOC, i.e., heavily based on the codegen_c example.
It was working okay, but then I started getting the InternalError: Check failed: type_code_ == kTVMStr (8 vs. 11) : expected str but got Object in some cases.
I was able to solve it in some cases by removing (at random) some of my Relay transforms (of which I’ve got a few).
E.g., removing this allowed codegen to work for my single layer float32 model:
# seq_wug = tvm.transform.Sequential(
# [
# transform.InferType(),
# transform.FoldConstant(),
# ]
# )
# with tvm.transform.PassContext(opt_level=3):
# mod = seq_wug(mod)
However, I’m still having this problem with my single layer int8 quantised model, even though it is following the same code path (I treat qnn.conv2d and nn.conv2d the same, and this is the only op I handle in my BYOC for now).
Are there any more recent tips on debugging this behaviour in TVM for BYOC?