kevinthesun commented on a change in pull request #6449:
URL: https://github.com/apache/incubator-tvm/pull/6449#discussion_r487300464
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -429,25 +507,56 @@ def _impl(inputs, input_types):
return _impl
+def _full_impl(data, fill_value, dtype):
+ size = []
+ need_reshape = False
+ new_shape = []
+ for dim in data:
+ if isinstance(dim, _expr.Expr):
+ if isinstance(dim, _expr.Constant):
+ dim = int(dim.data.asnumpy())
+ if isinstance(size, list):
+ size.append(dim)
+ new_shape.append(dim)
+ else:
+ try:
+ dim = int(_infer_value(dim, {}).asnumpy())
Review comment:
Same. These try except blocks are necessary to handle dynamic operators.
----------------------------------------------------------------
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]