Write a custom CUDA kernel to optimize `xSiLU` (Expanded SiLU) using `float64` (double) precision.

Formula: f(x) = x * (sigmoid(x) * (1 + 2*alpha) - alpha)

Problem Analysis:
1. Precision Issues with float32: The chain of operations `exp`, `div`, `mul`, `sub` accumulates rounding errors. Different implementation paths (PyTorch JIT vs. custom CUDA kernel) lead to small discrepancies that can exceed `1e-5` tolerance for `float32`.
2. Memory Bottleneck: The operation is still memory-bound, but now with double the data size (8 bytes per element).

Optimization Strategy: Fused Element-wise Kernel with Double Precision

1. Data Type: All computations are performed in `double` precision to guarantee accuracy alignment with the `float64` baseline.

2. Vectorized Loads (double2): Use `double2` to load 128 bits (2 double elements) per memory transaction. This maintains memory access efficiency despite the larger data type.

3. Fused In-Register Math:
   - Pre-compute `(1 + 2*alpha)` on the host.
   - Kernel logic:
     `sig = 1.0 / (1.0 + exp(-x))`
     `gate = sig * scale - alpha`
     `result = x * gate`
   - Use standard `double` precision math functions (`exp`, `fabs`).

4. One-Pass: Fuse all steps into a single read-compute-write kernel.

Here's an example to show you the syntax of inline embedding custom CUDA operators in torch: The example given architecture is:   
  
```python
import torch
import torch.nn as nn

BATCH_SIZE = 4096
HIDDEN_DIM = 8192
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

ALPHA_VAL = 0.3

DTYPE = torch.float64

class xSiLU(nn.Module):
    """
    Expanded SiLU (xSiLU)
    https://arxiv.org/html/2411.13010v1
    f(x) = x * (sigmoid(x) * (1 + 2*alpha) - alpha)
    """
    def __init__(self, alpha=0.3):
        super(xSiLU, self).__init__()
        self.alpha = alpha

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        sig = torch.sigmoid(x)
        scale = 1.0 + 2.0 * self.alpha
        gate = sig * scale - self.alpha
        return x * gate

class Model(nn.Module):
    def __init__(self, alpha=0.3):
        super(Model, self).__init__()
        self.act = xSiLU(alpha=alpha)
    
    def forward(self, x):
        return self.act(x)

def get_inputs():
    input_tensor = torch.randn(SHAPE, dtype=DTYPE)
    return [input_tensor.contiguous()]

def get_init_inputs():
    return [ALPHA_VAL]