Optimize data movement (#20)
This commit is contained in:
12
csrc/activation.cpp
Normal file
12
csrc/activation.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include <torch/extension.h>
|
||||
|
||||
void silu_and_mul(
|
||||
torch::Tensor& out,
|
||||
torch::Tensor& input);
|
||||
|
||||
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
|
||||
m.def(
|
||||
"silu_and_mul",
|
||||
&silu_and_mul,
|
||||
"Activation function used in SwiGLU.");
|
||||
}
|
||||
Reference in New Issue
Block a user