def gelu_mul(
    x: torch.Tensor, y: torch.Tensor, out: torch.Tensor = None, approximate="none"
):
    r"""
    Applies PyTorch gelu on input x, and mul input y:
    out = gelu(x)*y

    Args:
        x (torch.Tensor): input to apply gelu.
        y (torch.Tensor): input for mul to apply on gelu(x).
        out (torch.Tensor): buffer to get the results.
        approximate (str): approximate config for gelu.

    """
    f = _get_function_from_device(x.device.type, gelu_mul)
    return f(x, y, out, approximate)

    Applies PyTorch gelu on input x, and mul input y:
    out = gelu(x)*y

    Args:
        x (torch.Tensor): input to apply gelu.
        y (torch.Tensor): input for mul to apply on gelu(x).
        out (torch.Tensor): buffer to get the results.
        approximate (str): approximate config for gelu.

    
intel_extension_for_pytorch/llm/functional/fusions.py