for k in window direct; do for b in 250 2000 4000; do
>   M="--cache-control none --kernel-name regex:fill_ --launch-skip 5 --launch-count 5 --print-summary per-kernel --metrics gpu__time_duration.avg,lts__t_sector_hit_rate.pct,dram__bytes_read.sum,dram__bytes_write.sum"
>   ncu $M python nsys_hist_probe.py u16 20000 $b 1024 4096 --kernel $k 2>&1 | grep -E "^dtype|duration|hit_rate|dram__|Error|error"
> done; done | tee $R/pixelMajor/ncu.txt


dtype=uint16  N=20000  n_bins=250  batch=1024  chunk=4096  range=[4171, 5744)  bin width=6.29  kernel=window
    dram__bytes_read.sum             Mbyte  499.27  499.50  499.39
    dram__bytes_write.sum            Mbyte  125.38  125.49  125.43
    gpu__time_duration.avg              ms    3.46    3.48    3.47
    lts__t_sector_hit_rate.pct           %   52.54   52.60   52.57
dtype=uint16  N=20000  n_bins=2000  batch=1024  chunk=4096  range=[4171, 5744)  bin width=0.79  kernel=window
    dram__bytes_read.sum             Mbyte  925.58  926.83  925.94
    dram__bytes_write.sum            Mbyte  354.67  355.72  355.03
    gpu__time_duration.avg              ms    5.95    6.13    6.05
    lts__t_sector_hit_rate.pct           %   63.00   63.14   63.08
dtype=uint16  N=20000  n_bins=4000  batch=1024  chunk=4096  range=[4171, 5744)  bin width=0.39  kernel=window
    dram__bytes_read.sum             Gbyte    1.90    1.91    1.90
    dram__bytes_write.sum            Gbyte    1.07    1.08    1.07
    gpu__time_duration.avg              ms    7.94    8.05    8.00
    lts__t_sector_hit_rate.pct           %   66.57   66.68   66.63
dtype=uint16  N=20000  n_bins=250  batch=1024  chunk=4096  range=[4171, 5744)  bin width=6.29  kernel=direct
    dram__bytes_read.sum             Gbyte    1.49    1.50    1.50
    dram__bytes_write.sum            Gbyte    1.69    1.70    1.70
    gpu__time_duration.avg              ms    9.21    9.28    9.26
    lts__t_sector_hit_rate.pct           %   86.50   86.86   86.68
dtype=uint16  N=20000  n_bins=2000  batch=1024  chunk=4096  range=[4171, 5744)  bin width=0.79  kernel=direct
    dram__bytes_read.sum             Gbyte    7.81    8.00    7.87
    dram__bytes_write.sum            Gbyte    4.24    4.29    4.26
    gpu__time_duration.avg              ms   21.23   21.70   21.39
    lts__t_sector_hit_rate.pct           %   65.91   66.48   66.18
dtype=uint16  N=20000  n_bins=4000  batch=1024  chunk=4096  range=[4171, 5744)  bin width=0.39  kernel=direct
    dram__bytes_read.sum             Gbyte    9.87   10.01    9.95
    dram__bytes_write.sum            Gbyte    4.74    4.76    4.75
    gpu__time_duration.avg              ms   24.73   25.03   24.94
    lts__t_sector_hit_rate.pct           %   62.68   62.89   62.74
(aare) ferjao_k@gpu103:~/.../tests/perf/hist (feature/cuda_pixelhistogram) $ for k in window direct; do for b in 250 500 1000 2000 4000; do
>   python cpu_vs_gpu.py --n-bins $b --threads 30 --batch 1024 --gpu-dtype u16 f32 f64 --kernel $k --csv $R/pixelMajor/runs.csv
> done; done
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 4.7 s
250 bins over [3500, 7500), 16.00 ADU per bin
uint16 -> float64 conversion: 2.31 s (not in the CPU time)
CPU (30 threads): 2.74 s, 7,309 frames/s
GPU u16 (window): fill 0.243 s, 82,244 frames/s, 12.2 us/frame | values() 0.012 s | total 0.255 s, speed-up 10.7x | identical: True
GPU f32 (window): fill 0.488 s, 40,982 frames/s, 24.4 us/frame | values() 0.008 s | total 0.496 s, speed-up 5.5x | identical: True
GPU f64 (window): fill 0.963 s, 20,767 frames/s, 48.2 us/frame | values() 0.007 s | total 0.970 s, speed-up 2.8x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 3.9 s
500 bins over [3500, 7500), 8.00 ADU per bin
uint16 -> float64 conversion: 2.26 s (not in the CPU time)
CPU (30 threads): 2.77 s, 7,224 frames/s
GPU u16 (window): fill 0.244 s, 82,065 frames/s, 12.2 us/frame | values() 0.019 s | total 0.263 s, speed-up 10.5x | identical: True
GPU f32 (window): fill 0.488 s, 40,948 frames/s, 24.4 us/frame | values() 0.014 s | total 0.503 s, speed-up 5.5x | identical: True
GPU f64 (window): fill 0.963 s, 20,760 frames/s, 48.2 us/frame | values() 0.014 s | total 0.977 s, speed-up 2.8x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 4.5 s
1000 bins over [3500, 7500), 4.00 ADU per bin
uint16 -> float64 conversion: 2.30 s (not in the CPU time)
CPU (30 threads): 3.02 s, 6,621 frames/s
GPU u16 (window): fill 0.243 s, 82,336 frames/s, 12.1 us/frame | values() 0.032 s | total 0.275 s, speed-up 11.0x | identical: True
GPU f32 (window): fill 0.488 s, 40,978 frames/s, 24.4 us/frame | values() 0.030 s | total 0.518 s, speed-up 5.8x | identical: True
GPU f64 (window): fill 0.963 s, 20,760 frames/s, 48.2 us/frame | values() 0.027 s | total 0.990 s, speed-up 3.1x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 5.5 s
2000 bins over [3500, 7500), 2.00 ADU per bin
uint16 -> float64 conversion: 2.30 s (not in the CPU time)
CPU (30 threads): 3.20 s, 6,247 frames/s
GPU u16 (window): fill 0.243 s, 82,206 frames/s, 12.2 us/frame | values() 0.058 s | total 0.301 s, speed-up 10.6x | identical: True
GPU f32 (window): fill 0.489 s, 40,930 frames/s, 24.4 us/frame | values() 0.056 s | total 0.545 s, speed-up 5.9x | identical: True
GPU f64 (window): fill 0.964 s, 20,748 frames/s, 48.2 us/frame | values() 0.053 s | total 1.017 s, speed-up 3.1x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 4.6 s
4000 bins over [3500, 7500), 1.00 ADU per bin
uint16 -> float64 conversion: 2.52 s (not in the CPU time)
CPU (30 threads): 4.34 s, 4,610 frames/s
GPU u16 (window): fill 0.244 s, 82,052 frames/s, 12.2 us/frame | values() 0.111 s | total 0.355 s, speed-up 12.2x | identical: True
GPU f32 (window): fill 0.489 s, 40,896 frames/s, 24.5 us/frame | values() 0.109 s | total 0.598 s, speed-up 7.3x | identical: True
GPU f64 (window): fill 0.964 s, 20,738 frames/s, 48.2 us/frame | values() 0.106 s | total 1.071 s, speed-up 4.1x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 4.5 s
250 bins over [3500, 7500), 16.00 ADU per bin
uint16 -> float64 conversion: 2.36 s (not in the CPU time)
CPU (30 threads): 2.80 s, 7,135 frames/s
GPU u16 (direct): fill 0.246 s, 81,412 frames/s, 12.3 us/frame | values() 0.012 s | total 0.257 s, speed-up 10.9x | identical: True
GPU f32 (direct): fill 0.486 s, 41,123 frames/s, 24.3 us/frame | values() 0.010 s | total 0.496 s, speed-up 5.6x | identical: True
GPU f64 (direct): fill 0.965 s, 20,717 frames/s, 48.3 us/frame | values() 0.007 s | total 0.972 s, speed-up 2.9x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 5.2 s
500 bins over [3500, 7500), 8.00 ADU per bin
uint16 -> float64 conversion: 2.39 s (not in the CPU time)
CPU (30 threads): 2.83 s, 7,060 frames/s
GPU u16 (direct): fill 0.249 s, 80,344 frames/s, 12.4 us/frame | values() 0.018 s | total 0.267 s, speed-up 10.6x | identical: True
GPU f32 (direct): fill 0.488 s, 41,022 frames/s, 24.4 us/frame | values() 0.014 s | total 0.502 s, speed-up 5.6x | identical: True
GPU f64 (direct): fill 0.967 s, 20,693 frames/s, 48.3 us/frame | values() 0.014 s | total 0.980 s, speed-up 2.9x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 4.8 s
1000 bins over [3500, 7500), 4.00 ADU per bin
uint16 -> float64 conversion: 2.40 s (not in the CPU time)
CPU (30 threads): 3.11 s, 6,437 frames/s
GPU u16 (direct): fill 0.250 s, 79,860 frames/s, 12.5 us/frame | values() 0.032 s | total 0.282 s, speed-up 11.0x | identical: True
GPU f32 (direct): fill 0.488 s, 40,981 frames/s, 24.4 us/frame | values() 0.030 s | total 0.518 s, speed-up 6.0x | identical: True
GPU f64 (direct): fill 0.967 s, 20,682 frames/s, 48.4 us/frame | values() 0.027 s | total 0.994 s, speed-up 3.1x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 5.1 s
2000 bins over [3500, 7500), 2.00 ADU per bin
uint16 -> float64 conversion: 2.27 s (not in the CPU time)
CPU (30 threads): 3.30 s, 6,064 frames/s
GPU u16 (direct): fill 0.286 s, 69,949 frames/s, 14.3 us/frame | values() 0.058 s | total 0.344 s, speed-up 9.6x | identical: True
GPU f32 (direct): fill 0.490 s, 40,794 frames/s, 24.5 us/frame | values() 0.056 s | total 0.546 s, speed-up 6.0x | identical: True
GPU f64 (direct): fill 0.969 s, 20,648 frames/s, 48.4 us/frame | values() 0.053 s | total 1.022 s, speed-up 3.2x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv
NVIDIA A100-SXM4-80GB, 0 MiB, 81920 MiB, 0 %
read (20000, 400, 400) uint16, 6.40 GB in 4.2 s
4000 bins over [3500, 7500), 1.00 ADU per bin
uint16 -> float64 conversion: 2.30 s (not in the CPU time)
CPU (30 threads): 4.88 s, 4,097 frames/s
GPU u16 (direct): fill 0.408 s, 48,976 frames/s, 20.4 us/frame | values() 0.111 s | total 0.519 s, speed-up 9.4x | identical: True
GPU f32 (direct): fill 0.500 s, 40,015 frames/s, 25.0 us/frame | values() 0.109 s | total 0.609 s, speed-up 8.0x | identical: True
GPU f64 (direct): fill 0.972 s, 20,576 frames/s, 48.6 us/frame | values() 0.106 s | total 1.078 s, speed-up 4.5x | identical: True
appended 3 rows to results/A100/2026-11-11_window/pixelMajor/runs.csv

