How to register FTVMSchedule for new relay op


#1

I am practicing adding new relay operation based on
https://docs.tvm.ai/dev/relay_add_op.html

However, when i try to test, it raises

TVMError: Check failed: idx < data_.size() && data_[idx].second != 0: Attribute FTVMSchedule has not been registered for Operator myadd

Actually i am mocking other operations’ implementation (especially add), but i cannot find where they register FTVMSchedule.
Could you give me some guide??


#2

This is usually defined in Python. So for example, if you define your op’s call to _make in python/tvm/relay/op/tensor.py, the schedule and op pattern are usually defined in python/tvm/relay/op/_tensor.py

There are lots of examples in the _*.py files.


#3

thanks!!
I did not think to check those _*.py files