[misc] remove python function call for custom activation op (#11885)
Co-authored-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
@@ -34,33 +34,6 @@ else:
|
||||
from torch.library import impl_abstract as register_fake
|
||||
|
||||
|
||||
# activation ops
|
||||
def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> None:
|
||||
torch.ops._C.gelu_and_mul(out, x)
|
||||
|
||||
|
||||
def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> None:
|
||||
torch.ops._C.gelu_tanh_and_mul(out, x)
|
||||
|
||||
|
||||
def fatrelu_and_mul(out: torch.Tensor,
|
||||
x: torch.Tensor,
|
||||
threshold: float = 0.0) -> None:
|
||||
torch.ops._C.fatrelu_and_mul(out, x, threshold)
|
||||
|
||||
|
||||
def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> None:
|
||||
torch.ops._C.gelu_fast(out, x)
|
||||
|
||||
|
||||
def gelu_new(out: torch.Tensor, x: torch.Tensor) -> None:
|
||||
torch.ops._C.gelu_new(out, x)
|
||||
|
||||
|
||||
def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> None:
|
||||
torch.ops._C.gelu_quick(out, x)
|
||||
|
||||
|
||||
# page attention ops
|
||||
def paged_attention_v1(
|
||||
out: torch.Tensor,
|
||||
|
||||
Reference in New Issue
Block a user