You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/04 04:10:49 UTC

[GitHub] [tvm] wangxiang2713 opened a new pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

wangxiang2713 opened a new pull request #7583:
URL: https://github.com/apache/tvm/pull/7583


   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] mbrookhart commented on a change in pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on a change in pull request #7583:
URL: https://github.com/apache/tvm/pull/7583#discussion_r591639980



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -44,6 +44,28 @@
 __all__ = ["from_tensorflow"]
 
 
+def check_symbolic_shape(shape):
+    return not all([isinstance(dim, (int, tvm.tir.IntImm)) for dim in shape])

Review comment:
       There's a utility to do this here: https://github.com/apache/tvm/blob/e561007f0c330e3d14c2bc8a3ef40fb741db9004/python/tvm/relay/ty.py#L29

##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -44,6 +44,28 @@
 __all__ = ["from_tensorflow"]
 
 
+def check_symbolic_shape(shape):
+    return not all([isinstance(dim, (int, tvm.tir.IntImm)) for dim in shape])
+
+
+def list_shape_of(tensor, ndim):
+    shape_tensor = _op.shape_of(tensor)
+    return [
+        _op.strided_slice(shape_tensor, begin=[i], end=[i + 1], strides=[1]) for i in range(ndim)
+    ]

Review comment:
       I'm not sure I understand this utility, but perhaps `take` would be more appropriate than `strided_slice`?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] mbrookhart commented on pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #7583:
URL: https://github.com/apache/tvm/pull/7583#issuecomment-825867096


   @wangxiang2713 Any chance you can get back to this?


-- 
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:
users@infra.apache.org



[GitHub] [tvm] mbrookhart edited a comment on pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
mbrookhart edited a comment on pull request #7583:
URL: https://github.com/apache/tvm/pull/7583#issuecomment-825867096


   @wangxiang2713 Thanks for the contribution. Any chance you can get back to this?


-- 
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:
users@infra.apache.org



[GitHub] [tvm] wangxiang2713 commented on pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
wangxiang2713 commented on pull request #7583:
URL: https://github.com/apache/tvm/pull/7583#issuecomment-826185573


   I'm sorry that Tensorflow StridedSlice OP may meet many different situations for dynamic inputs, as input parameters begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask. We may try to solve this by change tensorflow graph. Thanks a lot for reviewing, close this.


-- 
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:
users@infra.apache.org



[GitHub] [tvm] wangxiang2713 closed pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
wangxiang2713 closed pull request #7583:
URL: https://github.com/apache/tvm/pull/7583


   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] wangxiang2713 commented on pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
wangxiang2713 commented on pull request #7583:
URL: https://github.com/apache/tvm/pull/7583#issuecomment-826185573


   I'm sorry that Tensorflow StridedSlice OP may meet many different situations for dynamic inputs, as input parameters begin_mask, end_mask, ellipsis_mask, new_axis_mask, shrink_axis_mask. We may try to solve this by change tensorflow graph. Thanks a lot for reviewing, close this.


-- 
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:
users@infra.apache.org



[GitHub] [tvm] wangxiang2713 closed pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
wangxiang2713 closed pull request #7583:
URL: https://github.com/apache/tvm/pull/7583


   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on pull request #7583: [Frontend][Tensorflow] dynamic support for StridedSlice

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #7583:
URL: https://github.com/apache/tvm/pull/7583#issuecomment-795604856


   cc @kevinthesun @mbrookhart please help to review this PR


----------------------------------------------------------------
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:
users@infra.apache.org