sunggg commented on code in PR #14548:
URL: https://github.com/apache/tvm/pull/14548#discussion_r1161808817
##########
python/tvm/relax/transform/legalize_ops/index.py:
##########
@@ -59,3 +60,39 @@ def _strided_slice(bb: BlockBuilder, call: Call) -> Expr:
call.attrs.axes,
slice_mode="end",
)
+
+
+@register_legalize("relax.dynamic_strided_slice")
+def _dynamic_strided_slice(bb: BlockBuilder, call: Call) -> Expr:
+ # 1. Insert shape function
+ output_shape = bb.normalize(
+ bb.call_te(
+ topi.shape_func_dynamic_strided_slice,
Review Comment:
I considered two options: TE and TIR, and chose TE since it is easier to
write.
I did not consider the hybrid script since I did not want users to learn new
thing only for the shape function.
Would hybrid script help in this case? Also, I'm open for other suggestions
as well.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]