* @file registration.cpp
*
* Copyright (C) 2024-2025. Huawei Technologies Co., Ltd. All rights reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <torch/library.h>
#include <torch/extension.h>
#include "function.h"
TORCH_LIBRARY(myops, m) {
m.def("add_custom(Tensor self, Tensor other) -> Tensor");
m.def("add_custom_backward(Tensor self) -> (Tensor, Tensor)");
}
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("add_custom", &add_custom_autograd, "x + y");
}