This is an automated email from the ASF dual-hosted git repository.

zhaowu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new d2e15c3  [TEST] use rpc.LocalSession for simple tests (#6294)
d2e15c3 is described below

commit d2e15c320d5e121b1ee42adbb54a691bd4c08078
Author: Tianqi Chen <[email protected]>
AuthorDate: Mon Aug 17 22:50:57 2020 -0700

    [TEST] use rpc.LocalSession for simple tests (#6294)
    
    To avoid flaky due to networking.
---
 tests/python/unittest/test_runtime_module_based_interface.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/python/unittest/test_runtime_module_based_interface.py 
b/tests/python/unittest/test_runtime_module_based_interface.py
index f97a445..56ae250 100644
--- a/tests/python/unittest/test_runtime_module_based_interface.py
+++ b/tests/python/unittest/test_runtime_module_based_interface.py
@@ -206,8 +206,7 @@ def test_mod_export():
         complied_graph_lib.export_library(path_lib)
 
         from tvm import rpc
-        server = rpc.Server("localhost", use_popen=True, port=9093)
-        remote = rpc.connect(server.host, server.port)
+        remote = rpc.LocalSession()
         remote.upload(path_lib)
         loaded_lib = remote.load_module(path_lib)
         data = np.random.uniform(-1, 1, 
size=input_shape(mod)).astype("float32")
@@ -395,8 +394,7 @@ def test_remove_package_params():
             fo.write(relay.save_param_dict(complied_graph_lib.get_params()))
 
         from tvm import rpc
-        server = rpc.Server("localhost", use_popen=True, port=9095)
-        remote = rpc.connect(server.host, server.port)
+        remote = rpc.LocalSession()
         remote.upload(path_lib)
         loaded_lib = remote.load_module(path_lib)
         data = np.random.uniform(-1, 1, 
size=input_shape(mod)).astype("float32")
@@ -447,8 +445,7 @@ def test_remove_package_params():
             fo.write(relay.save_param_dict(complied_graph_lib.get_params()))
 
         from tvm import rpc
-        server = rpc.Server("localhost", use_popen=True, port=9092)
-        remote = rpc.connect(server.host, server.port)
+        remote = rpc.LocalSession()
         remote.upload(path_lib)
         loaded_lib = remote.load_module(path_lib)
         data = np.random.uniform(-1, 1, 
size=input_shape(mod)).astype("float32")

Reply via email to