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
a20c741b
Commit
a20c741b
authored
Apr 14, 2018
by
Tianqi Chen
Committed by
tqchen
Apr 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pickle memoize no longer print message (#1111)
parent
47ed25e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
python/tvm/contrib/pickle_memoize.py
+1
-1
topi/python/topi/rasp/__init__.py
+2
-2
topi/python/topi/rasp/conv2d.py
+4
-4
topi/python/topi/rasp/depthwise_conv2d.py
+1
-1
No files found.
python/tvm/contrib/pickle_memoize.py
View file @
a20c741b
...
...
@@ -5,6 +5,7 @@ import sys
import
atexit
from
decorator
import
decorate
from
.._ffi.base
import
string_types
try
:
import
cPickle
as
pickle
except
ImportError
:
...
...
@@ -79,7 +80,6 @@ def memoize(key):
else
:
assert
isinstance
(
arg
,
allow_types
)
if
key
in
cache
.
cache
:
print
(
"Use memoize {0}{1}"
.
format
(
fkey
,
key
))
return
cache
.
cache
[
key
]
res
=
func
(
*
args
)
cache
.
cache
[
key
]
=
res
...
...
topi/python/topi/rasp/__init__.py
View file @
a20c741b
...
...
@@ -2,5 +2,5 @@
"""Raspberry pi specific declaration and schedules."""
from
__future__
import
absolute_import
as
_abs
from
.conv2d
import
*
from
.depthwise_conv2d
import
*
from
.conv2d
import
schedule_conv2d_nchw
from
.depthwise_conv2d
import
schedule_depthwise_conv2d_nchw
topi/python/topi/rasp/conv2d.py
View file @
a20c741b
...
...
@@ -4,7 +4,7 @@ from __future__ import absolute_import as _abs
import
tvm
from
tvm
import
target
as
_target
from
..
import
tag
from
..nn.conv2d
import
conv2d
,
_get_schedule
from
..nn.conv2d
import
conv2d
as
_conv2d
,
_get_schedule
from
..nn.conv2d
import
SpatialPack
,
Im2ColPack
from
..nn.conv2d
import
_WORKLOADS
,
_SCH_TO_DECL_FUNC
from
..nn.conv2d
import
_get_workload
...
...
@@ -66,7 +66,7 @@ _SCHEDULES = [
]
@_get_schedule.register
(
"rasp"
)
def
_schedule_conv2d
(
wkl
):
def
_
get_
schedule_conv2d
(
wkl
):
if
wkl
not
in
_WORKLOADS
:
raise
ValueError
(
"no schedule for such workload: {}"
.
format
(
wkl
))
idx
=
_WORKLOADS
.
index
(
wkl
)
...
...
@@ -74,7 +74,7 @@ def _schedule_conv2d(wkl):
return
sch
@conv2d.register
(
"rasp"
)
@
_
conv2d.register
(
"rasp"
)
def
_declaration_conv2d
(
data
,
kernel
,
stride
,
padding
,
layout
,
out_dtype
):
if
out_dtype
is
None
:
out_dtype
=
data
.
dtype
...
...
@@ -309,7 +309,7 @@ def _schedule_im2col_conv2d(s, data, data_pad, data_col, data_vec,
return
s
@generic.schedule_conv2d_nchw.register
([
"rasp"
])
def
schedule_conv2d
(
outs
):
def
schedule_conv2d
_nchw
(
outs
):
"""Create schedule for tensors"""
s
=
tvm
.
create_schedule
([
x
.
op
for
x
in
outs
])
...
...
topi/python/topi/rasp/depthwise_conv2d.py
View file @
a20c741b
...
...
@@ -164,7 +164,7 @@ def _schedule(s, data, data_pad, kernel, output, last):
@generic.schedule_depthwise_conv2d_nchw.register
([
"cpu"
,
"rasp"
])
def
schedule_depthwise_conv2d
(
outs
):
def
schedule_depthwise_conv2d
_nchw
(
outs
):
"""Schedule for depthwise_conv2d nchw forward.
Parameters
...
...
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