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/05/31 07:18:52 UTC

[GitHub] [tvm] junrushao1994 opened a new pull request, #11512: [MetaSchedule] Enable Task Filtering

junrushao1994 opened a new pull request, #11512:
URL: https://github.com/apache/tvm/pull/11512

   This PR allows `relay.backend.MetaScheduleExtractTask` to take an extra argument `filter_func` which filters out unintentional tasks that don't need tuning. The counterpart of AutoScheduler is within `traverse_to_get_io_tensors`.


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


[GitHub] [tvm] junrushao1994 commented on pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11512:
URL: https://github.com/apache/tvm/pull/11512#issuecomment-1142425140

   I'm happy to add a simple unittest without tuning :-)


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


[GitHub] [tvm] Hzfengsy commented on pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on PR #11512:
URL: https://github.com/apache/tvm/pull/11512#issuecomment-1141758507

   Can we add testcases?


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


[GitHub] [tvm] junrushao1994 merged pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
junrushao1994 merged PR #11512:
URL: https://github.com/apache/tvm/pull/11512


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


[GitHub] [tvm] comaniac commented on a diff in pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
comaniac commented on code in PR #11512:
URL: https://github.com/apache/tvm/pull/11512#discussion_r885291505


##########
src/relay/backend/task_extraction.cc:
##########
@@ -31,25 +31,57 @@ namespace tvm {
 namespace relay {
 namespace backend {
 
-namespace metaschedule {
-
-using meta_schedule::ExtractedTask;
+bool DefaultTaskFilter(const Array<te::Tensor>& args) {
+  using namespace ::tvm::te;
+  std::vector<Tensor> stack;
+  std::unordered_set<const TensorNode*> visited;
+  for (const Tensor& v : args) {
+    for (const PrimExpr& e : v->shape) {
+      if (!e->IsInstance<IntImmNode>()) {
+        return false;

Review Comment:
   Better to have some comments in this function, such as "doesn't support dynamic shape", etc.



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


[GitHub] [tvm] junrushao1994 commented on pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11512:
URL: https://github.com/apache/tvm/pull/11512#issuecomment-1141769118

   @Hzfengsy thanks for asking! It's pretty hard to add a unittest given we will need an actual end-to-end network that takes hours to run...In this particular case, it might be good to leave it to future integration test instead


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


[GitHub] [tvm] junrushao1994 commented on a diff in pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on code in PR #11512:
URL: https://github.com/apache/tvm/pull/11512#discussion_r885298461


##########
src/relay/backend/task_extraction.cc:
##########
@@ -31,25 +31,57 @@ namespace tvm {
 namespace relay {
 namespace backend {
 
-namespace metaschedule {
-
-using meta_schedule::ExtractedTask;
+bool DefaultTaskFilter(const Array<te::Tensor>& args) {
+  using namespace ::tvm::te;
+  std::vector<Tensor> stack;
+  std::unordered_set<const TensorNode*> visited;
+  for (const Tensor& v : args) {
+    for (const PrimExpr& e : v->shape) {
+      if (!e->IsInstance<IntImmNode>()) {
+        return false;

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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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


[GitHub] [tvm] junrushao1994 commented on pull request #11512: [MetaSchedule] Enable Task Filtering

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11512:
URL: https://github.com/apache/tvm/pull/11512#issuecomment-1141757145

   CC: @comaniac @Hzfengsy @zxybazh 


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