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/12/08 19:12:23 UTC

[GitHub] [tvm] shingjan commented on a diff in pull request #13579: [TIR] Add preserve_unit_iters option to blockize/tensorize

shingjan commented on code in PR #13579:
URL: https://github.com/apache/tvm/pull/13579#discussion_r1043725708


##########
src/tir/schedule/primitive/blockize_tensorize.cc:
##########
@@ -427,7 +430,8 @@ Stmt MakeLoopNest(Stmt stmt, const std::vector<const ForNode*>& loops) {
 }
 
 BlockRealize BlockizeImpl(const ScheduleState& self, const StmtSRef& loop_sref,
-                          Map<Block, Block>* block_sref_reuse, arith::Analyzer* analyzer) {
+                          bool preserve_unit_iters, Map<Block, Block>* block_sref_reuse,

Review Comment:
   nit: put preserve_unit_iters at the end of argument like other functions with preserve_unit_iters introduced.



##########
src/arith/iter_affine_map.cc:
##########
@@ -1812,18 +1812,26 @@ class SubspaceDivider {
     // extent of inner
     PrimExpr inner_extent;
 
+    // The kind of the division result.
+    enum class Kind {

Review Comment:
   This looks much cleaner with enum!



##########
tests/python/unittest/test_meta_schedule_runner.py:
##########
@@ -690,6 +690,8 @@ def _check_correct_add(args_before: List[np.ndarray], args_after: List[np.ndarra
         a_before, b_before, c_before = args_before
         a_after, b_after, c_after = args_after
         c_before = a_before + b_before
+        print(a_before)

Review Comment:
   remove the print



##########
tests/python/unittest/test_meta_schedule_schedule_rule_mlt_intrin.py:
##########
@@ -74,16 +74,16 @@ def vnni_conv2d_nchwc_0(placeholder: T.Buffer[(1, 4, 56, 56, 16), "uint8"], plac
         for i0_0, i1_0, i2_0, i3_0, i4_0_0, i0_1, i1_1, i2_1, i3_1, i4_0_1 in T.grid(1, 8, 28, 56, 1, 1, 2, 1, 1, 1):
             for i5_0, i6_0, i7_0, i8_0, i9_0_0, i0_2, i1_2, i2_2, i3_2, i4_0_2, i5_1, i6_1, i7_1, i8_1, i9_0_1, i0_3, i1_3, i2_3, i3_3, i4_0_3 in T.grid(1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1):
                 with T.block("conv2d_NCHWc_int8_o"):
-                    n = T.axis.spatial(1, 0)
+                    n = T.axis.spatial(1, i0_2 + i0_3 + i0_0 + i0_1)

Review Comment:
   This is the result of trivial iters being preserved instead of simplified right? 



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