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 2022/03/07 20:29:19 UTC

[GitHub] [tvm] Lunderberg opened a new pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

Lunderberg opened a new pull request #10520:
URL: https://github.com/apache/tvm/pull/10520


   Breakage was caused by https://github.com/apache/tvm/pull/9727, which didn't account for the new `builtin::mem_copy()` when computing the stack size in `StackSizeChecker`.  This wasn't caught in CI, because the test requires the hexagon toolchain/hardware to be present.


-- 
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] mehrdadh commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   @Lunderberg To run in the simulator, use the `ci-hexagon` docker image. Build TVM and hexagon api and then run [task_python_hexagon_simulator.sh](https://github.com/apache/tvm/blob/main/tests/scripts/task_python_hexagon_simulator.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] masahi merged pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   


-- 
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] kparzysz-quic commented on a change in pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on a change in pull request #10520:
URL: https://github.com/apache/tvm/pull/10520#discussion_r821728251



##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -73,10 +84,19 @@ class StackSizeChecker : public StmtExprVisitor {
       return MakeShape(op);
     } else if (op->op.same_as(builtin::tvm_stack_make_array())) {
       return MakeArray(op);
+    } else if (op->op.same_as(builtin::mem_copy())) {
+      return MakeMemCopy(op);

Review comment:
       That makes sense.  Does that mean that the name "nonexistent_function" is actually significant in the sense that its length equals or exceeds the length of the actually called function name?  That would be worth a comment (if that's the case).




-- 
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] adstraw commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   Still LGTM with latest changes and I can confirm the test in questions (test_cache_read_write.py) is passing locally.


-- 
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] Lunderberg edited a comment on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   I haven't tried running it on the simulator, no.  Is there a good entry point or example for how to call into it?


-- 
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] kparzysz-quic commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on pull request #10520:
URL: https://github.com/apache/tvm/pull/10520#issuecomment-1061118213


   Also, have you tried running this test on simulator?  That ability was just added over the weekend.


-- 
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] Lunderberg commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   I haven't tried running it on the simulator, no.


-- 
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] Lunderberg commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   @mehrdadh @adstraw 


-- 
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] Lunderberg commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   After a discussion with @adstraw , updated the fix here to remove the `StackSizeChecker` entirely.  Instead of having two cases that must be kept in sync, it instead runs the same `BuiltinLower` twice.


-- 
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] Lunderberg commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   Thank you, and I can run the change in the simulator, and have updated the ci scripts to include everything in the `tests/python/contrib/test_hexagon` directory.


-- 
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] kparzysz-quic commented on a change in pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on a change in pull request #10520:
URL: https://github.com/apache/tvm/pull/10520#discussion_r821085404



##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -73,10 +84,19 @@ class StackSizeChecker : public StmtExprVisitor {
       return MakeShape(op);
     } else if (op->op.same_as(builtin::tvm_stack_make_array())) {
       return MakeArray(op);
+    } else if (op->op.same_as(builtin::mem_copy())) {
+      return MakeMemCopy(op);

Review comment:
       Can't you just call `MakeCallPacked` for 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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] Lunderberg commented on a change in pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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



##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -73,10 +84,19 @@ class StackSizeChecker : public StmtExprVisitor {
       return MakeShape(op);
     } else if (op->op.same_as(builtin::tvm_stack_make_array())) {
       return MakeArray(op);
+    } else if (op->op.same_as(builtin::mem_copy())) {
+      return MakeMemCopy(op);

Review comment:
       I also figured that by having the `MakeMemCopyHelper` be shared between `StackSizeChecker` and `BuiltInLower` makes it harder for them to get out of sync in the future.




-- 
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] Lunderberg commented on a change in pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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



##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -73,10 +84,19 @@ class StackSizeChecker : public StmtExprVisitor {
       return MakeShape(op);
     } else if (op->op.same_as(builtin::tvm_stack_make_array())) {
       return MakeArray(op);
+    } else if (op->op.same_as(builtin::mem_copy())) {
+      return MakeMemCopy(op);

Review comment:
       Not quite, because the additional string for the name of the PackedFunc to execute takes up another spot on the stack.  But since I needed to test it in order to convince myself of that, I've added a comment to explain the reasoning.




-- 
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] mehrdadh edited a comment on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   I think the reason that CI didn't catch this is because we don't run this test in CI. We need fix this in both of these files:
   https://github.com/apache/tvm/blob/main/tests/scripts/task_python_hexagon.sh
   https://github.com/apache/tvm/blob/main/tests/scripts/task_python_hexagon_simulator.sh
   Basically, we need to run the test on the directory instead of the pytest file. So:
   
   ```
   --- a/tests/scripts/task_python_hexagon.sh
   +++ b/tests/scripts/task_python_hexagon.sh
   @@ -25,4 +25,4 @@ make cython3
    
   -run_pytest ctypes python-contrib-hexagon-no-hwardware tests/python/contrib/test_hexagon/test_launcher.py
   +run_pytest ctypes python-contrib-hexagon-no-hwardware tests/python/contrib/test_hexagon
   ```
   
   @Lunderberg can you add it to 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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] mehrdadh commented on pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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


   I think the reason that CI didn't catch this is because we don't run this test in CI. We need fix this in both of these files:
   https://github.com/apache/tvm/blob/main/tests/scripts/task_python_hexagon.sh
   https://github.com/apache/tvm/blob/main/tests/scripts/task_python_hexagon_simulator.sh
   we need to run the test on the directory instead of the pytest file. So:
   
   ```
   --- a/tests/scripts/task_python_hexagon.sh
   +++ b/tests/scripts/task_python_hexagon.sh
   @@ -25,4 +25,4 @@ make cython3
    
   -run_pytest ctypes python-contrib-hexagon-no-hwardware tests/python/contrib/test_hexagon/test_launcher.py
   +run_pytest ctypes python-contrib-hexagon-no-hwardware tests/python/contrib/test_hexagon
   ```
   
   @Lunderberg can you add it to 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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] Lunderberg commented on a change in pull request #10520: [Hexagon] Resolve breakage in test_hexagon/test_cache_read_write

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



##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -73,10 +84,19 @@ class StackSizeChecker : public StmtExprVisitor {
       return MakeShape(op);
     } else if (op->op.same_as(builtin::tvm_stack_make_array())) {
       return MakeArray(op);
+    } else if (op->op.same_as(builtin::mem_copy())) {
+      return MakeMemCopy(op);

Review comment:
       Good question to ask, and no, the function name isn't significant.  The stack size here is in number of arguments, where a string only counts as a single argument.




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