kbench: a report whose counts disagree with each other fails a test

The checked-in libr4d section of Rows nothing ran said 239 not reached
over a table of 243: 486c9331 added the four kv_store_streamed rows to
the table without the count (the previous regeneration, 1e968f6e, was
consistent at 239/239). The generator prints header and table from one
vector, so a file like this cannot be one run's output: it is a hand-
merged regeneration, and its headline (132 of 510) and section totals
read four rows short of the tables.

Count the rows each section emits (tests/kernel_report_check.sh), fail
the fast tier when a header and its table disagree or the headline no
longer adds up, and correct the report to the numbers its own tables
show: libr4d 243 not reached, 291 declared (the four rows are in
r4d_rows.cpp and the library reports them), headline 132 of 514.
Regenerating the report from one run on a rig with cards supersedes the
corrected numbers; the test keeps the file honest.
This commit is contained in:
griffin-warrior authored and StillDeadcode committed 2026-10-28 11:37:51 +01:00
1 parent 7a039cbb5c
commit 1f4f4420e9
3 files changed
+62 -3

No files matched your search

+12
View File
@@ -594,6 +594,18 @@ set_tests_properties(ops_doc PROPERTIES
TIMEOUT ${RAD_TEST_TIMEOUT}
ENVIRONMENT "ROCR_VISIBLE_DEVICES=99")
# docs/KERNELS.md is generated by rad-kbench and merged by hand; a partial merge leaves a
# library's "rows not reached" header from one run above a table from another (v1.13.0: 239
# against 243 rows). The counts must agree with each other and with the headline; cheap.
if(EXISTS ${CMAKE_SOURCE_DIR}/docs/KERNELS.md)
add_test(NAME kernel_report_check
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/kernel_report_check.sh
${CMAKE_SOURCE_DIR}/docs/KERNELS.md)
set_tests_properties(kernel_report_check PROPERTIES
LABELS "fast;unit"
TIMEOUT ${RAD_TEST_TIMEOUT})
endif()
# tools/rad-export. Its standard-library checks always run; the merge arithmetic runs where torch
# and safetensors import, and the PEFT comparison where peft and transformers do too.
find_program(RAD_PYTHON3 NAMES python3)