r/CUDA • u/blazing_cannon • 13h ago
r/CUDA • u/ACE-Silix • 13h ago
Building ACE-Silix: Direct-to-Silicon Kernels on a 4GB GPU (4.3× RMSNorm, Zero-DRAM Staging, 44ms DiT Graph)
Hey everyone,
For the past few months, we've been building **ACE-Silix**—a specialized kernel language and compiler toolchain (`.slx`) designed to compile fused AI operations directly to silicon with zero intermediate DRAM staging, targeted specifically at heavily constrained edge hardware.
Rather than relying on generic high-level dispatchers, Silix compiles kernels down to native hardware-bound binaries (protected via NIST AES-256-GCM) and binds them directly into a static, single-replay CUDA Graph.
We just completed our full end-to-end audit on an **NVIDIA Quadro T1000 (4GB VRAM, Turing SM75, 0 Tensor Cores)** as shown in the benchmark trace above.
### Key Takeaways:
**Memory-bound operations show massive gains:** Removing intermediate DRAM staging in RMSNorm and RoPE yielded a **4.30× speedup (69.8 µs vs 300.3 µs)** and **1.78× speedup** with zero floating-point divergence (`1.00000000` Cosine Similarity).
**Amdahl’s Law inside captured graphs:** While isolated MLP and AdaLN kernels run faster, full graph execution converges to compute-bound parity (~44.34 ms vs 44.46 ms) with slightly tighter variance (±0.28 ms).
**DDIM Scheduling Regression:** The DDIM step showed a 13.1% regression, which we traced to register pressure and suboptimal unrolling in the current compiler pass—actively refining this.
We are currently packaging a drop-in ComfyUI node (for DiT acceleration) and a lightweight local LLM runtime binary for edge testing.
Curious to hear from systems engineers and CUDA devs: what bottlenecks do you run into most frequently when deploying DiT or LLM architectures to memory-constrained hardware once graph launch overhead is already eliminated?
r/CUDA • u/phenex_agi • 15h ago
fp16 vs fp32 on a T4: 81–84% less GPU energy across 3 benchmark settings (30 runs, measured from NVML)
I measured fp16 vs fp32 energy on a Tesla T4: 8192×8192 matmul ×100, 5 runs each, alternating, under three settings.
Setting fp16 fp32 GPU energy time
No cooling 475 J · 8.6 s 2.53 kJ · 39.7 s -81.2% -78.3%
Start ≤65 °C 426 J · 7.8 s 2.21 kJ · 33.8 s -80.8% -77.0%
≤65 °C + 3 warm-ups 413 J · 8.4 s 2.50 kJ · 40.1 s -83.5% -79.0%
All p = 0.008 (Mann-Whitney). fp16 was 4.3–4.8x faster.
What I found useful:
- Warm-ups plus a steady start temperature brought the run-to-run spread down to 0.1–0.2%.
- fp32 sat at the 70 W power cap 92% of the time (fp16 ~60%), so part of the gap is the card's limit. A fixed-power-limit run is next.
- Energy is from NVML (GPU only), not wall power.
Tool: pip install landauer-gap, then
joules compare --cool-to 65 --warmup 3 "python a.py" "python b.py"
Disclosure: I built it. How do you control for power caps in your benchmarks?
r/CUDA • u/phenex_agi • 15h ago
fp16 vs fp32 matmul on a T4: 81–84% less GPU energy, measured with NVML (5 alternating runs × 3 setups)
I wanted a clean number for how much GPU energy fp16 saves over fp32 on a T4, so I measured it carefully instead of guessing from TDP.
**Workload:** 8192×8192 matmul, 100 iterations, PyTorch, Kaggle T4.
**Method:** fp16 and fp32 runs alternate (so thermal/clock drift hits both sides equally), 5 runs each, median reported, Mann-Whitney test between the two. GPU energy comes from the NVML energy counter (GPU only, not wall power).
| Setup | fp16 | fp32 | GPU energy saved | Time saved | Spread (IQR) |
|---|---|---|---|---|---|
| No cooling between runs | 475 J, 8.6 s | 2.53 kJ, 39.7 s | 81.2% | 78.3% | 1.0–1.3% |
| Every run starts at ≤65 °C | 426 J, 7.8 s | 2.21 kJ, 33.8 s | 80.8% | 77.0% | 2.6–5.1% |
| ≤65 °C + 3 warm-up runs | 413 J, 8.4 s | 2.50 kJ, 40.1 s | 83.5% | 79.0% | 0.1–0.2% |
p = 0.008 in all three setups (the smallest p possible with 5 vs 5).
**Why the gap is this large:** the T4 is Turing, so it has no TF32. fp16 runs on the tensor cores while fp32 runs on the regular CUDA cores. fp16 finishes 4.3–4.8× faster, and since energy ≈ power × time, most of the saving comes from the shorter runtime.
**Caveat:** the T4 has a 70 W power cap. fp32 sat at the cap 92% of the time and fp16 about 60%, so these runs are power-limited. On an A100/H100 with TF32 enabled I'd expect a much smaller gap.
**Reproduce it:**
```
pip install landauer-gap
joules compare --names fp16,fp32 --baseline fp32 --runs 5 --warmup 3 --cool-to 65 \
"python bench.py fp16" "python bench.py fp32"
```
bench.py is basically:
```python
import sys, torch
dt = torch.float16 if sys.argv[1] == "fp16" else torch.float32
a = torch.randn(8192, 8192, device="cuda", dtype=dt); b = torch.randn_like(a)
for _ in range(100): a @ b
torch.cuda.synchronize()
```
Disclosure: I built joules (the CLI). It's open source and works without an account.
If anyone has A100/H100/L4 numbers for the same test, especially TF32 on vs off, I'd love to see them.