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 2021/01/08 20:41:44 UTC

[GitHub] [tvm] comaniac opened a new pull request #7232: Fix const array

comaniac opened a new pull request #7232:
URL: https://github.com/apache/tvm/pull/7232


   #7018 introduces the dynamic support to `strided_slice`. However, in the following case, the static workload will be treat as a dynamic:
   
   ```
   cpp.strided_slice(weight, begin=[0, 0, 0, 0], end=[None, None, filter_h, filter_w])
   ```
   
   This is because the `None` in `end` is not `IntImmNode` and will be judged as a non-constant array. This PR changes the behavior by ignoring the undefined elements.
   
   In addition, the dynamic path also assumes `strides` array is always given, but it will be initialized to array of 1 after this path. Since I'm not sure what's the right behavior, I only add a checker to error out.
   
   cc @kevinthesun @mbrookhart 


----------------------------------------------------------------
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] [tvm] mbrookhart commented on pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #7232:
URL: https://github.com/apache/tvm/pull/7232#issuecomment-757002649


   I didn't know we could use None. Is there a way to test it in the unit tests? 
   
   I'd like to see a unit test, but otherwise it looks good.


----------------------------------------------------------------
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] [tvm] comaniac commented on pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #7232:
URL: https://github.com/apache/tvm/pull/7232#issuecomment-757011786






----------------------------------------------------------------
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] [tvm] mbrookhart commented on pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #7232:
URL: https://github.com/apache/tvm/pull/7232#issuecomment-757002649


   I didn't know we could use None. Is there a way to test it in the unit tests? 
   
   I'd like to see a unit test, but otherwise it looks good.


----------------------------------------------------------------
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] [tvm] comaniac commented on pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #7232:
URL: https://github.com/apache/tvm/pull/7232#issuecomment-757089909


   Thanks @mbrookhart @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] [tvm] comaniac merged pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
comaniac merged pull request #7232:
URL: https://github.com/apache/tvm/pull/7232


   


----------------------------------------------------------------
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] [tvm] comaniac commented on pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #7232:
URL: https://github.com/apache/tvm/pull/7232#issuecomment-757011786


   > I didn't know we could use None. Is there a way to test it in the unit tests?
   > 
   > I'd like to see a unit test, but otherwise it looks good.
   
   It is supported here: https://github.com/apache/tvm/blob/main/include/tvm/topi/transform.h#L658 (so does `begin`). A test case is also 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] [tvm] comaniac merged pull request #7232: [TOPI] Treat undefined elements as constants in Array

Posted by GitBox <gi...@apache.org>.
comaniac merged pull request #7232:
URL: https://github.com/apache/tvm/pull/7232


   


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