def causal_conv1d_fn(
        cls,
        x: torch.Tensor,
        weight: torch.Tensor,
        bias: Optional[torch.Tensor] = None,
        initial_states: Optional[torch.Tensor] = None,
        return_final_states: bool = False,
        final_states_out: Optional[torch.Tensor] = None,
        activation: Optional[str] = "silu",
    ):
        """
        x: (batch, dim, seqlen)
        weight: (dim, width)
        bias: (dim,)
        initial_states: (batch, dim, width - 1)
        final_states_out: (batch, dim, width - 1)

        out: (batch, dim, seqlen)
        """
        if activation not in [None, "silu", "swish"]:
            raise NotImplementedError("activation must be None, silu, or swish")
        out, final_states_out = torch.ops.torch_ipex.causal_conv1d_fn(
            x, weight, bias, initial_states, final_states_out, activation == "silu"
        )
        return (out, None) if not return_final_states else (out, final_states_out)

        x: (batch, dim, seqlen)
        weight: (dim, width)
        bias: (dim,)
        initial_states: (batch, dim, width - 1)
        final_states_out: (batch, dim, width - 1)

        out: (batch, dim, seqlen)
        
intel_extension_for_pytorch/transformers/models/cpu/fusions/mha_fusion.py