Write a custom CUDA kernel to optimize the DeepNorm operator using double precision (float64).

The mathematical definition is:
Output = LayerNorm(alpha * x + g_x)

Problem Analysis:
1. Precision: Floating point summation and variance calculations in `float32` can lead to accumulation errors compared to PyTorch's implementation (often `double` or `float` with higher precision accumulators for LayerNorm). We switch to `double` (float64) to match precision requirements.
2. Memory Bandwidth: The operation is memory-bound due to intermediate tensor read/write.

Optimization Strategy: Fused Register-Resident Kernel (Double Precision)

1. Data Type: Use `double` for all arithmetic operations.

2. Vectorized Access (128-bit): Use `double2` struct (2 doubles = 16 bytes) to perform 128-bit load/stores. This ensures optimal global memory throughput.

3. Fused Logic: Perform the fusion `alpha * x + g_x` and the LayerNorm statistics (Mean/Var) calculation in a single pass over the data resident in registers (or cached in L1).

4. Reduction: Use Warp and Block reductions in double precision.
  
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 = 1024 
HIDDEN_DIM = 2048 
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

DTYPE = torch.float64

# DeepNet Parameter
ALPHA_VAL = 0.81
EPS = 1e-5

class DeepNorm(nn.Module):
    def __init__(self, hidden_dim, alpha=0.81, eps=1e-5):
        super(DeepNorm, self).__init__()
        self.alpha = alpha
        self.eps = eps
        self.weight = nn.Parameter(torch.ones(hidden_dim, dtype=DTYPE))
        self.bias = nn.Parameter(torch.zeros(hidden_dim, dtype=DTYPE))

    def forward(self, x, gx):
        mixed = self.alpha * x + gx
        return torch.nn.functional.layer_norm(
            mixed, 
            x.shape[-1:], 
            self.weight, 
            self.bias, 
            self.eps
        )

class Model(nn.Module):
    def __init__(self, hidden_dim, alpha, eps):
        super(Model, self).__init__()
        self.norm = DeepNorm(hidden_dim, alpha, eps)
    
    def forward(self, x: torch.Tensor, gx: torch.Tensor) -> torch.Tensor:
        return self.norm(x, gx)

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

def get_init_inputs():
    return [HIDDEN_DIM,ALPHA_VAL,EPS]