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/07/19 19:33:20 UTC

[GitHub] [tvm] tkonolige opened a new pull request, #12138: [FIX,TIR] Handle LetStmt in EstimateTIRFLops

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

   Add flops for the right hand side of let statements to the total flops.
   
   @junrushao1994 @Hzfengsy 


-- 
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] tkonolige commented on a diff in pull request #12138: [FIX,TIR] Handle LetStmt in EstimateTIRFLops

Posted by GitBox <gi...@apache.org>.
tkonolige commented on code in PR #12138:
URL: https://github.com/apache/tvm/pull/12138#discussion_r930195958


##########
tests/python/unittest/test_tir_analysis_estimate_tir_flops.py:
##########
@@ -48,5 +50,16 @@ def test_te_workload(workload, flops):
     assert float(flops) == estimate_tir_flops(mod)
 
 
+@T.prim_func
+def flops_with_let(a: T.Buffer[16, "float32"]):
+    for i in range(8):
+        j = i + 8
+        a[j] = a[i]
+
+
+def test_flops_with_let():
+    estimate_tir_flops(IRModule({"main": flops_with_let}))

Review Comment:
   Good point, done.



-- 
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] Hzfengsy commented on a diff in pull request #12138: [FIX,TIR] Handle LetStmt in EstimateTIRFLops

Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on code in PR #12138:
URL: https://github.com/apache/tvm/pull/12138#discussion_r928125306


##########
tests/python/unittest/test_tir_analysis_estimate_tir_flops.py:
##########
@@ -48,5 +50,16 @@ def test_te_workload(workload, flops):
     assert float(flops) == estimate_tir_flops(mod)
 
 
+@T.prim_func
+def flops_with_let(a: T.Buffer[16, "float32"]):
+    for i in range(8):
+        j = i + 8
+        a[j] = a[i]
+
+
+def test_flops_with_let():
+    estimate_tir_flops(IRModule({"main": flops_with_let}))

Review Comment:
   Could you please add an `assert` to check the flops number?



-- 
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] Hzfengsy merged pull request #12138: [FIX,TIR] Handle LetStmt in EstimateTIRFLops

Posted by GitBox <gi...@apache.org>.
Hzfengsy merged PR #12138:
URL: https://github.com/apache/tvm/pull/12138


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