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

Function GetDescriptorPool

tensorflow/core/util/proto/descriptors.cc:85–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83} // namespace
84
85Status GetDescriptorPool(
86 Env* env, string const& descriptor_source,
87 protobuf::DescriptorPool const** desc_pool,
88 std::unique_ptr<protobuf::DescriptorPool>* owned_desc_pool) {
89 // Attempt to lookup the pool in the registry.
90 auto pool_fn = DescriptorPoolRegistry::Global()->Get(descriptor_source);
91 if (pool_fn != nullptr) {
92 return (*pool_fn)(desc_pool, owned_desc_pool);
93 }
94
95 // If there is no pool function registered for the given source, let the
96 // runtime find the file or URL.
97 Status status =
98 GetDescriptorPoolFromFile(env, descriptor_source, owned_desc_pool);
99 if (status.ok()) {
100 *desc_pool = owned_desc_pool->get();
101 return Status::OK();
102 }
103
104 status = GetDescriptorPoolFromBinary(descriptor_source, owned_desc_pool);
105 *desc_pool = owned_desc_pool->get();
106 return status;
107}
108
109} // namespace tensorflow

Callers 2

DecodeProtoOpMethod · 0.85
EncodeProtoOpMethod · 0.85

Calls 5

GetMethod · 0.45
okMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected