File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ void GenerateNodeNames(const IR& ir) {
4646 Node* curent_cluster = nullptr ;
4747 map<string, int > name_count;
4848 for (auto node = ir.begin (); !node.end (); node.next ()) {
49- if (strip_debug_names) {
50- node->debug_name = " " ;
49+ if (strip_debug_names && !node->debug_name .empty ()) {
50+ static int count = 0 ;
51+ node->debug_name = " id_" + std::to_string (count++);
5152 }
5253 if (node->parent != curent_cluster) {
5354 cluster_index++;
Original file line number Diff line number Diff line change @@ -330,7 +330,9 @@ void Tensor::SetDebugName(const string& name) const
330330 }
331331
332332 if (strip_debug_names) {
333- node_->debug_name = " " ;
333+ static int count = 0 ;
334+
335+ node_->debug_name = " tensor_" + std::to_string (count++);
334336 }
335337}
336338
You can’t perform that action at this time.
0 commit comments