MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / set_persistent

Function set_persistent

csrc/compile/z3.cpp:555–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555void set_persistent(long ds_id)
556{
557 param_registry->setPersistent(ds_id, true);
558
559 // Allocate buffer here
560 // Memory fragmentation will be more severe if we allocate in forward/backward
561 for (auto& it : executors) {
562 if (it.second->hasParam(ds_id)) {
563 auto executor = getExecutor<Z3CustomOpExecutor>(it.first, executors);
564 auto dtype = param_registry->getParam(ds_id).getDtype();
565 executor->allgatherParam(ds_id, dtype, symm_mem);
566 }
567 }
568}
569
570void prefetch_params_fused(long graph_id,
571 const std::vector<at::Tensor>& params,

Callers

nothing calls this directly

Calls 4

getDtypeMethod · 0.80
allgatherParamMethod · 0.80
setPersistentMethod · 0.45
hasParamMethod · 0.45

Tested by

no test coverage detected