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 2020/11/30 09:46:44 UTC

[GitHub] [tvm] d-smirnov opened a new pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

d-smirnov opened a new pull request #6998:
URL: https://github.com/apache/tvm/pull/6998


   1. Added removal of dimensions if result is a scalar
   to mimic TensorFlow behaviour. E.g.:
       tf.strided_slice([1,2,3], [0], [1], [1], shrink_axis_mask=0)
       <tf.Tensor: shape=(1,), dtype=int32, numpy=array([1], dtype=int32)>
   
       tf.strided_slice([[[1,2,3],[4,5,6],[7,8,9]]], [0, 0, 0], [3, 3, 3], [1, 1, 1], shrink_axis_mask=7)
       <tf.Tensor: shape=(), dtype=int32, numpy=1>
   
   2. Added extra check to assert_allclose to check shape equalities
   as np.testing.assert_allclose() does not distinguish between cases like:
   
       np.testing.assert_allclose(1, np.array(1))
       np.testing.assert_allclose(1, np.array([1]))
       np.testing.assert_allclose(np.array(1), np.array([1]))


----------------------------------------------------------------
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] d-smirnov commented on a change in pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

Posted by GitBox <gi...@apache.org>.
d-smirnov commented on a change in pull request #6998:
URL: https://github.com/apache/tvm/pull/6998#discussion_r560903430



##########
File path: tests/python/integration/test_reduce.py
##########
@@ -191,11 +191,11 @@ def test_rfactor_factor_axis():
     n = tvm.runtime.convert(1027)
     A = te.placeholder((n,), name="A")
     k = te.reduce_axis((0, n))
-    B = te.compute((1,), lambda i: te.sum(A[k], axis=k), name="B")

Review comment:
       The PR added extra check for the shape of the arguments for `np.testing.assert_allclose`




----------------------------------------------------------------
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] FrozenGene merged pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

Posted by GitBox <gi...@apache.org>.
FrozenGene merged pull request #6998:
URL: https://github.com/apache/tvm/pull/6998


   


----------------------------------------------------------------
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] FrozenGene commented on a change in pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

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



##########
File path: tests/python/integration/test_reduce.py
##########
@@ -191,11 +191,11 @@ def test_rfactor_factor_axis():
     n = tvm.runtime.convert(1027)
     A = te.placeholder((n,), name="A")
     k = te.reduce_axis((0, n))
-    B = te.compute((1,), lambda i: te.sum(A[k], axis=k), name="B")

Review comment:
       how is the issue here? Why this pr expose this problem?




----------------------------------------------------------------
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] d-smirnov commented on pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

Posted by GitBox <gi...@apache.org>.
d-smirnov commented on pull request #6998:
URL: https://github.com/apache/tvm/pull/6998#issuecomment-761053826


   How can we make a progress here?


----------------------------------------------------------------
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] FrozenGene commented on pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

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


   @d-smirnov I will review it today, thanks!


----------------------------------------------------------------
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] FrozenGene commented on pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

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


   please fix ci problem


----------------------------------------------------------------
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] d-smirnov commented on pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

Posted by GitBox <gi...@apache.org>.
d-smirnov commented on pull request #6998:
URL: https://github.com/apache/tvm/pull/6998#issuecomment-741720832


   Ping. How can we make some progress here?
   @comaniac  Please advise should the commit be split? What to do with failed unit tests?


----------------------------------------------------------------
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] FrozenGene merged pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

Posted by GitBox <gi...@apache.org>.
FrozenGene merged pull request #6998:
URL: https://github.com/apache/tvm/pull/6998


   


----------------------------------------------------------------
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] comaniac commented on pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

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


   > Ping. How can we make some progress here?
   > @comaniac Please advise should the commit be split? What to do with failed unit tests?
   
   I'm not familiar with TFLite frontend. cc @siju-samuel @FrozenGene 


----------------------------------------------------------------
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] d-smirnov commented on pull request #6998: [TFLite] Strided slice handling of shrink_axis_mask improved

Posted by GitBox <gi...@apache.org>.
d-smirnov commented on pull request #6998:
URL: https://github.com/apache/tvm/pull/6998#issuecomment-754128584


   bump cc @siju-samuel @FrozenGene
   Please, also advise on extra check to _assert_allclose_


----------------------------------------------------------------
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