leandron commented on a change in pull request #6279:
URL: https://github.com/apache/incubator-tvm/pull/6279#discussion_r470687919
##########
File path: tests/python/contrib/test_arm_compute_lib/infrastructure.py
##########
@@ -42,27 +50,15 @@ def __init__(self):
@classmethod
def _get_remote(cls):
"""Get a remote (or local) device to use for testing."""
- if cls.use_remote:
- # Here you may adjust settings to run the ACL unit tests via a
remote
- # device using the RPC mechanism. Use this in the case you want to
compile
- # an ACL module on a different machine to what you run the module
on i.e.
- # x86 -> AArch64.
- #
- # Use the following to connect directly to a remote device:
- # device = rpc.connect(
- # hostname="0.0.0.0",
- # port=9090)
- #
- # Or connect via a tracker:
- # device = tvm.autotvm.measure.request_remote(
- # host="0.0.0.0",
- # port=9090,
- # device_key="device_key",
- # timeout=1000)
- #
- # return device
- raise NotImplementedError(
- "Please adjust these settings to connect to your remote
device.")
+ if cls.rpc_host != "localhost":
+ if cls.rpc_device_key:
+ device = request_remote(cls.rpc_device_key,
+ cls.rpc_host,
+ cls.rpc_port,
+ timeout=1000)
+ else:
+ device = rpc.connect(cls.rpc_host, cls.rpc_port)
+ return device
Review comment:
nitpick: You can simplify this function by having only one return
statement. I suggest taking this return out of the `if` (also the one on line
64)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]