guberti commented on code in PR #13752:
URL: https://github.com/apache/tvm/pull/13752#discussion_r1088261659
##########
src/target/source/codegen_c.cc:
##########
@@ -631,8 +632,11 @@ void CodeGenC::PrintVecBinaryOp(const std::string& op,
DataType t, PrimExpr lhs,
}
}
+unsigned int random_seed = 0;
void CodeGenC::VisitStmt_(const AllocateConstNode* op) {
- std::string symbol_name = op->buffer_var->name_hint;
+ // Add a random suffix to eliminate duplicate global variables.
+ int suffix = rand_r(&random_seed) % (2 << 24);
Review Comment:
A counter would work fine - this is just a hack to fix the duplicate global
variables problem. Would love @areusch's take on the right way to fix this long
term.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]