mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
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:
1 parent
7f57e4c24c
commit
935165402c
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user