File size: 604 Bytes
8996239 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <torch/library.h>
#include "registration.h"
#include "torch_binding.h"
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
ops.def("causal_conv1d(Tensor! out, Tensor input) -> ()");
#if defined(CPU_KERNEL)
ops.impl("causal_conv1d", torch::kCPU, &causal_conv1d);
#elif defined(CUDA_KERNEL) || defined(ROCM_KERNEL)
ops.impl("causal_conv1d", torch::kCUDA, &causal_conv1d);
#elif defined(METAL_KERNEL)
ops.impl("causal_conv1d", torch::kMPS, causal_conv1d);
#elif defined(XPU_KERNEL)
ops.impl("causal_conv1d", torch::kXPU, &causal_conv1d);
#endif
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME) |