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/08 20:59:15 UTC

[GitHub] [tvm] kparzysz-quic opened a new pull request, #10945: [Hexagon] Handle TCP server binding to unknown port

kparzysz-quic opened a new pull request, #10945:
URL: https://github.com/apache/tvm/pull/10945

   The server IP address will be obtained from the RPC tracker, but multiple servers must be distinguishable. To enable this, set a unique key when starting a server, and use that key when starting a session.


-- 
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 a diff in pull request #10945: [Hexagon] Handle TCP server binding to unknown port

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


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -110,6 +110,7 @@ def __init__(self, rpc_info: dict, workspace: Union[str, pathlib.Path] = None):
         }
         self._rpc_info.update(rpc_info)
         self._workspace = self._create_workspace(workspace)
+        self._device_key = self.HEXAGON_REMOTE_DEVICE_KEY

Review Comment:
   This is okay as it is. Not sure if this could solve some of the existing issues with test flakiness on Android. We can consider it later.



-- 
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 #10945: [Hexagon] Handle TCP server binding to unknown port

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

   To add more context here: the RPC server will connect to a first available port in some range (which typically starts at 7070).  If there are two servers running on the same machine, one of them will get 7070, and the other 7071.  The clients will not know the actual port, instead they will query the RPC tracker for a server with a given device key.  Since the Hexagon RPC server always used the same key, the tracker could not distinguish between the one bound to 7070, and the one bound to 7071.  To avoid this ambiguity, make the device key unique (by attaching the PID of the process creating it to 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 a diff in pull request #10945: [Hexagon] Handle TCP server binding to unknown port

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on code in PR #10945:
URL: https://github.com/apache/tvm/pull/10945#discussion_r847523310


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -110,6 +110,7 @@ def __init__(self, rpc_info: dict, workspace: Union[str, pathlib.Path] = None):
         }
         self._rpc_info.update(rpc_info)
         self._workspace = self._create_workspace(workspace)
+        self._device_key = self.HEXAGON_REMOTE_DEVICE_KEY

Review Comment:
   You're right: the idea is to get the PID of the process that starts the server.  The launcher itself may be created once ahead of time, and then we'd have the same PID for every server.  Since the base class only has an abstract method `start_server`, the appending of the PID is done in the actual implementations.  I'm setting the member `_device_key`, here so that it exists in the object.
   
   At the moment, the PID is only appended for the simulator.  Do you think we should do that for Android as well?



-- 
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 merged pull request #10945: [Hexagon] Handle TCP server binding to unknown port

Posted by GitBox <gi...@apache.org>.
mehrdadh merged PR #10945:
URL: https://github.com/apache/tvm/pull/10945


-- 
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 #10945: [Hexagon] Handle TCP server binding to unknown port

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

   cc: @masahi 


-- 
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 diff in pull request #10945: [Hexagon] Handle TCP server binding to unknown port

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on code in PR #10945:
URL: https://github.com/apache/tvm/pull/10945#discussion_r847523310


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -110,6 +110,7 @@ def __init__(self, rpc_info: dict, workspace: Union[str, pathlib.Path] = None):
         }
         self._rpc_info.update(rpc_info)
         self._workspace = self._create_workspace(workspace)
+        self._device_key = self.HEXAGON_REMOTE_DEVICE_KEY

Review Comment:
   The idea is to get the PID of the process that starts the server.  The launcher itself may be created once ahead of time, and then we'd have the same PID for every server.  Since the base class only has an abstract method `start_server`, the appending of the PID is done in the actual implementations.  I'm setting the member `_device_key`, here so that it exists in the object.
   
   At the moment, the PID is only appended for the simulator.  Do you think we should do that for Android as well?



-- 
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 a diff in pull request #10945: [Hexagon] Handle TCP server binding to unknown port

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


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -110,6 +110,7 @@ def __init__(self, rpc_info: dict, workspace: Union[str, pathlib.Path] = None):
         }
         self._rpc_info.update(rpc_info)
         self._workspace = self._create_workspace(workspace)
+        self._device_key = self.HEXAGON_REMOTE_DEVICE_KEY

Review Comment:
   wouldn't this always set the key to be `self.HEXAGON_REMOTE_DEVICE_KEY`? My understanding is that the goal is to be able to set the `key` to distinguish RPC server between different tests/runs.



-- 
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 a diff in pull request #10945: [Hexagon] Handle TCP server binding to unknown port

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


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -110,6 +110,7 @@ def __init__(self, rpc_info: dict, workspace: Union[str, pathlib.Path] = None):
         }
         self._rpc_info.update(rpc_info)
         self._workspace = self._create_workspace(workspace)
+        self._device_key = self.HEXAGON_REMOTE_DEVICE_KEY

Review Comment:
   wouldn't this always set the key to be `self.HEXAGON_REMOTE_DEVICE_KEY`? My understanding is that the goal is to be able to set the `key` to distinguish RPC server between different tests/runs?



-- 
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 diff in pull request #10945: [Hexagon] Handle TCP server binding to unknown port

Posted by GitBox <gi...@apache.org>.
kparzysz-quic commented on code in PR #10945:
URL: https://github.com/apache/tvm/pull/10945#discussion_r849506464


##########
python/tvm/contrib/hexagon/build.py:
##########
@@ -110,6 +110,7 @@ def __init__(self, rpc_info: dict, workspace: Union[str, pathlib.Path] = None):
         }
         self._rpc_info.update(rpc_info)
         self._workspace = self._create_workspace(workspace)
+        self._device_key = self.HEXAGON_REMOTE_DEVICE_KEY

Review Comment:
   Do you have any additional comments?  Should I add this for Android as well, or is it ok as it is?



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