activation.cpp 247 B

123456789101112
  1. #include <torch/extension.h>
  2. void silu_and_mul(
  3. torch::Tensor& out,
  4. torch::Tensor& input);
  5. PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
  6. m.def(
  7. "silu_and_mul",
  8. &silu_and_mul,
  9. "Activation function for SwiGLU.");
  10. }