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

Function CreateStringJoinOp

serving/processor/framework/graph_optimizer.cc:2012–2031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2010}
2011
2012Status CreateStringJoinOp(const std::string& name,
2013 std::vector<SrcInfo> input_info,
2014 Graph* graph, Node** join_node) {
2015 NodeDef def;
2016 def.set_name(name);
2017 def.set_op("StringJoin");
2018 AttrValue attr_N;
2019 attr_N.set_i(input_info.size());
2020 def.mutable_attr()->insert({"N", attr_N});
2021 Status status;
2022 *join_node = graph->AddNode(def, &status);
2023 TF_RETURN_IF_ERROR(status);
2024
2025 for (size_t i = 0; i < input_info.size(); ++i) {
2026 graph->AddEdge(input_info[i].src_node, input_info[i].src_slot,
2027 *join_node, i);
2028 }
2029
2030 return status;
2031}
2032
2033Status CreateConcatOp(const std::string& name,
2034 DataType type,

Callers 1

CreateIncrRestoreOpMethod · 0.85

Calls 6

set_opMethod · 0.80
set_nameMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
AddNodeMethod · 0.45
AddEdgeMethod · 0.45

Tested by

no test coverage detected