Objective: Replace PyTorch operations with a single fused CUDA kernel for LogCosh-Affine-Gate to achieve ≥1.3x speedup while matching outputs within rtol=1e-3.

Constraints:
- Keep the 4-file structure identical to `example` folder: `cudacode.py`, `torchcode.py`, `run_code.py`, `prompt.txt`.
- The fused kernel must compute: `z = x*scale + bias; v = log(cosh(z)); g = sigmoid(alpha*v + beta); y = x*g`.
- Use numerically stable math and avoid NaNs for typical random inputs.
- Exploit GPU multi-threading aggressively and minimize memory traffic via fusion.

Design Guidelines:
- Launch one block per row with 256–512 threads, and set `grid.y` to split long rows for higher SM occupancy.
- Prefer vectorized loads/stores (`float4`) on aligned paths, and fallback to scalar path otherwise.
- Use FMA for affine and gate preparation to reduce instruction count and rounding.
- Use fast intrinsic `__expf` for the sigmoid path, verify accuracy under rtol=1e-3.
- Keep reductions out of the hot path; this kernel is purely elementwise and memory-bound.

Benchmark Setup:
- Batch size: 16, Dimension: 16384.
- Measure average latency over 100 iterations for both PyTorch and the fused CUDA kernel.
- Report precision alignment and speedup. Target speedup ≥1.3x.
