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
1efc84a4
Commit
1efc84a4
authored
Jul 05, 2019
by
Thierry Moreau
Committed by
Jared Roesch
Jul 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[VTA][Hotfix] Avoiding error when environment variable is not set (#3497)
* avoid error when env var is not set * extra content
parent
002a6f3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
vta/python/vta/testing/util.py
+8
-4
No files found.
vta/python/vta/testing/util.py
View file @
1efc84a4
...
...
@@ -54,21 +54,25 @@ def run(run_func):
elif
env
.
TARGET
==
"pynq"
:
# The environment variables below should be set if we are using
# a tracker to obtain a remote for a test device
tracket_host
=
os
.
environ
.
get
(
"TVM_TRACKER_HOST"
,
None
)
tracket_port
=
int
(
os
.
environ
.
get
(
"TVM_TRACKER_PORT"
,
None
))
tracket_port
=
os
.
environ
.
get
(
"TVM_TRACKER_PORT"
,
None
)
# Otherwise, we can set the variables below to directly
# obtain a remote from a test device
pynq_host
=
os
.
environ
.
get
(
"VTA_PYNQ_RPC_HOST"
,
None
)
pynq_port
=
int
(
os
.
environ
.
get
(
"VTA_PYNQ_RPC_PORT"
,
None
)
)
pynq_port
=
os
.
environ
.
get
(
"VTA_PYNQ_RPC_PORT"
,
None
)
# Run device from fleet node if env variables are defined
if
tracket_host
and
tracket_port
:
remote
=
autotvm
.
measure
.
request_remote
(
env
.
TARGET
,
tracket_host
,
tracket_port
,
int
(
tracket_port
)
,
timeout
=
10000
)
run_func
(
env
,
remote
)
else
:
# Next, run on PYNQ if env variables are defined
if
pynq_host
and
pynq_port
:
remote
=
rpc
.
connect
(
pynq_host
,
pynq_port
)
remote
=
rpc
.
connect
(
pynq_host
,
int
(
pynq_port
)
)
run_func
(
env
,
remote
)
else
:
raise
RuntimeError
(
...
...
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