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

Function ComputePolicy

tensorflow/core/framework/resource_mgr_test.cc:165–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165Status ComputePolicy(const string& attr_container,
166 const string& attr_shared_name,
167 bool use_node_name_as_default, string* result) {
168 ContainerInfo cinfo;
169 ResourceMgr rmgr;
170 NodeDef ndef;
171 ndef.set_name("foo");
172 if (attr_container != "none") {
173 AddNodeAttr("container", attr_container, &ndef);
174 }
175 if (attr_shared_name != "none") {
176 AddNodeAttr("shared_name", attr_shared_name, &ndef);
177 }
178 TF_RETURN_IF_ERROR(cinfo.Init(&rmgr, ndef, use_node_name_as_default));
179 *result = cinfo.DebugString();
180 return Status::OK();
181}
182
183string Policy(const string& attr_container, const string& attr_shared_name,
184 bool use_node_name_as_default) {

Callers 2

PolicyFunction · 0.85
WrongPolicyFunction · 0.85

Calls 4

AddNodeAttrFunction · 0.70
set_nameMethod · 0.45
InitMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected