Skip to content

Commit 34c2bbf

Browse files
committed
2 parents 500f89a + aea3254 commit 34c2bbf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

TensorFrost/Backend/CodeGen/Generators.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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++;

TensorFrost/Tensor/Tensor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)