Thanks. import torch, my_conv works.
But when I run it
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dynamic module does not define module export function (PyInit_my_conv)

It seems I need to write function warppers via Pybind11. But I don’t know how to warp a cuda function like this:
void f(THCTensor *input, THCTensor *output, THCTensor *weight, THCTensor *bias);

I have refered https://github.com/pytorch/extension-cpp 6. But it is not suitable for my case.
Is there solutions of my problem?