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
23d72ee0
Commit
23d72ee0
authored
May 16, 2017
by
Yizhi Liu
Committed by
Tianqi Chen
May 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix doc examples & easy install (#143)
parent
03b09f74
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
python/tvm/_ffi/libinfo.py
+2
-1
tutorials/python/scan.py
+3
-3
No files found.
python/tvm/_ffi/libinfo.py
View file @
23d72ee0
...
...
@@ -15,9 +15,10 @@ def find_lib_path():
"""
use_runtime
=
os
.
environ
.
get
(
"TVM_USE_RUNTIME_LIB"
,
False
)
curr_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
expanduser
(
__file__
)))
root_path
=
os
.
path
.
join
(
curr_path
,
'../'
)
api_path
=
os
.
path
.
join
(
curr_path
,
'../../../lib/'
)
cmake_build_path
=
os
.
path
.
join
(
curr_path
,
'../../../build/Release/'
)
dll_path
=
[
curr_path
,
api_path
,
cmake_build_path
]
dll_path
=
[
curr_path
,
root_path
,
api_path
,
cmake_build_path
]
if
os
.
name
==
'nt'
:
vs_configuration
=
'Release'
if
platform
.
architecture
()[
0
]
==
'64bit'
:
...
...
tutorials/python/scan.py
View file @
23d72ee0
...
...
@@ -56,7 +56,7 @@ s[s_init].bind(xi, thread_x)
xo
,
xi
=
s
[
s_update
]
.
split
(
s_update
.
op
.
axis
[
1
],
factor
=
num_thread
)
s
[
s_update
]
.
bind
(
xo
,
block_x
)
s
[
s_update
]
.
bind
(
xi
,
thread_x
)
print
(
tvm
.
lower
(
s
,
[
X
,
s_scan
],
with_api_wrapper
=
Fals
e
))
print
(
tvm
.
lower
(
s
,
[
X
,
s_scan
],
simple_mode
=
Tru
e
))
######################################################################
# Build and Verify
...
...
@@ -101,7 +101,7 @@ s_scan = tvm.scan(s_init, s_update_s2, s_state, inputs=[X])
s
=
tvm
.
create_schedule
(
s_scan
.
op
)
xo
,
xi
=
s
[
s_update_s2
]
.
split
(
s_update_s2
.
op
.
axis
[
1
],
factor
=
32
)
s
[
s_update_s1
]
.
compute_at
(
s
[
s_update_s2
],
xo
)
print
(
tvm
.
lower
(
s
,
[
X
,
s_scan
],
with_api_wrapper
=
Fals
e
))
print
(
tvm
.
lower
(
s
,
[
X
,
s_scan
],
simple_mode
=
Tru
e
))
######################################################################
# Multiple States
...
...
@@ -124,7 +124,7 @@ s_scan1, s_scan2 = tvm.scan([s_init1, s_init2],
[
s_update1
,
s_update2
],
[
s_state1
,
s_state2
],
inputs
=
[
X
])
s
=
tvm
.
create_schedule
(
s_scan1
.
op
)
print
(
tvm
.
lower
(
s
,
[
X
,
s_scan1
,
s_scan2
],
with_api_wrapper
=
Fals
e
))
print
(
tvm
.
lower
(
s
,
[
X
,
s_scan1
,
s_scan2
],
simple_mode
=
Tru
e
))
######################################################################
# Summary
...
...
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