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:27:47 UTC

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

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