giuseros commented on a change in pull request #7988:
URL: https://github.com/apache/tvm/pull/7988#discussion_r634769442



##########
File path: src/target/source/codegen_c.cc
##########
@@ -662,6 +662,11 @@ void CodeGenC::VisitExpr_(const CallNode* op, 
std::ostream& os) {  // NOLINT(*)
       os << " != ";
       this->PrintExpr(op->args[0], os);
       os << ")";
+    } else if (op->op.same_as(builtin::lookup_param())) {
+      ICHECK_EQ(op->args.size(), 1);
+      const StringImmNode* str = op->args[0].as<StringImmNode>();
+      ICHECK(str != nullptr);
+      os << "__tvm_param__" << str->value;

Review comment:
       I am not mangling here, because those parameters are static, hence only 
visible internally in the compilation unit (and not in the library). I can 
mangle them, but it means that the code generator needs to know the `mod_name`, 
so I need to hack the `Codegen` method etc.. I think @mshawcroft was referring 
to  names exposed in the library (operators name, runner name, etc..) as 
opposed to local names to each compilation unit




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to