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

Function AddPrefixToNodeName

tensorflow/core/grappler/utils.cc:184–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182bool IsControlInput(const TensorId& tensor_id) { return tensor_id.index() < 0; }
183
184string AddPrefixToNodeName(const string& name, const string& prefix,
185 const string& delimiter) {
186 if (!name.empty()) {
187 if (name[0] == '^') {
188 return absl::StrCat("^", prefix, delimiter, name.substr(1));
189 }
190 }
191 return absl::StrCat(prefix, delimiter, name);
192}
193
194string AddPrefixToNodeName(const string& name, const string& prefix) {
195 return AddPrefixToNodeName(name, prefix, "/");

Callers 15

TEST_FFunction · 0.85
AddControlDependencyMethod · 0.85
OptimizedNodeNameMethod · 0.85
MulConvPushDownMethod · 0.85
HandleConstMethod · 0.85
HandleInvariantNodeMethod · 0.85
AddSharedNodesMethod · 0.85
AddOneReplicaMethod · 0.85
BuildGraphMethod · 0.85
TEST_FFunction · 0.85

Calls 2

StrCatFunction · 0.50
emptyMethod · 0.45

Tested by 7

TEST_FFunction · 0.68
TEST_FFunction · 0.68
HoistMulNameFunction · 0.68
HoistDivNameFunction · 0.68
HoistAddNameFunction · 0.68
AggregationConstNameFunction · 0.68
AggregationMulNameFunction · 0.68