[Kernel][CPU] Add Quick gelu to CPU (#5717)

This commit is contained in:
Roger Wang
2024-06-20 23:39:40 -07:00
committed by GitHub
parent d9a252bc8e
commit bd620b01fb
4 changed files with 29 additions and 0 deletions

View File

@@ -58,6 +58,10 @@ TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
ops.def("gelu_fast(Tensor! out, Tensor input) -> ()");
ops.impl("gelu_fast", torch::kCPU, &gelu_fast);
// Quick GELU implementation.
ops.def("gelu_quick(Tensor! out, Tensor input) -> ()");
ops.impl("gelu_quick", torch::kCPU, &gelu_quick);
// Layernorm
// Apply Root Mean Square (RMS) Normalization to the input tensor.
ops.def(