mkatanbaf commented on code in PR #13752:
URL: https://github.com/apache/tvm/pull/13752#discussion_r1093859994
##########
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:
I believe a similar fix is needed for the case usmp is enabled here:
https://github.com/apache/tvm/blob/2877c5a3cf126637f0968bb9090454410c426cd0/src/target/source/source_module.cc#L295
--
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]