I’m not good at cuda programming, so I use “tvm.te” to describe my custom operator and use “auto_scheduler” to optimize it. I successfully compiled the obtained best operator and called it in the calculation of the pytorch framework.
However, when I convert the model from pytorch to tvm.relay, I have a problem applying custom operators. I can’t introduce my operator into the neural network under tvm.relay.
I also thought about using tvm.te to build a custom calculation function, directly replace it into the model, and use auto_scheduler to optimize the entire model. This may optimize the custom operator at the same time. But I still can’t find how to register and use my operator in the model.
How should I register an operator and introduce it into the model while ensuring that it can be optimized using auto_scheduler. Or is there any other better way to introduce a custom operator to a model and use auto_scheduler to optimize it. thank you very much