Trimmed reload: reset the process-wide layer range before each stage reloads

With an explicit --layer-split, main loads the later stages eagerly and each
set_layer_range(lb, le) call stays in effect process-wide; a trimmed reload of
CUDA0 with a different range then intersected with the stale one and found no
eligible matrices ('native dense: no supported GDN/QSA matrices'). Set the
range to the reloading stage's own before its load.
This commit is contained in:
cobra91 authored and cobra91 committed 2026-11-11 07:46:31 +01:00
1 parent 7f57e4c24c
commit 935165402c
1 file changed
+3
+3
View File
@@ -6737,6 +6737,9 @@ int main(int argc, char** argv) {
uint64_t bytes = 0;
if (!strata::core::WeightTable::pool_bytes(o.pack, bytes, err, &sk)) return false;
dense.release();
// the process-wide range that `load` also reads may be stale from an earlier stage's
// set_layer_range (an explicit split loads its later stages eagerly): reset it to ours
strata::core::NativeDense::set_layer_range((int) lo, (int) hi);
table = strata::core::WeightTable{};
cudaFree(base);
base = nullptr;