// torch-ext/torch_binding.cpp #include #include "registration.h" // included in the build #include "torch_binding.h" // Declares our img2gray_cuda function TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) { ops.def("img2gray(Tensor input, Tensor! output) -> ()"); ops.impl("img2gray", torch::kCUDA, &img2gray_cuda); } REGISTER_EXTENSION(TORCH_EXTENSION_NAME)