You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "MasterJH5574 (via GitHub)" <gi...@apache.org> on 2023/07/17 18:42:45 UTC

[GitHub] [tvm] MasterJH5574 opened a new pull request, #15340: [Unity][Dlight] Fix DecodeGeMV rule for spatial-inner with grouping

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

   This PR fixes a bug of DecodeGeMV dlight rule when the innermost tensor dimension is spatial with `unroll_factor` (for example, the grouping used in group quantization).
   
   Prior to this PR, a reduction loop that is bound to threadIdx was reordered to reside outside a split spatial loop, which prevents the TIR LowerCrossThreadReduction pass to successfully apply due to some safety-guard requirement.
   
   This PR fixes this issue by not reordering the split spatial loop after the reduction loop, so that the pass can be applied. Note that we can do this as the order of thread-binding loops does not matter.


-- 
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] yzh119 commented on a diff in pull request #15340: [Unity][Dlight] Fix DecodeGeMV rule for spatial-inner with grouping

Posted by "yzh119 (via GitHub)" <gi...@apache.org>.
yzh119 commented on code in PR #15340:
URL: https://github.com/apache/tvm/pull/15340#discussion_r1265823417


##########
python/tvm/dlight/gpu/decode_gemv.py:
##########
@@ -220,8 +220,7 @@ def _sch_inner_spatial(
         s = sch.fuse(*s)
         sch.reorder(s, r)
         if unroll_spatial_factor:
-            s, inner = sch.split(s, factors=[None, unroll_spatial_factor])
-            sch.reorder(s, r, inner)
+            s, _ = sch.split(s, factors=[None, unroll_spatial_factor])

Review Comment:
   and this implies the new loop order is `(s, inner, r)` which meets the requirement of CrossThreadReduction pass :)



-- 
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] junrushao merged pull request #15340: [Unity][Dlight] Fix DecodeGeMV rule for spatial-inner with grouping

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao merged PR #15340:
URL: https://github.com/apache/tvm/pull/15340


-- 
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] tvm-bot commented on pull request #15340: [Unity][Dlight] Fix DecodeGeMV rule for spatial-inner with grouping

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15340:
URL: https://github.com/apache/tvm/pull/15340#issuecomment-1638680576

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @quic-sanirudh <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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] MasterJH5574 commented on a diff in pull request #15340: [Unity][Dlight] Fix DecodeGeMV rule for spatial-inner with grouping

Posted by "MasterJH5574 (via GitHub)" <gi...@apache.org>.
MasterJH5574 commented on code in PR #15340:
URL: https://github.com/apache/tvm/pull/15340#discussion_r1265767208


##########
python/tvm/dlight/gpu/decode_gemv.py:
##########
@@ -220,8 +220,7 @@ def _sch_inner_spatial(
         s = sch.fuse(*s)
         sch.reorder(s, r)
         if unroll_spatial_factor:
-            s, inner = sch.split(s, factors=[None, unroll_spatial_factor])
-            sch.reorder(s, r, inner)
+            s, _ = sch.split(s, factors=[None, unroll_spatial_factor])

Review Comment:
   We can do this as the order of thread-binding loops does not matter.



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