The rest of ./reproduce.sh FWIW, less the instruction benchmarks (and probably the main point of this tool):
cudatest@cudamemtest:~/gpu-micro-bench$ make clean
rm -f bin/* ptx_dump/*
cudatest@cudamemtest:~/gpu-micro-bench$ make gen
python3 gen_arithm.py --gen-only
Generating 104 instruction benchmarks (208 kernels)...
Written: /home/cudatest/gpu-micro-bench/src/arithm_bench.cu (148638 bytes)
fp32: 20 ops — f32_add, f32_sub, f32_mul, f32_fma, f32_min, f32_max, f32_div_approx, f32_div_rn, f32_neg, f32_abs, f32_rcp_approx, f32_rcp_rn, f32_sqrt_approx, f32_sqrt_rn, f32_rsqrt, f32_sin, f32_cos, f32_lg2, f32_ex2, f32_tanh
fp16x2: 10 ops — f16x2_add, f16x2_sub, f16x2_mul, f16x2_fma, f16x2_neg, f16x2_abs, f16x2_min, f16x2_max, f16x2_tanh, f16x2_ex2
fp16: 10 ops — f16_add, f16_sub, f16_mul, f16_fma, f16_neg, f16_abs, f16_min, f16_max, f16_tanh, f16_ex2
bf16x2: 8 ops — bf16x2_add, bf16x2_sub, bf16x2_mul, bf16x2_fma, bf16x2_neg, bf16x2_abs, bf16x2_min, bf16x2_max
bf16: 6 ops — bf16_add, bf16_sub, bf16_mul, bf16_fma, bf16_neg, bf16_abs
int32: 24 ops — s32_add, s32_sub, s32_mul_lo, s32_mul_hi, s32_mad_lo, s32_mad_hi, s32_min, s32_max, s32_abs, s32_neg, s32_div, s32_rem, s32_mul24_lo, s32_mad24_lo, s32_sad, u32_add, u32_sub, u32_mul_lo, u32_mul_hi, u32_mad_lo, u32_min, u32_max, u32_div, u32_rem
bits: 8 ops — b32_and, b32_or, b32_xor, b32_not, b32_shl, b32_shr, s32_shr, b32_cnot
bitmanip: 7 ops — b32_popc, b32_clz, s32_bfind, b32_brev, s32_bfe, u32_bfe, b32_bfi
special: 8 ops — b32_lop3, b32_prmt, dp4a_ss, dp4a_uu, dp4a_su, dp4a_us, dp2a_lo_ss, dp2a_hi_ss
carry: 3 ops — s32_add_cc, s32_sub_cc, s32_addcc_addc
cudatest@cudamemtest:~/gpu-micro-bench$ ./reproduce.sh
==> Using /usr/bin/nvcc
==> Detecting GPU 0 ...
GPU: NVIDIA CMP 100-210 (sm_70, 68 SMs, 6144 KB L2)
==> Building benchmarks for sm_70 (this can take a minute) ...
build OK
========================================================================
gpu-micro-bench results
gpu_name=NVIDIA CMP 100-210 arch=sm_70 n_sms=68 l2_kb=6144
gpu_id=0
========================================================================
==> [1/4] memtest (memory subsystem) ...
===== BEGIN MEMTEST =====
GPU,NVIDIA CMP 100-210,sm_70,68,6144
LAT_WARM,2048,26.21,149.67,26.15,,10.1
LAT_WARM,4096,26.19,151.78,26.19,,10.2
LAT_WARM,8192,26.28,155.16,26.28,,10.4
LAT_WARM,16384,26.46,153.07,26.46,,10.3
LAT_WARM,32768,26.77,152.72,26.77,,10.3
LAT_WARM,65536,27.42,153.09,27.42,327.72,11.2
LAT_WARM,131072,63.82,153.09,42.19,316.41,14.6
LAT_WARM,262144,153.05,153.05,107.01,310.75,23.8
LAT_WARM,524288,153.05,153.05,130.58,307.44,28.1
LAT_WARM,1048576,153.07,153.05,142.52,306.40,35.0
LAT_WARM,2097152,153.02,153.03,149.27,306.13,54.9
LAT_WARM,4194304,152.95,152.94,150.94,305.73,110.0
LAT_WARM,8388608,305.29,305.30,303.23,305.42,339.6
LAT_WARM,16777216,305.62,305.58,304.68,305.64,680.5
LAT_WARM,33554432,305.43,305.42,304.99,305.45,1360.7
LAT_WARM,67108864,308.64,308.66,308.46,308.68,2750.7
LAT_WARM,134217728,310.37,310.35,310.25,310.35,5531.9
LAT_MULTI,2048,26.68,158.72,26.62,,4.2
LAT_MULTI,4096,26.73,170.14,26.73,,4.5
LAT_MULTI,8192,26.93,161.64,26.88,,4.3
LAT_MULTI,16384,27.34,160.15,27.29,,4.3
LAT_MULTI,32768,28.16,159.80,28.16,,4.3
LAT_MULTI,65536,29.85,160.20,29.85,188.04,4.9
LAT_MULTI,131072,68.71,160.15,47.16,175.34,6.4
LAT_MULTI,262144,160.15,160.15,113.92,169.67,10.4
LAT_MULTI,524288,160.15,160.10,139.72,167.76,12.6
LAT_MULTI,1048576,160.15,160.10,150.07,167.68,16.3
LAT_MULTI,2097152,160.15,160.10,155.14,168.98,23.4
LAT_MULTI,4194304,160.10,160.05,160.05,165.10,36.7
LAT_MULTI,8388608,309.96,300.90,300.70,295.62,115.1
LAT_MULTI,16777216,313.45,313.24,313.55,303.26,217.6
LAT_MULTI,33554432,312.68,312.73,312.68,308.24,422.8
LAT_MULTI,67108864,318.11,317.95,318.00,313.08,839.8
LAT_MULTI,134217728,319.59,319.59,319.44,318.81,1690.7
BW_WARM,65536,9.70,10.00,8.65,5.78,0.3
BW_WARM,131072,19.39,19.69,20.32,11.42,0.3
BW_WARM,262144,39.38,39.38,39.38,22.39,0.3
BW_WARM,524288,76.42,77.58,77.58,43.48,0.3
BW_WARM,1048576,144.23,150.59,136.53,82.25,0.3
BW_WARM,2097152,262.56,280.55,284.44,140.82,0.3
BW_WARM,4194304,476.28,460.22,460.22,223.98,0.4
BW_WARM,8388608,424.46,462.82,428.90,323.95,0.7
BW_WARM,16777216,497.99,510.40,499.51,411.46,1.2
BW_WARM,33554432,530.23,532.81,532.81,469.58,2.2
BW_WARM,67108864,549.80,549.34,553.51,519.92,4.3
BW_WARM,134217728,554.22,557.75,553.98,537.99,8.5
BLOCK_COST,68,1,7.537,7.537,0.4
BLOCK_COST,136,2,7.578,3.789,0.4
BLOCK_COST,272,4,7.700,1.925,0.4
BLOCK_COST,544,8,7.926,0.991,0.4
BLOCK_COST,1088,16,8.724,0.545,0.4
BLOCK_COST,2176,32,10.670,0.333,0.5
BLOCK_COST,4352,64,14.070,0.220,0.7
CONC_WARP,1,309.07,3.2355,15.5
CONC_WARP,2,311.40,6.4226,15.6
CONC_WARP,4,315.93,12.6612,15.8
CONC_WARP,8,322.56,24.8018,16.1
CONC_WARP,16,337.60,47.3931,16.9
CONC_WARP,32,358.81,89.1847,17.9
CONC_BLOCK,1,309.04,3.2359,15.5
CONC_BLOCK,2,308.97,6.4732,15.4
CONC_BLOCK,4,309.57,12.9211,15.5
CONC_BLOCK,8,313.65,25.5064,15.7
CONC_BLOCK,16,314.49,50.8753,15.7
CONC_BLOCK,32,314.65,101.7013,15.7
CONC_BLOCK,64,317.51,201.5694,15.9
CONC_BLOCK,68,317.70,214.0398,15.9
CONC_BLOCK,136,323.30,420.6646,16.2
CONC_BLOCK,272,332.82,817.2558,16.6
CONC_BLOCK,544,351.80,1546.3261,17.6
CONC_BLOCK,1088,395.15,2753.3843,19.8
L2_PERSIST,65536,2.41,7.78,0.1
L2_PERSIST,131072,3.88,17.19,0.1
L2_PERSIST,262144,7.63,33.39,0.1
L2_PERSIST,524288,15.88,64.00,0.1
L2_PERSIST,1048576,30.06,128.00,0.1
L2_PERSIST,2097152,66.94,239.38,0.1
L2_PERSIST,4194304,93.89,433.69,0.1
L2_PERSIST,8388608,155.02,405.10,0.2
L2_PERSIST,16777216,286.97,475.66,0.4
L2_PERSIST,33554432,461.93,514.68,0.7
L2_PERSIST,67108864,505.34,543.62,1.2
L2_PERSIST,134217728,529.72,548.67,2.5
===== END MEMTEST =====
==> [2/4] arithmtest (instruction throughput/latency) ...
===== BEGIN ARITHM =====
GPU,NVIDIA CMP 100-210,sm_70,68,6144
===== END ARITHM =====
==> [3/4] mmvq (Qwen3-8B Q1_0, baseline DP4A) ...
===== BEGIN MMVQ_BASE =====
GPU,NVIDIA CMP 100-210,sm_70,68,6144
LAYER,q_proj,4096,4096,32,389.4,12.17,2.25,180.58
LAYER,k_proj,1024,4096,32,188.8,5.90,0.56,93.09
LAYER,v_proj,1024,4096,32,188.8,5.90,0.56,93.10
LAYER,o_proj,4096,4096,32,388.2,12.13,2.25,181.13
LAYER,gate_proj,12288,4096,32,1132.9,35.40,6.75,186.19
LAYER,up_proj,12288,4096,32,1167.4,36.48,6.75,180.69
LAYER,down_proj,4096,12288,32,978.7,30.59,6.75,215.52
LAYER,lm_head,151669,4096,1,412.6,412.57,83.31,197.21
SUMMARY,4846.8,206.32,911.31
===== END MMVQ_BASE =====
==> [4/4] mmvq (Qwen3-8B Q1_0, DP2A+PRMT replacement) ...
===== BEGIN MMVQ_DP2A_PRMT =====
GPU,NVIDIA CMP 100-210,sm_70,68,6144
LAYER,q_proj,4096,4096,32,431.2,13.48,2.25,163.06
LAYER,k_proj,1024,4096,32,189.7,5.93,0.56,92.66
LAYER,v_proj,1024,4096,32,189.7,5.93,0.56,92.65
LAYER,o_proj,4096,4096,32,431.7,13.49,2.25,162.87
LAYER,gate_proj,12288,4096,32,1265.6,39.55,6.75,166.67
LAYER,up_proj,12288,4096,32,1281.1,40.03,6.75,164.66
LAYER,down_proj,4096,12288,32,1124.6,35.14,6.75,187.56
LAYER,lm_head,151669,4096,1,454.9,454.91,83.31,178.85
SUMMARY,5368.5,186.27,911.31
===== END MMVQ_DP2A_PRMT =====
========================================================================
DONE — copy everything from the first '====' line above to here.
========================================================================
==> Done. Copy the stdout (the ==== blocks) and paste it back.
arithimtest_gendoesn't generate results when running against SM70 cards; it just skips all benchmarks as it thinks they're for SM >= 75../reproduce.sheats the STDERR of this tool, but when run directly produces the following output:Makefile diff for:
pythonThe rest of ./reproduce.sh FWIW, less the instruction benchmarks (and probably the main point of this tool):