# Quattra Kernel #1: Benchmark Receipt

**Kernel:** skew\_tiled vs. two controls (NaiveCond and a 16x16 block-launch kernel) **Date:** 2026-11-08 **Source code:** not published

## Summary

- **Speed:** skew\_tiled is about **1.10x faster** than the best control at grid sizes L=4096 and L=8192, roughly a 9% reduction in time per launch. Peak speedup was 1.137x at L=512.
- **Where it does not help:** L=2048 is a tie or slight loss (0.995x) and failed the pass rule. Small sizes swing between runs, so only 4096 and 8192 are claimed.
- **Energy:** at L=8192, energy per launch was about 0.653 J for the 16x16 control and about 0.624 J for skew\_tiled. That 4% difference is inside skew\_tiled's 10% run-to-run spread, so energy per launch is **not distinguishable** from the control. No energy saving is claimed.
- **Takeaway:** about 9% less time per launch at roughly the same energy per launch.

## Test environment

- **GPU:** NVIDIA A40, 46,068 MiB (marketed as 48 GB), 300 W power limit, 6.0 MB L2 cache
- **Driver:** 595.91.07 (supports CUDA 13.2)
- **Framework:** PyTorch 2.8.0 (built for CUDA 12.8)
- **Precision:** float32
- **Correctness:** every kernel's output was checked against a float64 reference, absolute tolerance 1e-5, before timing.

## Method 1: speed (bench\_tiled.py)

- Four kernels timed: NaiveMod, NaiveCond, 16x16 block-launch, skew\_tiled.
- 3 interleaved rounds per L, with kernel order rotated each round. Each round is the median of 20 batches of 20 launches. The table reports the median of the three round medians.
- Speedup is measured against the **faster of NaiveCond and the 16x16 control** at each L.
- Pass rule, set before the run: speedup of at least 3% **and** the slowest skew round beats the fastest control round. Large sizes were 2048, 4096 and 8192, and 2 of 3 had to pass.
- Result: **2 of 3 passed** (4096 and 8192). 2048 did not.

| Grid size L | Speedup vs best control | Note |
| --- | --- | --- |
| 512 | 1.137x | peak |
| 1024 | 1.050x |  |
| 2048 | 0.995x | tie or slight loss, failed pass rule |
| 4096 | 1.102x | passed |
| 8192 | 1.102x | passed |

Sizes below 512 are not shown here. Paste them from the raw bench output so losses at small sizes are printed too.

**Run-to-run variation:** an earlier run showed L=2048 near +4% and L=1024 near 1.08x, against 0.995x and 1.05x here. Margin sizes move by several percent, which is why only 4096 and 8192 are claimed.

## Method 2: energy (duel\_energy.py v5)

- L=8192, pitch 8192, 3 runs of 500 launches per kernel.
- Energy from the NVML total-energy counter. These are **gross board joules**, not idle-subtracted.
- The wall time column is the total for 500 launches.

| Kernel | Run | Wall (ms, 500 launches) | Energy (J) | Implied avg power (W) |
| --- | --- | --- | --- | --- |
| 16x16 control | 0 | 1128.991 | 323.277 | 286 |
| 16x16 control | 1 | 1128.981 | 327.533 | 290 |
| 16x16 control | 2 | 1129.106 | 328.213 | 291 |
| skew\_tiled | 0 | 1029.391 | 310.635 | 302 |
| skew\_tiled | 1 | 1030.746 | 297.747 | 289 |
| skew\_tiled | 2 | 1030.776 | 327.522 | 318 |

- **Averages:** 16x16 about 0.653 J per launch and 2.258 ms per launch. skew\_tiled about 0.624 J per launch and 2.059 ms per launch. Speed ratio 1.097x, matching the bench result at L=8192 (1.102x).
- **Spread:** 16x16 energy varied about 1.5% across runs. skew\_tiled varied about 10.0%, which is at the noise threshold.
- **Power:** implied average power was about 289 W for the control and about 303 W for skew\_tiled, but skew's three runs ranged from 289 to 318 W. The 318 W figure is a calculation (327.5 J over about 1.03 s) and is above the 300 W cap. The cause is unconfirmed, so no claim is made about why energy per launch came out flat.

## Caveats

- One kernel on one GPU, at one problem structure. Nothing here says how it behaves on other cards.
- A pre-run cooldown (27 C, 33 W, P8, no processes) was logged before the skew runs. An equal cooldown was not logged for the control runs, which is a possible confound.
- Run-to-run variation at small and mid sizes is several percent.
- An early run reported a 94% energy reduction. It was not reproducible, its cause is unconfirmed, and it is excluded from every number above.
- The fix list for this receipt: add the winning control kernel per L from the raw bench output, and add the small-size rows.
