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/07/13 04:41:07 UTC

[GitHub] [incubator-tvm] merrymercy opened a new pull request #6041: [CODEGEN] Fix code generation bugs for cuda & Improve VerifyGPUCode pass

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


   - Fix a bug when generating unrolled and vectorized cuda code
       This bug is the same as the bug in https://github.com/apache/incubator-tvm/pull/711. In the old PR, I only added a new SSA scope for the "else" branch. But in the "then" branch, it has the same problem. So I moved the addition of a new SSA scope to the top-level.
   - Fix a bug when generating cuda code for`tir.reinterpret`
      If we call `tir.reinterpret` on an rvalue, the existing strategy will generate wrong code. Because we cannot get the address of an rvalue. To fix this, we need to store the rvalue into a temporary variable and get the address of this temporary variable.
   - Improve the VeirfyGPUCode pass
     Besides checking the LoadNode, we should also check the StoreNode.
     


----------------------------------------------------------------
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 #6041: [CODEGEN] Fix code generation bugs for C/CUDA & Improve VerifyGPUCode pass

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


   


----------------------------------------------------------------
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] merrymercy commented on a change in pull request #6041: [CODEGEN] Fix code generation bugs for C/CUDA & Improve VerifyGPUCode pass

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



##########
File path: src/target/source/codegen_c.cc
##########
@@ -720,14 +720,15 @@ void CodeGenC::VisitStmt_(const StoreNode* op) {
   } else {
     CHECK(is_one(op->predicate)) << "Predicated store is not supported";
     arith::PVar<PrimExpr> base;
+
+    // The assignment below introduces side-effect, and the resulting value cannot
+    // be reused across multiple expression, thus a new scope is needed

Review comment:
       test case added




----------------------------------------------------------------
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] jcf94 commented on a change in pull request #6041: [CODEGEN] Fix code generation bugs for C/CUDA & Improve VerifyGPUCode pass

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



##########
File path: src/target/source/codegen_c.cc
##########
@@ -720,14 +720,15 @@ void CodeGenC::VisitStmt_(const StoreNode* op) {
   } else {
     CHECK(is_one(op->predicate)) << "Predicated store is not supported";
     arith::PVar<PrimExpr> base;
+
+    // The assignment below introduces side-effect, and the resulting value cannot
+    // be reused across multiple expression, thus a new scope is needed

Review comment:
       Great!
   Do we need to add some UTs to cover these cases?




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