leeexyz commented on issue #7596:
URL: https://github.com/apache/tvm/issues/7596#issuecomment-807985380


   > @leeexyz , could you please check my screenshot posted above? This is 
definitely an issue that a variable named "tvm.contrib.cblas.matmul_packed" 
generated in the c source file, which is not a qualified c variable name (not 
allowed to have a "." symbol).
   
   Yes, you are right. It was caused by the same PR I mentioned. Try to modify 
like
   ```c++
       // src/target/source/codegen_c_host.cc:void 
CodeGenCHost::VisitExpr_(const CallNode* op, std::ostream& os);
       std::string packed_func_name = GetUniqueName(func_name + "_packed");
       if (declared_globals_.insert(packed_func_name).second) {
         // Still reserve the name among unique names.
         // ICHECK(GetUniqueName(packed_func_name) == packed_func_name)
         //     << "Expected name " << packed_func_name << " to not be taken";
         decl_stream << "static void* " << packed_func_name << " = NULL;\n";
       }
   ```
   and add 
   ```c++
       // src/target/source/source_module.cc:GetFunction
       } else if (name == runtime::symbol::tvm_module_main) {
         return PackedFunc(
             [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = 
this->func_names_[0]; });
   ```
   


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