bitnet_kernel / torch-ext /torch_binding.cpp
medmekk's picture
medmekk HF Staff
Upload custom kernels
827249e verified
#include <torch/library.h>
#include "registration.h"
#include "torch_binding.h"
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
ops.def("bitlinear_int8xint2_cpp(Tensor input0, Tensor input1, Tensor s, Tensor ws) -> Tensor");
ops.impl("bitlinear_int8xint2_cpp", torch::kCUDA, &bitlinear_int8xint2_cpp);
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME)