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/10/28 11:56:40 UTC

[GitHub] [incubator-tvm] Presburger commented on pull request #6785: fix a bug in convertSSA.

Presburger commented on pull request #6785:
URL: https://github.com/apache/incubator-tvm/pull/6785#issuecomment-717884931


   OK, @leandron 
   I find a IR look like this before Loop Partition.
   ```cc
   for(i1: int32, 0, 36){
       attr [IterVar(x.inner, (nullptr), "DataPar", "")]{
       for (x.inner, 0, 9) {
           if(likely(i1<18))
           .....
           else
           .....
   }
   }
   } 
   ```
   Loop Partition will transform this IR to
   ```cc
   for(i1: int32, 0, 18){
       attr [IterVar(x.inner, (nullptr), "DataPar", "")]{
       for (x.inner, 0, 9) {
           .....
   }
   }
   }
   for(i1: int32, 18, 36){
       attr [IterVar(x.inner, (nullptr), "DataPar", "")]{
       for (x.inner, 0, 9) {
           .....
   }
   }
   }
   ```
   then IR pass to ConvertSSA, when visited secnd for loop 's x.inner, tvm may crash.
   because try to call vector::back when the vector container is empty.
   
   
   


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