Write a custom CUDA kernel to optimize `AHerfReLU`.

Formula:
  f(x) = x                                 if x >= 0
  f(x) = alpha * x * erf(x) / (1 + x^2)    if x < 0

Problem Analysis:
1. Computationally Intensive & Memory Bound: The operation is element-wise but involves the expensive `erf` function and several arithmetic operations for the negative part.
2. Operator Chaining: A PyTorch implementation using `torch.where` would create multiple intermediate tensors.

Optimization Strategy: Fused Element-wise Kernel with Vectorization

1. One-Thread-per-Element: Map each element to a CUDA thread.

2. Vectorized Loads (float4): Use `float4` to process 128 bits per memory transaction.

3. Fused Branching Logic:
   - For each element `x`, check `if (x < 0)`.
   - If true, compute `erf_val = erff(x)`, `denom = 1.0f + x*x`, `result = alpha * x * erf_val / denom`.
   - If false, result is `x`.

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 = 4096
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

# AHerfReLU 超参数 alpha ,论文中设为 0.87
ALPHA_VALUE = 0.87

class AHerfReLU(nn.Module):
    '''
     "AHerfReLU: A Novel Adaptive Activation Function Enhancing Deep Neural Network Performance" (Complexity, 2025)
     https://onlinelibrary.wiley.com/doi/full/10.1155/cplx/8233876
     Formula:
      f(x) = x                                 if x >= 0
      f(x) = alpha * x * erf(x) / (1 + x^2)    if x < 0
    '''
    def __init__(self, alpha=0.87):
        super(AHerfReLU, self).__init__()
        self.alpha = alpha

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        pos_part = x
        neg_part = self.alpha * x * torch.erf(x) / (1 + x.pow(2))
        return torch.where(x >= 0, pos_part, neg_part)

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

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

def get_init_inputs():
    return [ALPHA_VALUE]