kevinthesun commented on a change in pull request #4303: [TOPI][Relay][OP] Add
a strided_set operation.
URL: https://github.com/apache/incubator-tvm/pull/4303#discussion_r349860433
##########
File path: python/tvm/relay/op/transform.py
##########
@@ -631,6 +631,36 @@ def strided_slice(data, begin, end, strides=None):
return _make.strided_slice(data, list(begin), list(end), list(strides))
+def strided_set(data, v, begin, end, strides=None):
+ """Strided set of an array.
+
+ Parameters
+ ----------
+ data : relay.Expr
+ The source array to be sliced.
+
+ v : relay.Expr
+ The data to be set.
+
+ begin: list of int
Review comment:
Thank you for adding this op. Currently @yongwww is modifying
strided_slice(https://github.com/apache/incubator-tvm/pull/4312) to support
begin, end and strides to be expression instead of just list of int. The reason
is that in some DL frameworks, begin, end or strides can be a tensor. Also
making it more dynamic can help us when building other ops, such as NMS.
Considering this op is similar to strided_slice, should we keep it align with
stride_slice, and allow begin, end and strides to be Expr?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services