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 2020/06/05 22:00:24 UTC

[GitHub] [incubator-tvm] tqchen opened a new pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

tqchen opened a new pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738


   Replaces most of the ComptuteReduce using foldl.
   


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

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



[GitHub] [incubator-tvm] junrushao1994 commented on a change in pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on a change in pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738#discussion_r436230123



##########
File path: include/tvm/tir/op.h
##########
@@ -762,6 +778,15 @@ inline PrimExpr make_zero(DataType t) {
   }
   return make_const(t, 0);
 }
+
+template <typename FReduce>
+inline PrimExpr foldl(FReduce freduce, PrimExpr init_value, const Array<PrimExpr>& values) {

Review comment:
       @tqchen I don't have strong opinion, but is it slightly better to use `Foldl` instead to conform the naming convention?




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

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



[GitHub] [incubator-tvm] tqchen commented on pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738#issuecomment-639849385


   cc @junrushao1994 @jroesch @ZihengJiang 


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

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



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738#discussion_r436231973



##########
File path: include/tvm/tir/op.h
##########
@@ -762,6 +778,15 @@ inline PrimExpr make_zero(DataType t) {
   }
   return make_const(t, 0);
 }
+
+template <typename FReduce>
+inline PrimExpr foldl(FReduce freduce, PrimExpr init_value, const Array<PrimExpr>& values) {

Review comment:
       most of the functions in this file uses stl_case(as they are part of user facing function), we can discuss whether we want to force all function to conform to the CamelCase later.




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

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



[GitHub] [incubator-tvm] tqchen merged pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738


   


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

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



[GitHub] [incubator-tvm] tqchen edited a comment on pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738#issuecomment-639849385


   cc @junrushao1994 @jroesch @ZihengJiang @yzhliu 


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

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



[GitHub] [incubator-tvm] junrushao1994 commented on a change in pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on a change in pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738#discussion_r436232785



##########
File path: include/tvm/tir/op.h
##########
@@ -762,6 +778,15 @@ inline PrimExpr make_zero(DataType t) {
   }
   return make_const(t, 0);
 }
+
+template <typename FReduce>
+inline PrimExpr foldl(FReduce freduce, PrimExpr init_value, const Array<PrimExpr>& values) {

Review comment:
       Okay, it makes sense :-)




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

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



[GitHub] [incubator-tvm] tqchen commented on pull request #5738: [REFACTOR][ARITH] Remove legacy compute_expr.h

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #5738:
URL: https://github.com/apache/incubator-tvm/pull/5738#issuecomment-639891530


   @junrushao1994 yes also also remove the legacy templates


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

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