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/08/19 23:57:04 UTC

[GitHub] [tvm] kparzysz-quic commented on a diff in pull request #12504: [Hexagon] Add support to run on multiple devices

kparzysz-quic commented on code in PR #12504:
URL: https://github.com/apache/tvm/pull/12504#discussion_r950614799


##########
python/tvm/contrib/hexagon/pytest_plugin.py:
##########
@@ -56,14 +56,19 @@ def _compose(args, decs):
 requires_hexagon_toolchain = tvm.testing.requires_hexagon(support_required="compile-only")
 
 
-@pytest.fixture(scope="session")
 def android_serial_number() -> Optional[str]:

Review Comment:
   This function no longer returns `Optional[str]`.  Please make it return `list[str]` for all cases, for consistency (including `[]` if there is no device of any kind).



##########
python/tvm/contrib/hexagon/pytest_plugin.py:
##########
@@ -56,14 +56,19 @@ def _compose(args, decs):
 requires_hexagon_toolchain = tvm.testing.requires_hexagon(support_required="compile-only")
 
 
-@pytest.fixture(scope="session")
 def android_serial_number() -> Optional[str]:
+    """Return the android serial number or simulator"""
     serial = os.getenv(ANDROID_SERIAL_NUMBER, default="")
     # Setting ANDROID_SERIAL_NUMBER to an empty string should be
     # equivalent to having it unset.
     if not serial.strip():
         serial = None
-    return serial
+    if serial == "simulator":
+        return serial
+    else:
+        # Split android serial numbers into a list
+        serial = serial.split(",")

Review Comment:
   This will fail if serial was set to `None` at L65.



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