MCPcopy Create free account
hub / github.com/Niko1221/Strata / free_experts

Method free_experts

engine/src/split/src/model.cpp:1607–1621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605}
1606
1607void Model::free_experts() {
1608 each_card(cards, [&](CardW& c) {
1609 for (void* p : c.expert_mem) ck(cudaFree(p), "free experts");
1610 c.expert_mem.clear();
1611 c.bytes -= c.expert_bytes;
1612 c.expert_bytes = 0;
1613 c.ec = ExpertCache{};
1614 c.ec_owner0.clear();
1615 c.ec_slot0.clear();
1616 for (LayerW& L : c.L) {
1617 L.gu_e.p = L.down_e.p = nullptr;
1618 L.gu_e.ep = L.down_e.ep = nullptr;
1619 }
1620 });
1621}
1622
1623// ---------------------------------------------------------------- the holder's tables for a worker
1624// Per card what load_card stored (the geometry the constructor sets again): its pointers, the layers, the experts'

Callers

nothing calls this directly

Calls 4

each_cardFunction · 0.85
ckFunction · 0.70
cudaFreeFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected