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 2023/01/05 03:23:39 UTC

[GitHub] [tvm] woobinw opened a new pull request, #13701: [Frontend][PaddlePaddle] Fix bug, when the output is a dimension, it …

woobinw opened a new pull request, #13701:
URL: https://github.com/apache/tvm/pull/13701

   There are some operation in PaddlePaddle that output a tensor which shape is [1], meanwhile, the slice op have decrease_axis attr, but it should not be squeezed.
   
   
   @heliqi 
   @jiangjiajun 
   cc @junrushao 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] heliqi commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
heliqi commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1373228678

   > > Would you like to fix the CI so we could get it in?
   > > `E       File "/workspace/tests/python/frontend/paddlepaddle/test_forward.py", line 1356, in slice5 (* user code *) [2023-01-05T11:12:37.644Z] E   	b, c, h, w = paddle.shape(inputs)  # add decrease_axis`
   > > I think this error may be related to the version of the paddlepaddle
   
   The paddlepaddle version we matched before was 2.1.3.
   If you want to upgrade and match the latest paddlepaddle version, you can pull request and modify the Paddle version in [the code](https://github.com/apache/tvm/blob/a047e0228a3f7015e56c6756cdadb13444008623/docker/python/ci-constraints.txt
   )  and [the code](https://github.com/apache/tvm/blob/98eab45d52911662ff760fb0bbdccc11f3a31b9f/docker/install/ubuntu_install_paddle.sh).
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1383472557

   Thank you for pinging me @woobinw! Indeed the failure is not relevant to the change you brought in, and I'm not sure if it's flaky or consistently reproducible error. Retriggered the test just now, and let's see if it could work this timw


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1373110925

   > Would you like to fix the CI so we could get it in?
   
   I think 
   
   > h
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1397544506

   seems like there is some issues in rebasing and now the PR has inflated to 25k lines 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao merged pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao merged PR #13701:
URL: https://github.com/apache/tvm/pull/13701


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1373112619

   > Would you like to fix the CI so we could get it in?
   `E       File "/workspace/tests/python/frontend/paddlepaddle/test_forward.py", line 1356, in slice5 (* user code *)
   [2023-01-05T11:12:37.644Z] E   	b, c, h, w = paddle.shape(inputs)  # add decrease_axis`
   I think this error may be related to the version of the paddlepaddle


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13701: [Frontend][PaddlePaddle] Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1371741543

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to tag found in teams: `frontend`, `paddlepaddle` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1399103746

   Thanks for the contribution! It’s merged!


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1396770869

   > Could you rebase to latest HEAD? I’m sure it’s going to pass this time
   
   Yes, It has been rebased to latest HEAD.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1384431392

   @tvm-bot rerun


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw closed pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw closed pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …
URL: https://github.com/apache/tvm/pull/13701


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw commented on a diff in pull request #13701: [Frontend][PaddlePaddle] Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw commented on code in PR #13701:
URL: https://github.com/apache/tvm/pull/13701#discussion_r1062278664


##########
tests/python/frontend/paddlepaddle/test_forward.py:
##########
@@ -1681,5 +1687,15 @@ def forward(self, inputs, prev_h):
         )
 
 
+@tvm.testing.uses_gpu
+def test_forward_topk():
+    @paddle.jit.to_static
+    def topk1(inputs):
+        return paddle.topk(inputs, k=1)
+
+    input_data = paddle.to_tensor([1, 4, 5, 7])
+    verify_model(topk1, input_data=input_data)

Review Comment:
   according to paddle.topk api, there seems is no a argument to control the output that only have the values or indices



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1373099525

   Would you like to fix the CI so we could get it in?


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1375407429

   > > > Would you like to fix the CI so we could get it in?
   > > > `E       File "/workspace/tests/python/frontend/paddlepaddle/test_forward.py", line 1356, in slice5 (* user code *) [2023-01-05T11:12:37.644Z] E   	b, c, h, w = paddle.shape(inputs)  # add decrease_axis`
   > > > I think this error may be related to the version of the paddlepaddle
   > > > @woobinw
   > > > The paddlepaddle version we matched before was 2.1.3.
   > > > If you want to upgrade and match the latest paddlepaddle version 2.4, you can pull request and modify the Paddle version in [the code](https://github.com/apache/tvm/blob/a047e0228a3f7015e56c6756cdadb13444008623/docker/python/ci-constraints.txt)  and [the code](https://github.com/apache/tvm/blob/98eab45d52911662ff760fb0bbdccc11f3a31b9f/docker/install/ubuntu_install_paddle.sh).
   
   `[2023-01-09T07:38:22.462Z] tests/python/frontend/paddlepaddle/test_forward.py:81: in verify_model
   
   [2023-01-09T07:38:22.462Z]     baseline_outputs = baseline_model(*[input[:] for input in input_data])
   
   [2023-01-09T07:38:22.462Z] /venv/apache-tvm-py3.7/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:902: in __call__
   
   [2023-01-09T07:38:22.462Z]     outputs = self.forward(*inputs, **kwargs)
   
   [2023-01-09T07:38:22.462Z] /venv/apache-tvm-py3.7/lib/python3.7/site-packages/paddle/fluid/dygraph/io.py:1191: in __i_m_p_l__
   
   [2023-01-09T07:38:22.462Z]     return _run_dygraph(self, input, program_holder)
   
   [2023-01-09T07:38:22.462Z] /venv/apache-tvm-py3.7/lib/python3.7/site-packages/paddle/fluid/dygraph/io.py:754: in _run_dygraph`


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] woobinw commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
woobinw commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1383468614

   @junrushao 
   The ethosu test seems to have nothing to do with PaddlePaddle frontend.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao commented on pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
junrushao commented on PR #13701:
URL: https://github.com/apache/tvm/pull/13701#issuecomment-1396424581

   Could you rebase to latest HEAD? I’m sure it’s going to pass this time


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] heliqi commented on a diff in pull request #13701: [Frontend][PaddlePaddle] Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
heliqi commented on code in PR #13701:
URL: https://github.com/apache/tvm/pull/13701#discussion_r1062261690


##########
tests/python/frontend/paddlepaddle/test_forward.py:
##########
@@ -1681,5 +1687,15 @@ def forward(self, inputs, prev_h):
         )
 
 
+@tvm.testing.uses_gpu
+def test_forward_topk():
+    @paddle.jit.to_static
+    def topk1(inputs):
+        return paddle.topk(inputs, k=1)
+
+    input_data = paddle.to_tensor([1, 4, 5, 7])
+    verify_model(topk1, input_data=input_data)

Review Comment:
   You can add a few different cases, example:
   1. k is a tensor and not just a int
   2. set largest/axis/sort attribute 
   3. The output is only the values or the indices.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] heliqi commented on a diff in pull request #13701: [Frontend][PaddlePaddle] Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
heliqi commented on code in PR #13701:
URL: https://github.com/apache/tvm/pull/13701#discussion_r1062261690


##########
tests/python/frontend/paddlepaddle/test_forward.py:
##########
@@ -1681,5 +1687,15 @@ def forward(self, inputs, prev_h):
         )
 
 
+@tvm.testing.uses_gpu
+def test_forward_topk():
+    @paddle.jit.to_static
+    def topk1(inputs):
+        return paddle.topk(inputs, k=1)
+
+    input_data = paddle.to_tensor([1, 4, 5, 7])
+    verify_model(topk1, input_data=input_data)

Review Comment:
   You can add a few different cases, example:
   1. k is a tensor and not a int
   2. set largest/axis/sort attribute 
   3. The output is only the values or the indices.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] heliqi commented on a diff in pull request #13701: [Frontend][PaddlePaddle] Add topk op and Fix bug, when the output is a dimension, it …

Posted by GitBox <gi...@apache.org>.
heliqi commented on code in PR #13701:
URL: https://github.com/apache/tvm/pull/13701#discussion_r1062402600


##########
tests/python/frontend/paddlepaddle/test_forward.py:
##########
@@ -1681,5 +1687,15 @@ def forward(self, inputs, prev_h):
         )
 
 
+@tvm.testing.uses_gpu
+def test_forward_topk():
+    @paddle.jit.to_static
+    def topk1(inputs):
+        return paddle.topk(inputs, k=1)
+
+    input_data = paddle.to_tensor([1, 4, 5, 7])
+    verify_model(topk1, input_data=input_data)

Review Comment:
   Yes, the paddle.topk api will definitely have two outputs.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org