MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CreateSessionGroup

Method CreateSessionGroup

serving/processor/serving/model_session.cc:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169Status ModelSessionMgr::CreateSessionGroup(
170 SessionGroup** session_group, ModelConfig* config) {
171 SessionGroupMetadata metadata;
172 metadata.session_count = config->session_num;
173 metadata.model_id = 0;
174 metadata.gpu_ids = config->gpu_ids;
175 metadata.cpusets = config->cpusets;
176
177 ConfigProto* opt_config = const_cast<ConfigProto*>(&(session_options_->config));
178 GPUOptions* gpu_opt = opt_config->mutable_gpu_options();
179 gpu_opt->mutable_experimental()->clear_virtual_devices();
180 TF_RETURN_IF_ERROR(NewSessionGroup(*session_options_,
181 session_group, metadata));
182 TF_RETURN_IF_ERROR((*session_group)->Create(meta_graph_def_.graph_def()));
183 asset_file_defs_.clear();
184 return util::GetAssetFileDefs(meta_graph_def_, &asset_file_defs_);
185}
186
187Status ModelSessionMgr::RunRestoreOps(
188 const char* ckpt_name, int64 full_ckpt_version,

Callers

nothing calls this directly

Calls 5

NewSessionGroupFunction · 0.85
GetAssetFileDefsFunction · 0.70
CreateMethod · 0.45
graph_defMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected