Benchmarking an RTX 3060
and a Snapdragon NPU

Time per operation, gains from compilation, and GPU energy use

I wanted to see how the same neural-network operations behave on my laptop's RTX 3060 and a Snapdragon 8 Gen 3 through Qualcomm AI Hub. I tested matrix multiplication, convolution + ReLU, and RMSNorm, then inspected how compilation changed the work.

Measured results
  • Execution time: GPU replay was fastest across all 12 matched shapes. The largest matrix multiplication took 177 µs on the GPU versus 742 µs on the NPU.
  • Compilation: FP16 RMSNorm at 32×1024 dropped from 13.18 to 1.31 µs per operation on the GPU: a 10.05× speedup.
  • GPU energy: that workload used 89% less energy per operation when compiled in this run, despite higher average power during sustained replay.

The setup

RTX 3060 LaptopSnapdragon 8 Gen 3
Device6 GiB GPU · WSL2Galaxy S24 · Hexagon v75 NPU
SoftwarePyTorch 2.11 · CUDA 12.8QNN · QAIRT 2.50
PrecisionFP16 and FP32FP16 requested; FP32 input/output
TimingRecorded replay and Python callsCalls through Qualcomm's QNN runtime

The cross-device cases share logical inputs and weights. Outputs are checked against a CPU FP64 reference; remote profiles are checked for NPU placement. The main GPU sweep passed all 56 configurations; the NPU studies passed 108 jobs. Transfers and compilation are outside these timings.

Matmul: K = N = 1024. Convolution: batch 1, 32→64 channels, 3×3 + ReLU. RMSNorm: width 1024. GPU: 25 timing blocks per configuration in one AC session; clocks unlocked, TF32 and cuDNN autotuning off. NPU: three jobs per setting, with cloud device assignment uncontrolled.

1GPU vs. NPU: time per operation

The RTX 3060 with replay has the lowest measured time at all 12 tested shapes. The vertical axis is microseconds (µs) per completed operation: lower is faster. For matrix multiplication, each operation multiplies an M×1024 matrix by a 1024×1024 matrix; the horizontal axis changes M, the number of input rows.

GPU replay repeats a recorded sequence of calls, reducing the CPU's work to launch them. GPU via Python includes Python issuing calls and waiting for completion. NPU via QNN times calls through Qualcomm's runtime. The GPU uses compiled FP16; the NPU requests FP16 with FP32 inputs and outputs.

Time per operation in microseconds. GPU replay is fastest at all twelve sizes. At 1,024 input rows, matrix multiplication takes 177 microseconds with GPU replay, 216 through Python, and 742 on the NPU through QNN.
Figure 1. Time per operation; lower is faster. Vertical ticks increase tenfold. GPU error bars cover the middle 80% of timing-block averages. NPU points summarize three job medians; bars show their range. Neither is a confidence interval. NPU convolutions use NCHW.

Matrix multiplication: at 1,024 rows, the GPU takes 177 µs with replay or 216 µs through Python, versus 742 µs on the NPU. The GPU is clearly faster for this case in both execution modes. At one row, Python and QNN are close, 97 versus 101 µs, while GPU replay takes 10.3 µs. For small repeated matrix jobs, reducing the cost of launching work is worth testing.

Convolution and RMSNorm: GPU replay is also fastest at every size. Including Python can reverse a comparison: the 16×16 convolution takes 160.5 µs through Python versus 79.0 µs through QNN, but only 8.31 µs in GPU replay. The winner depends on the execution mode; these paths include different work.

2Where compilation helps

This compares time per operation on the RTX 3060, using ordinary PyTorch (uncompiled) or torch.compile with Inductor. Both use recorded replay at the same precision. Speedup is uncompiled time ÷ compiled time: 2× means half the time; below 1× means the uncompiled version wins.

Compiled versus eager GPU speedup for all twelve shapes in FP16 and FP32. Matmul stays near one. FP16 convolution improves about 1.3 times; FP32 convolution slows down. RMSNorm improves about 10 times in FP16 and 3.5 to 6.3 times in FP32.
Figure 2. Ratios of median execution times; higher is better. Dashed 1× means no change; each tick doubles the ratio. FP16/FP32 use 16-/32-bit floating-point calculations. Compilation time is excluded.

Compilation wins most clearly for RMSNorm, which rescales each row. At 32×1024 in FP16, time falls from 13.18 to 1.31 µs (10.05×). The profiler shows nine GPU kernels, or pieces of GPU work, combined into one. This is where combining small steps pays off. Including Python calls reduces the speedup to 1.94× (153.25 to 78.95 µs).

For convolution, compiled wins in FP16; uncompiled wins in FP32. FP16 takes 21–25% less time after compilation. FP32 at 16×16 takes 16.51 µs compiled versus 10.27 µs uncompiled. Matrix multiplication stays near 1×, with no clear benefit.

Why did FP32 slow down? Changing memory layout can add data-reordering work. In my 16×16 follow-up, disabling layout optimization reduced time from 16.50 to 10.22 µs and removed those conversions. Kernel choice changed too, so I cannot attribute the entire gain to reordering. TF32 was off in both versions. The useful next check is the work the compiler added.

3GPU power and energy

This compares GPU energy per completed operation, in millijoules (mJ); lower is better. Each FP16 implementation ran for at least five seconds. I estimated energy from GPU power readings (NVML) over that interval, then divided by completed operations. This was separate from the timing measurements.

GPU energy per operation in millijoules. Compiled FP16 RMSNorm and convolution use less energy than uncompiled at every tested size. Matrix multiplication has no consistent winner. A custom RMSNorm kernel is also shown.
Figure 3. Same GPU, inputs and FP16 precision. The custom kernel combines RMSNorm's steps by hand. Vertical ticks increase tenfold. Each point is one measurement window; uncertainty across runs is unmeasured.

Compiled beats uncompiled on energy for RMSNorm and convolution at every tested size. Matrix multiplication has no consistent winner. At 32×1024 RMSNorm, the custom kernel uses the least energy in this run:

ImplementationAverage GPU power (W)Energy (mJ/op)
Uncompiled59.490.7564
Compiled64.050.0833
Custom kernel61.120.0761

Higher power can still mean less energy per job. Compiled RMSNorm draws 64.05 W versus 59.49 W, yet uses 89% less energy per operation. Finishing sooner more than offsets the higher power. That is why energy per completed operation matters when choosing an implementation.

GPU readings include baseline and background activity; no idle subtraction. One session with unlocked clocks needs independent repeats before treating the percentages as stable.

NPU energy was unavailable. There is no GPU/NPU efficiency ranking here; latency alone cannot supply one.

4NPU convolution: does layout help?

Channels-last wins at 64×64: 142 versus 207 µs per operation, or 31% less time. This changes how data is arranged, keeping the NPU, logical inputs, weights and requested precision fixed.

Layout and preparation results

Channels-first (NCHW) groups values by channel; channels-last (NHWC) puts a pixel's channels together. The first panel measures time per operation; lower is faster. The second counts data-reordering steps in a separate NPU profile.

Channels-last NPU convolution takes 142 microseconds versus 207 for channels-first at 64 by 64, with 0 versus 18 transpose steps in the profile. The 32 by 32 timing ranges overlap.
Figure 4. Time: three job medians and their range, measured through QNN. Reordering: transpose count from the first-repeat NPU profile, not a duration. External data reordering is excluded from timing.

Choosing the input/output layout can save work without changing the math. At 64×64, the profile's transpose count drops from 18 to zero; other format operations remain. At 32×32, overlapping timing ranges leave no clear winner. The benefit assumes the surrounding pipeline already uses the chosen layout.

An audit also caught preparation options sent only at conversion in the original sweep. The corrected experiment sets them during device preparation: O1 produces fewer recorded operations than O3, 24 versus 47, yet takes 91 versus 80 µs. O3 wins on time in this case; a smaller operation count does not guarantee faster execution.

GPU layout measurements · Preparation audit · Corrected preparation results

A MobileNetV2 follow-up on one image preserved the reference's top prediction, but all 12 jobs failed the fixed per-score numerical tolerance. A CPU FP16 diagnostic also failed it. Those runs support no validated model speedup. The next step is to set an accuracy requirement on a representative dataset and repeat whole measurement sessions.

Data and reproduction

The figures use saved measurements; no new device runs were made for this article. The article figure script rebuilds all four charts. The companion notebook contains the layout example and full model checks.