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 2020/06/22 16:55:48 UTC

[GitHub] [incubator-tvm] comaniac opened a new pull request #5885: [Relay]Allow every runtime module to handle constants

comaniac opened a new pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885


   Per discussion in #5884, this PR makes the following improvements:
   * Allow any runtime with `get_symbol` and `get_const_vars` to use the unified mechanism of constant processing.
   * We will have a JSON runtime PR later this week to demonstrate how a customized runtime works with this mechanism.
   
   cc @zhiics @mbaret 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] comaniac commented on a change in pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#discussion_r443703592



##########
File path: src/target/source/source_module.cc
##########
@@ -119,7 +122,6 @@ class CSourceModuleNode : public runtime::ModuleNode {
       return PackedFunc(
           [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->const_vars_; });
     } else {
-      LOG(FATAL) << "Unknown packed function: " << name;

Review comment:
       Not really but just a quick fix. I could remove this line and send it along with the JSON runtime if you think that's better.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] mbaret commented on a change in pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
mbaret commented on a change in pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#discussion_r443708196



##########
File path: src/target/source/source_module.cc
##########
@@ -119,7 +122,6 @@ class CSourceModuleNode : public runtime::ModuleNode {
       return PackedFunc(
           [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->const_vars_; });
     } else {
-      LOG(FATAL) << "Unknown packed function: " << name;

Review comment:
       If it's a necessary but unrelated change, I think a separate PR is most appropriate.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] zhiics commented on pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
zhiics commented on pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#issuecomment-648235147


   @mbaret this should be handled later by changing the way to initialize graph runtime in different PRs.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] comaniac commented on a change in pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#discussion_r443876315



##########
File path: src/target/source/source_module.cc
##########
@@ -119,7 +122,6 @@ class CSourceModuleNode : public runtime::ModuleNode {
       return PackedFunc(
           [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->const_vars_; });
     } else {
-      LOG(FATAL) << "Unknown packed function: " << name;

Review comment:
       done




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] zhiics merged pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
zhiics merged pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] zhiics commented on pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
zhiics commented on pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#issuecomment-648235707


   thanks @comaniac @mbaret @junrushao1994 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] mbaret commented on a change in pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
mbaret commented on a change in pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#discussion_r443702474



##########
File path: src/target/source/source_module.cc
##########
@@ -119,7 +122,6 @@ class CSourceModuleNode : public runtime::ModuleNode {
       return PackedFunc(
           [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->const_vars_; });
     } else {
-      LOG(FATAL) << "Unknown packed function: " << name;

Review comment:
       Is this related?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] mbaret commented on pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
mbaret commented on pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#issuecomment-648164080


   Given some modules don't use this mechanism, should we find a way to suppress this warning?
   https://github.com/apache/incubator-tvm/blob/b94e8b7290c5ced98728e730634ec73727c53c51/src/runtime/graph/graph_runtime.cc#L93
   I'm noticing that I'm getting spammed with it now.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] mbaret commented on a change in pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
mbaret commented on a change in pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#discussion_r443704576



##########
File path: src/target/source/source_module.cc
##########
@@ -119,7 +122,6 @@ class CSourceModuleNode : public runtime::ModuleNode {
       return PackedFunc(
           [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->const_vars_; });
     } else {
-      LOG(FATAL) << "Unknown packed function: " << name;

Review comment:
       I think that would be neater. Even a 1 line PR would be fine.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] zhiics commented on a change in pull request #5885: [Relay]Allow every runtime module to handle constants

Posted by GitBox <gi...@apache.org>.
zhiics commented on a change in pull request #5885:
URL: https://github.com/apache/incubator-tvm/pull/5885#discussion_r443706383



##########
File path: src/target/source/source_module.cc
##########
@@ -119,7 +122,6 @@ class CSourceModuleNode : public runtime::ModuleNode {
       return PackedFunc(
           [sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->const_vars_; });
     } else {
-      LOG(FATAL) << "Unknown packed function: " << name;

Review comment:
       This would be needed. Your runtime could get unnecessarily stuck here for other queries.




----------------------------------------------------------------
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:
users@infra.apache.org