How to replace the default code for nn.conv2d at the target llvm

we want to use our ‘c’ code to run conv2d for the models such as “tutorials/frontend/from_onnx.py” at x86’s cpu, someone can give me some suggestion or demo for how to run our code to do conv2d ,thanks!

Hi @simplelins,

Do you want to offload the entire conv2d computation to your library? If yes, I think this might help: https://tvm.apache.org/docs/dev/relay_bring_your_own_codegen.html

thanks for your repaly, I only want to replace the conv2d computation and remain others for x86cpu. I dont know how to regesiter my conv2d computation api to tvm,and when run the model that will call my computation api to do the work.