You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/01 12:33:21 UTC

[GitHub] [tvm] ashutosh-arm commented on a change in pull request #10100: [CMSIS-NN] Convert scalar constants to tensor constants

ashutosh-arm commented on a change in pull request #10100:
URL: https://github.com/apache/tvm/pull/10100#discussion_r796549341



##########
File path: src/relay/backend/contrib/cmsisnn/extract_constants.cc
##########
@@ -62,17 +62,87 @@ class ExtractConstantsMutator : public MixedModeMutator {
       return func;
     }
 
-    function_to_constants_.Set(func, Array<Constant>{});
+    function_to_arguments_.Set(func, Array<Expr>{});
     functions_.push_back(func);
     auto new_body = VisitExpr(func->body);
     functions_.pop_back();
-    if (function_to_constants_[func].size()) {
+    if (function_to_arguments_[func].size()) {
       func = WithFields(func, FreeVars(new_body), new_body, func->ret_type,
                         FreeTypeVars(new_body, mod_), func->attrs);
     }
     return std::move(func);
   }
 
+  // Creates new arguments from current call's arguments
+  // Updates constants into the caller arguments: here caller signifies caller that comprises call
+  // to func
+  Array<Expr> CreateNewCallArgsFromKickedoutConstants(Call call, Function func) {
+    ICHECK(function_to_arguments_.find(func) != function_to_arguments_.end());
+    Array<Expr> fSignature(function_to_arguments_[func]);

Review comment:
       ACK




-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org