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/03/28 01:58:36 UTC

[GitHub] [tvm] junrushao1994 commented on a change in pull request #10689: [MetaSchedule] Upstream the leftover changes

junrushao1994 commented on a change in pull request #10689:
URL: https://github.com/apache/tvm/pull/10689#discussion_r836005779



##########
File path: src/tir/schedule/primitive/sampling.cc
##########
@@ -299,22 +299,12 @@ std::vector<int64_t> SamplePerfectTile(support::LinearCongruentialEngine::TRandS
     return SamplePerfectTile(rand_state, extent, n_splits);
   }
   CHECK_GE(n_splits, 2) << "ValueError: Cannot tile a loop into " << n_splits << " splits";
-  std::vector<int32_t> innermost_candidates;
-  innermost_candidates.reserve(max_innermost_factor);
-  for (int32_t i = 1; i <= max_innermost_factor; ++i) {
-    if (extent % i == 0) {
-      innermost_candidates.push_back(i);
+  while (true) {
+    std::vector<int64_t> result = SamplePerfectTile(rand_state, extent, n_splits);
+    if (result.back() <= max_innermost_factor) {
+      return result;

Review comment:
       Oh ooops! so this PR basically loops until the innermost factor satisfies some certain constraint, with the assumption that there is always a case where the factor could be 1 where `1 <= max_innermost_factor` always holds.
   
   To make sure I understand this correctly, in your particular case, `extent = 1024`, `max_innermost_factor = 128`, and what is `n_splits`? And it causes forever hang on this method? If so, probably @zxybazh or I could reproduce this bug and get it fixed :-)




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