From 0f4c1afc38eba0196f607b941da4a8605f7e39bf Mon Sep 17 00:00:00 2001 From: mici81 Date: Thu, 22 Oct 2026 12:31:04 +0000 Subject: [PATCH] r4d_selftest: timed passes after an untimed one; gemv_wide at two column tiles A fresh process otherwise times its first pass while the card's clock ramps up from idle: up to 1.5x slow, and two builds of the same machine code read 13% apart until both were warm. Numeric cases for gemv_wide's two column tiles a block at four row tiles and on the per-row scale. Co-Authored-By: Claude Opus 5.5 (1M context) --- libr4d/r4d_selftest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libr4d/r4d_selftest.cpp b/libr4d/r4d_selftest.cpp index 179fa863..f43063da 100644 --- a/libr4d/r4d_selftest.cpp +++ b/libr4d/r4d_selftest.cpp @@ -564,6 +564,7 @@ static double st_time_us(F&& launch, int iters, hipStream_t s) { if (g_cold <= 0) { hipEvent_t e0, e1; st_ev_create(&e0); st_ev_create(&e1); + for (int i = 0; i < iters; ++i) launch(i); /* untimed: the clocks ramp up from idle */ st_ev_record(e0, s); for (int i = 0; i < iters; ++i) launch(i); st_ev_record(e1, s); @@ -26932,6 +26933,10 @@ static void device_phase(const Plugin& pl) { mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 17, 1072, 2560, 0, false); mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 32, 17408, 5120, 0, true); mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 40, 5376, 10752, 0, true); + /* Two column tiles a block (N >= 4096, K >= 3072, past 24 rows) at four row tiles and on the + * per-row activation scale. */ + mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 64, 12288, 5120, 0, false); + mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 49, 5376, 10752, 0, true); mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 64, 10288, 640, 0, false); mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 33, 16, 256, 0, true); mxfp4a8_numeric(pl, "gemm_mxfp4a8_gemv_wide", 56, 1072, 5120, 0, true);