In newer versions operator registration api changed, you should type like this

static auto registry = torch::RegisterOperators(“my_ops::warp_perspective”, &warp_perspective);

Change your first line.