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/12 23:51:31 UTC

[GitHub] [tvm] csullivan commented on a diff in pull request #10909: [Hexagon] Less aggressive adb state clean up

csullivan commented on code in PR #10909:
URL: https://github.com/apache/tvm/pull/10909#discussion_r848956577


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -373,9 +370,10 @@ def _run_server_script(self):
         )
         # Enable port forward for RPC server. We forward 9 ports after the rpc_server_port.
         for i in range(0, 10):
+            port = rpc_server_port + i
+            self.forwarded_ports_.append(port)
             subprocess.check_call(
-                self._adb_device_sub_cmd
-                + ["forward", f"tcp:{rpc_server_port+i}", f"tcp:{rpc_server_port+i}"]
+                self._adb_device_sub_cmd + ["forward", f"tcp:{port}", f"tcp:{port}"]

Review Comment:
   Thank you for the though on this, and no adb doesn't complain about multiple attempts to forward the same port. I decided to be more rigorous with port checking and only forward ports that are not already forwarded by adb or bound by another process. This seems to have greatly improved the stability. PTAL



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