Write a custom CUDA kernel to optimize the `Gumbel CDF` as an activation function.

Formula: f(x) = exp(-exp(-x))

Problem Analysis:
1. Computationally Intensive: This operation involves a double exponential, which is arithmetically heavy for an element-wise activation.
2. Memory Bottleneck: A standard PyTorch implementation `torch.exp(-torch.exp(-x))` chains three separate kernels, creating two intermediate tensors and high memory traffic.
3. Numerical Stability: The inner `exp(-x)` can overflow if `x` is a large negative number.

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 Stable Math:
   - For each element `x`, first compute `inner_val = -x`.
   - Clamp `inner_val` to a safe upper bound (e.g., 80.0) to prevent `exp` overflow.
   - Compute `exp1 = __expf(clamped_inner_val)`.
   - Compute `result = __expf(-exp1)`.
   - All steps are fused in registers.

4. One-Pass: Fuse all logic 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)

class GumbelCDF(nn.Module):
    """
    Gumbel Cumulative Distribution Function (CDF).
    f(x) = exp(-exp(-x))
    """
    def __init__(self, clamp_val=80.0):
        super(GumbelCDF, self).__init__()
        self.clamp_val = clamp_val

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        neg_x = torch.clamp(-x, max=self.clamp_val)
        inner_exp = torch.exp(neg_x)
        return torch.exp(-inner_exp)

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

def get_inputs():
    # 覆盖正负区间
    input_tensor = torch.randn(SHAPE, dtype=torch.float32) * 20.0
    return [input_tensor.contiguous()]

def get_init_inputs():
    return []