abi: the control vector's field is ABI 26, not the 25 main released

Merging main brought 1.10.0's own 24 -> 25 bump, byte for byte the same two lines this
branch carried (abi/rad_abi.h's RAD_ABI_VERSION and the layout test's snapshot constants),
so the merge made those files identical to main and the PR's diff fell from 49 files to 47.

What is left is a version number that names two different layouts. main's 25 grew
RadGeneratorDecl (aux_max_tokens, sigma_grid, min_tokens, aux_tokens), RadStep's
conditioning tensors and the tokenizer's RAD_PRE_* constants; this branch's grew
RadBuildCtx by the trailing cvec pointer, which is that struct's offset 112 of 120. Both
trees said 25, and core/plugin/loader.cpp compares nothing but that number, so the one
direction that matters -- an engine from this branch loading a plugin home built from
1.10.0 -- was accepted: qwen4exp reads ctx->cvec at declare (qwen4exp_fp8.cpp:951) out of
an eight-byte-shorter struct, past its end, and treats whatever follows as a direction
table. The PR's own note, that an engine from here refuses an older home and names the
stale .so, was no longer true for the release it now merges.

26 it is, with the layout table and the snapshot constants saying so. ABI 25 keeps
meaning what shipped.
This commit is contained in:
C_Tamas authored and StillDeadcode committed 2026-10-21 09:26:17 +02:00
1 parent 4141988217
commit 7e1f73c2a0
4 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ extern "C" {
* kind of plugin reports it, and a plugin that does not report exactly this version is refused at
* load with both versions printed. A new optional export (e.g. rad_plugin_reference) is not a
* change of shape: a plugin without it gets the default. */
#define RAD_ABI_VERSION 25u
#define RAD_ABI_VERSION 26u
/* ================================================================== plugin identity */
/* One value per plugin, not flags (QUANT is 3). RAD_PLUGIN_QUANT is a quantiser plugin:
+1
View File
@@ -174,6 +174,7 @@ typedef struct RadBuildCtx {
* Trailing and zero-defaulted, so a plugin built against the older struct is unchanged. */
int kv_quant;
/* ---- appended in ABI 26 (control vectors) */
/* A control vector loaded from a GGUF `controlvector` file found for this model, or null.
*
* The engine loads and validates it once, at bringup, and the plugin only reads it: the
+1 -1
View File
@@ -1,4 +1,4 @@
/* abi_layout_table.h -- every abi/ struct's size and field offsets at RAD_ABI_VERSION 25 and
/* abi_layout_table.h -- every abi/ struct's size and field offsets at RAD_ABI_VERSION 26 and
* RAD_FORMAT_VER 2, as { type, field, offset, size } rows ("" is the struct itself). A snapshot
* of the headers on x86-64 Linux, which abi_layout_test.cpp holds the layout to; regenerate it
* from the test's printout only together with a version bump. */
+3 -3
View File
@@ -8,7 +8,7 @@
*
* Checked: a C translation unit (abi_c_test.c, strict C11) lays every struct out as C++ does; every
* struct's listed fields account for its size, so the list in abi_layout_rows.h is complete; and
* the layout agrees with the table below, taken at RAD_ABI_VERSION 25 and RAD_FORMAT_VER 2. Under
* the layout agrees with the table below, taken at RAD_ABI_VERSION 26 and RAD_FORMAT_VER 2. Under
* those versions a listed field may not move or change size, an ABI struct may only grow by fields
* past its old end, and an on-disk struct may not change at all. The table is a snapshot of the
* headers: nothing else states the layout. When it disagrees the test prints the live table.
@@ -57,8 +57,8 @@ std::vector<Row> cpp_rows() {
};
}
/* The layout at RAD_ABI_VERSION 25 / RAD_FORMAT_VER 2 (see the file header). */
constexpr uint32_t kTableAbi = 25, kTableFormat = 2;
/* The layout at RAD_ABI_VERSION 26 / RAD_FORMAT_VER 2 (see the file header). */
constexpr uint32_t kTableAbi = 26, kTableFormat = 2;
const AbiRow kTable[] = {
#include "abi_layout_table.h"
};