You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "JR4er (via GitHub)" <gi...@apache.org> on 2023/05/05 09:39:09 UTC
[GitHub] [tvm] JR4er opened a new pull request, #14773: [bugfix][Relay] fix `scatter_nd` type relation
JR4er opened a new pull request, #14773:
URL: https://github.com/apache/tvm/pull/14773
```python
import tvm
import numpy as np
from tvm import relay
def should_pass():
data = relay.const(np.zeros([1,1,10], 'float32'))
indices = relay.const(np.ones([2,1,1,1], 'int64'))
updates = relay.const(np.random.rand(1,1,1,10).astype('float32'))
scatter_nd = relay.scatter_nd(data, indices, updates)
mod = tvm.IRModule.from_expr(scatter_nd)
mod = relay.transform.InferType()(mod)
def should_fail():
data = relay.const(np.zeros([1,1,10], 'float32'))
indices = relay.const(np.ones([2,1,1], 'int64'))
updates = relay.const(np.random.rand(1,1,5).astype('float32'))
scatter_nd = relay.scatter_nd(data, indices, updates)
mod = tvm.IRModule.from_expr(scatter_nd)
mod = relay.transform.InferType()(mod)
```
case `should_pass` will report a error
> Check failed: (0 <= i && i < p->size_) is false: IndexError: indexing 3 on an array of size 3
case `should_fail` will pass incorrectly. however FoldConstant will find the error:
> AssertionError: Dimension of updates[2] (5) must equal dimension of out_shape[2] (10).
--
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] masahi merged pull request #14773: [BugFix][Relay] fix `scatter_nd` type relation
Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi merged PR #14773:
URL: https://github.com/apache/tvm/pull/14773
--
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] tvm-bot commented on pull request #14773: [bugfix][Relay] fix `scatter_nd` type relation
Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #14773:
URL: https://github.com/apache/tvm/pull/14773#issuecomment-1535995710
<!---bot-comment-->
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
<!--bot-comment-ccs-start-->
* cc @shingjan <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
<sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>
--
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