img2gray / torch-ext /torch_binding.cpp
drbh
fix: improve python bindings and sanity check
aca891a
raw
history blame contribute delete
383 Bytes
// torch-ext/torch_binding.cpp
#include <torch/library.h>
#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)