| // torch-ext/torch_binding.cpp | |
| 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) | |
| // torch-ext/torch_binding.cpp | |
| 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) | |