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 2021/10/06 17:08:10 UTC

[GitHub] [tvm] KJlaccHoeUM9l opened a new pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

KJlaccHoeUM9l opened a new pull request #9212:
URL: https://github.com/apache/tvm/pull/9212


   This PR enables iOS simulation in public CI to cover basic tuning capabilities. Work with the simulator is carried out using the `simctl` command line tool and the `iOS RPC` application for starting the RPC Server.
   
   The test suite aims to verify the following connection configurations:
   
   1. rpc_client -> rpc_server
   2. rpc_client -> rpc_proxy <- rpc_server
   3. rpc_client -> rpc_tracker <- rpc_server
   4. rpc_client -> rpc_tracker <- rpc_proxy <- rpc_server
   
   And includes the following tests:
   
   1. All configuration are able to setup connection and call single remote function. Check that reconnection works correctly.
   2. For configurations `#1` 
   a. Check upload, download files.
   b. Check that uploaded files are removed after session end. Cleanup workspace.
   c. Check load of module with one kernel. Load, set input, run, check resulting tensor.         
   3. Check graph executor via RPC. One module with CPU kernels.
   4. Check tuners. Start micro tuning session with several trials: AutoSchedule
   
   Running these tests is included in the GitHub actions CI and can be found in the check:
   ```
   WinMacBuild / Build (macOS-latest)
   ```


-- 
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] areusch commented on a change in pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #9212:
URL: https://github.com/apache/tvm/pull/9212#discussion_r738565613



##########
File path: python/tvm/rpc/server_ios_launcher.py
##########
@@ -99,40 +99,52 @@ def get_device_uid(target_device: Dict) -> AnyStr:
     return target_device["udid"]
 
 
+def check_call_with_runtime_error(cmd: AnyStr, error_message: AnyStr) -> None:
+    """Calling the function `subprocess.check_call` and catching its possible thrown exception."""
+
+    try:
+        subprocess.check_call(cmd.split(" "))

Review comment:
       not necessary to block this PR, but one nit: i think cmd can also be a string--is the split necessary? asking because technically you should split it according to shell lexing rules (i.e. with shlex.split). alternatively, may be cleaner to just pass args as a list.




-- 
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] KJlaccHoeUM9l commented on a change in pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

Posted by GitBox <gi...@apache.org>.
KJlaccHoeUM9l commented on a change in pull request #9212:
URL: https://github.com/apache/tvm/pull/9212#discussion_r729738683



##########
File path: tests/python/contrib/test_rpc_server_device.py
##########
@@ -0,0 +1,457 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""iOS RPC Server tests."""
+# pylint: disable=invalid-name, no-value-for-parameter, missing-function-docstring, import-error
+import multiprocessing
+import pytest
+import numpy as np
+
+import tvm.testing
+import tvm.relay.testing
+from tvm import te
+from tvm import rpc
+from tvm import relay, auto_scheduler
+from tvm.contrib import utils, xcode, graph_executor
+from tvm.autotvm.measure import request_remote
+from tvm.auto_scheduler.measure_record import load_records
+from tvm.auto_scheduler.measure import MeasureErrorNo
+from tvm.auto_scheduler.utils import call_func_with_timeout
+from tvm.contrib.popen_pool import PopenWorker, StatusKind
+from tvm.rpc import tracker, proxy, server_ios_launcher
+
+
+HOST_URL = "0.0.0.0"
+HOST_PORT = 9190

Review comment:
       Yes, that's exactly what has been done. This port value is used as the starting port value from the range that is used for the server, tracker and proxy.
   Further, the port on which the server was started is used for work.

##########
File path: .github/workflows/main.yml
##########
@@ -81,3 +98,12 @@ jobs:
       shell: bash -l {0}
       run: >-
         python -m pytest -v tests/python/all-platform-minimal-test
+    - name: Test iOS RPC@MacOS
+      if: startsWith(matrix.os, 'macOS')
+      shell: bash -l {0}
+      run: >-
+        python -m pip install tornado psutil cloudpickle &&
+        export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
+        export BUNDLE_ID=org.apache.tvmrpc &&
+        export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
+        python -m pytest -vrP tests/python/contrib/test_rpc_server_device.py

Review comment:
       This parameter was used to display output logs from those tests that passed. For CI, you can remove this flag, it was convenient for development.




-- 
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] areusch merged pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

Posted by GitBox <gi...@apache.org>.
areusch merged pull request #9212:
URL: https://github.com/apache/tvm/pull/9212


   


-- 
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] KJlaccHoeUM9l commented on pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

Posted by GitBox <gi...@apache.org>.
KJlaccHoeUM9l commented on pull request #9212:
URL: https://github.com/apache/tvm/pull/9212#issuecomment-942272506


   @areusch, @jwfromm
   Could you review this PR?


-- 
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] KJlaccHoeUM9l commented on pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

Posted by GitBox <gi...@apache.org>.
KJlaccHoeUM9l commented on pull request #9212:
URL: https://github.com/apache/tvm/pull/9212#issuecomment-942272506


   @areusch, @jwfromm
   Could you review this PR?


-- 
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] KJlaccHoeUM9l commented on pull request #9212: [iOS][RPC] Enable iOS simulation in public CI to cover basic tuning capabilities

Posted by GitBox <gi...@apache.org>.
KJlaccHoeUM9l commented on pull request #9212:
URL: https://github.com/apache/tvm/pull/9212#issuecomment-945585131


   @areusch, could you please check the changes?


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