MCPcopy Create free account
hub / github.com/alibaba/euler / ProduceFusionOutputMap

Method ProduceFusionOutputMap

euler/parser/optimizer.cc:253–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253std::vector<std::vector<std::string>>
254Optimizer::ProduceFusionOutputMap(
255 const std::vector<int32_t>& subset, DAGDef* dag) {
256 std::vector<std::vector<std::string>> results;
257 int32_t counter = 0;
258 for (int32_t id : subset) {
259 std::shared_ptr<NodeDef> node_def = dag->GetNodeById(id);
260 std::string op_name = node_def->name_;
261 std::string op_id = ToString(node_def->id_);
262 for (int32_t i = 0; i < node_def->output_num_; ++i) {
263 std::vector<std::string> fusion_output_info =
264 {op_name, op_id, ToString(i), ToString(counter++)};
265 results.push_back(fusion_output_info);
266 }
267 }
268 return results;
269}
270
271std::vector<std::vector<std::string>>
272Optimizer::ProduceSplitOpInfo(

Callers

nothing calls this directly

Calls 2

ToStringFunction · 0.85
GetNodeByIdMethod · 0.80

Tested by

no test coverage detected