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/04/15 23:35:07 UTC

[GitHub] [tvm] mehrdadh commented on a diff in pull request #11026: [Hexagon] Refactor test scripts

mehrdadh commented on code in PR #11026:
URL: https://github.com/apache/tvm/pull/11026#discussion_r851555881


##########
tests/scripts/task_python_hexagon.sh:
##########
@@ -18,10 +18,34 @@
 
 set -e
 set -u
-set -x
 
-source tests/scripts/setup-pytest-env.sh
+device_serial="simulator"
+if [ $# -ge 1 ] && [[ "$1" = "--device" ]]; then
+    shift 1
+    device_serial="$1"
+    shift
+fi
 
+source tests/scripts/setup-pytest-env.sh
 make cython3
 
+if [[ "${device_serial}" == "simulator" ]]; then
+    export TVM_TRACKER_PORT=9190
+    export TVM_TRACKER_HOST=0.0.0.0
+    env PYTHONPATH=python python3 -m tvm.exec.rpc_tracker --host "${TVM_TRACKER_HOST}" --port "${TVM_TRACKER_PORT}" &

Review Comment:
   probably not, so I guess whether the script reaches the `kill` command depends on the brhaviour of `run_pytest` command in case an error happens on one of the tests.
   I think there are other ways to run tracker in python test files which we can replace them.



##########
tests/scripts/task_python_hexagon.sh:
##########
@@ -18,10 +18,34 @@
 
 set -e
 set -u
-set -x
 
-source tests/scripts/setup-pytest-env.sh
+device_serial="simulator"
+if [ $# -ge 1 ] && [[ "$1" = "--device" ]]; then
+    shift 1
+    device_serial="$1"
+    shift
+fi
 
+source tests/scripts/setup-pytest-env.sh
 make cython3
 
+if [[ "${device_serial}" == "simulator" ]]; then
+    export TVM_TRACKER_PORT=9190
+    export TVM_TRACKER_HOST=0.0.0.0
+    env PYTHONPATH=python python3 -m tvm.exec.rpc_tracker --host "${TVM_TRACKER_HOST}" --port "${TVM_TRACKER_PORT}" &

Review Comment:
   probably not, so I guess whether the script reaches the `kill` command depends on the brhaviour of `run_pytest` command in case an error happens on one of the tests.
   I think there are other ways to run tracker in python test files which we can replace 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