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

Method Export

tensorflow/core/framework/op.cc:152–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void OpRegistry::Export(bool include_internal, OpList* ops) const {
153 mutex_lock lock(mu_);
154 MustCallDeferred();
155
156 std::vector<std::pair<string, const OpRegistrationData*>> sorted(
157 registry_.begin(), registry_.end());
158 std::sort(sorted.begin(), sorted.end());
159
160 auto out = ops->mutable_op();
161 out->Clear();
162 out->Reserve(sorted.size());
163
164 for (const auto& item : sorted) {
165 if (include_internal || !absl::StartsWith(item.first, "_")) {
166 *out->Add() = item.second->op_def;
167 }
168 }
169}
170
171void OpRegistry::DeferRegistrations() {
172 mutex_lock lock(mu_);

Callers 9

PrintAllPythonOpsFunction · 0.80
OpCompatibilityLibMethod · 0.80
TESTFunction · 0.80
BaseApiTestMethod · 0.80
PythonApiTestMethod · 0.80
mainFunction · 0.80
GetOpListForValidationFunction · 0.80
mainFunction · 0.80
PrintAllCCOpsFunction · 0.80

Calls 8

sortFunction · 0.85
StartsWithFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
ClearMethod · 0.45
ReserveMethod · 0.45
sizeMethod · 0.45
AddMethod · 0.45

Tested by 3

TESTFunction · 0.64
BaseApiTestMethod · 0.64
PythonApiTestMethod · 0.64