Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
7c050e42
Commit
7c050e42
authored
Aug 02, 2018
by
Tianqi Chen
Committed by
GitHub
Aug 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RPC (#1542)
parent
0f431fd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
nnvm/tests/python/compiler/test_rpc_exec.py
+5
-4
No files found.
nnvm/tests/python/compiler/test_rpc_exec.py
View file @
7c050e42
...
@@ -4,12 +4,13 @@ from tvm.contrib import util, graph_runtime
...
@@ -4,12 +4,13 @@ from tvm.contrib import util, graph_runtime
import
nnvm.symbol
as
sym
import
nnvm.symbol
as
sym
import
nnvm.compiler
import
nnvm.compiler
import
numpy
as
np
import
numpy
as
np
import
time
def
test_rpc_executor
():
def
test_rpc_executor
():
host
=
"localhost"
host
=
"localhost"
port
=
9
120
port
=
9
021
server
=
rpc
.
Server
(
host
,
port
)
server
=
rpc
.
Server
(
host
,
port
,
use_popen
=
True
)
time
.
sleep
(
1
)
x
=
sym
.
Variable
(
"x"
)
x
=
sym
.
Variable
(
"x"
)
y
=
sym
.
Variable
(
"y"
)
y
=
sym
.
Variable
(
"y"
)
z
=
sym
.
exp
(
y
+
x
)
z
=
sym
.
exp
(
y
+
x
)
...
@@ -22,7 +23,7 @@ def test_rpc_executor():
...
@@ -22,7 +23,7 @@ def test_rpc_executor():
graph
,
lib
,
_
=
nnvm
.
compiler
.
build
(
z
,
"llvm"
,
shape_dict
)
graph
,
lib
,
_
=
nnvm
.
compiler
.
build
(
z
,
"llvm"
,
shape_dict
)
# save module
# save module
lib
.
save
(
lib_name
)
lib
.
save
(
lib_name
)
remote
=
rpc
.
connect
(
server
.
host
,
server
.
port
)
remote
=
rpc
.
connect
(
host
,
port
)
remote
.
upload
(
lib_name
)
remote
.
upload
(
lib_name
)
ctx
=
remote
.
cpu
(
0
)
ctx
=
remote
.
cpu
(
0
)
# load remote
# load remote
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment