Questions when intergrates tvm as a compiler backend

Hi,

I am trying to use TVM relay as a compiler backend for some AI framework. The general idea is to convert op to tvm relay IR, then compile/codegen to target binary and execute with tvm runtime.

However, though TVM has C++ relay api, I noticed that relay’s schedule registrations are done in python (python/tvm/relay/op/_tensor.py). Which means, to use default registrations, I have to include from tvm import relay in python scripts.

Another thing I haven’t figured out is, how to use auto scheduler for optimization, as C++ APIs of Ansor auto-scheduler asked, is there any doc or more testcases I could use as a reference?