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
76ca3352
Commit
76ca3352
authored
Mar 12, 2018
by
Tianqi Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tutorial build (#390)
parent
6a7d1c45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
nnvm/tutorials/from_mxnet_to_webgl.py
+5
-8
No files found.
nnvm/tutorials/from_mxnet_to_webgl.py
View file @
76ca3352
...
...
@@ -41,9 +41,7 @@ import nnvm.testing
# This tutorial must be run with OpenGL backend enabled in TVM.
# The NNVM CI does not enable OpenGL yet. But the user can run this script.
if
not
tvm
.
module
.
enabled
(
"opengl"
):
print
(
"OpenGL backend not enabled. This tutorial cannot be run."
)
exit
(
0
)
opengl_enabled
=
tvm
.
module
.
enabled
(
"opengl"
)
# To run the local demo, set this flag to True.
run_deploy_local
=
False
...
...
@@ -308,7 +306,7 @@ def deploy_local():
synset
=
download_synset
()
print
(
'TVM prediction top-1:'
,
top1
,
synset
[
top1
])
if
run_deploy_local
:
if
run_deploy_local
and
opengl_enabled
:
deploy_local
()
######################################################################
...
...
@@ -412,7 +410,7 @@ def deploy_rpc():
# Print first 10 elements of output.
print
(
out
.
asnumpy
()[
0
][
0
:
10
])
if
run_deploy_rpc
:
if
run_deploy_rpc
and
opengl_enabled
:
deploy_rpc
()
######################################################################
...
...
@@ -501,5 +499,5 @@ def deploy_web():
print
(
"Please open http://localhost:"
+
str
(
port
)
+
"/resnet.html"
)
httpd
.
serve_forever
()
if
run_deploy_web
:
deploy_web
()
\ No newline at end of file
if
run_deploy_web
and
opengl_enabled
:
deploy_web
()
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