slyubomirsky commented on code in PR #14282:
URL: https://github.com/apache/tvm/pull/14282#discussion_r1134700431
##########
python/tvm/relax/op/base.py:
##########
@@ -402,3 +402,17 @@ def shape_of(expr: Expr) -> Expr:
A relax Call, which gets the shape of the input
"""
return _ffi_api.shape_of(expr) # type: ignore # pylint: disable=no-member
+
+
+def tensor_to_shape(expr: Expr) -> Expr:
+ """Convert tensor to shape expr.
+ Parameters
+ ----------
+ expr : Expr
+ The input Expr
+ Returns
+ -------
+ result : ShapeExpr
Review Comment:
Not entirely correct, the result is an expression of `Shape` type (it's an
op call).
--
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]