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/03/10 15:45:15 UTC

[GitHub] [incubator-tvm] mbaret opened a new pull request #5028: [RELAY] Remove kCompiler attr from ext mod

mbaret opened a new pull request #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028
 
 
   Functions in external modules kept their kCompiler attribute which means UseDefaultCompiler returns false. This prevents you from being able to run any passes on these external modules. By setting this attribute to 'default' when we add the function to the external module, we allow for passes to be run external modules.

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
zhiics commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#issuecomment-601816756
 
 
   Sorry. I totally missed this PR.

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] mbaret commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
mbaret commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#issuecomment-597158759
 
 
   cc @zhiics @tqchen 

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics commented on a change in pull request #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
zhiics commented on a change in pull request #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#discussion_r397314736
 
 

 ##########
 File path: src/relay/backend/compile_engine.cc
 ##########
 @@ -627,6 +627,7 @@ class CompileEngineImpl : public CompileEngineNode {
         const tvm::tir::StringImmNode* symbol_name = ext_symbol.as<tvm::tir::StringImmNode>();
         CHECK(symbol_name) << "No external symbol is set for:\n" << AsText(src_func, false);
         auto gv = GlobalVar(symbol_name->value);
+        src_func = WithAttr(src_func, attr::kCompiler, tir::StringImmNode::make("default"));
 
 Review comment:
   Now you should not give it "default" but a null string ObjectRef, so that the returned value is not `defined`
   
   https://github.com/apache/incubator-tvm/blob/0a0e58bfa4c87b2cbff0be2b401da0b3a08fcfe8/include/tvm/ir/function.h#L99

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics closed pull request #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
zhiics closed pull request #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#issuecomment-608610090
 
 
   please followup, or close the PR if it is superseded by the later ones

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics commented on a change in pull request #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
zhiics commented on a change in pull request #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#discussion_r397321424
 
 

 ##########
 File path: src/relay/backend/compile_engine.cc
 ##########
 @@ -627,6 +627,7 @@ class CompileEngineImpl : public CompileEngineNode {
         const tvm::tir::StringImmNode* symbol_name = ext_symbol.as<tvm::tir::StringImmNode>();
         CHECK(symbol_name) << "No external symbol is set for:\n" << AsText(src_func, false);
         auto gv = GlobalVar(symbol_name->value);
+        src_func = WithAttr(src_func, attr::kCompiler, tir::StringImmNode::make("default"));
 
 Review comment:
   Also, inorder to use CoW, you may want to use `src_func = WithAttr(std::move(src_func), ...)`

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] zhiics commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
zhiics commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#issuecomment-608755731
 
 
   Let's close it. I think it is not needed 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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#discussion_r395749978
 
 

 ##########
 File path: src/relay/backend/compile_engine.cc
 ##########
 @@ -627,6 +627,7 @@ class CompileEngineImpl : public CompileEngineNode {
         const tvm::tir::StringImmNode* symbol_name = ext_symbol.as<tvm::tir::StringImmNode>();
         CHECK(symbol_name) << "No external symbol is set for:\n" << AsText(src_func, false);
         auto gv = GlobalVar(symbol_name->value);
+        src_func = FunctionSetAttr(src_func, attr::kCompiler, tir::StringImmNode::make("default"));
 
 Review comment:
   Need to change to WithAttr

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #5028: [RELAY] Remove kCompiler attr from ext mod
URL: https://github.com/apache/incubator-tvm/pull/5028#issuecomment-601790243
 
 
   cc @zhiics 

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


With regards,
Apache Git Services