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
0e6370db
Commit
0e6370db
authored
Mar 02, 2018
by
Tianqi Chen
Committed by
GitHub
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explicit import testing (#956)
* explicit import testing * Enable init api for extension modules
parent
e6d1c628
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
6 deletions
+23
-6
python/tvm/_ffi/function.py
+14
-6
topi/tests/python/test_topi_conv2d.py
+1
-0
topi/tests/python/test_topi_conv2d_hwcn.py
+1
-0
topi/tests/python/test_topi_conv2d_nhwc.py
+1
-0
topi/tests/python/test_topi_conv2d_transpose_nchw.py
+1
-0
topi/tests/python/test_topi_dense.py
+1
-0
topi/tests/python/test_topi_depthwise_conv2d.py
+1
-0
topi/tests/python/test_topi_depthwise_conv2d_back_input.py
+1
-0
topi/tests/python/test_topi_depthwise_conv2d_back_weight.py
+1
-0
topi/tests/python/test_topi_math.py
+1
-0
No files found.
python/tvm/_ffi/function.py
View file @
0e6370db
...
...
@@ -280,15 +280,23 @@ def _get_api(f):
return
flocal
(
*
args
)
return
my_api_func
def
_init_api
(
namespace
):
def
_init_api
(
namespace
,
target_module_name
=
None
):
"""Initialize api for a given module name
mod : str
The name of the module.
namespace : str
The namespace of the source registry
target_module_name : str
The target module name if different from namespace
"""
assert
namespace
.
startswith
(
"tvm."
)
prefix
=
namespace
[
4
:]
_init_api_prefix
(
namespace
,
prefix
)
target_module_name
=
(
target_module_name
if
target_module_name
else
namespace
)
if
namespace
.
startswith
(
"tvm."
):
prefix
=
namespace
[
4
:]
_init_api_prefix
(
target_module_name
,
namespace
[
4
:])
else
:
_init_api_prefix
(
target_module_name
,
namespace
)
def
_init_api_prefix
(
module_name
,
prefix
):
module
=
sys
.
modules
[
module_name
]
...
...
topi/tests/python/test_topi_conv2d.py
View file @
0e6370db
...
...
@@ -3,6 +3,7 @@ import os
import
numpy
as
np
import
tvm
import
topi
import
topi.testing
from
tvm.contrib.pickle_memoize
import
memoize
from
topi.util
import
get_const_tuple
...
...
topi/tests/python/test_topi_conv2d_hwcn.py
View file @
0e6370db
...
...
@@ -3,6 +3,7 @@ import os
import
numpy
as
np
import
tvm
import
topi
import
topi.testing
from
tvm.contrib.pickle_memoize
import
memoize
from
topi.util
import
get_const_tuple
...
...
topi/tests/python/test_topi_conv2d_nhwc.py
View file @
0e6370db
...
...
@@ -3,6 +3,7 @@ import os
import
numpy
as
np
import
tvm
import
topi
import
topi.testing
from
tvm.contrib.pickle_memoize
import
memoize
from
topi.util
import
get_const_tuple
...
...
topi/tests/python/test_topi_conv2d_transpose_nchw.py
View file @
0e6370db
...
...
@@ -2,6 +2,7 @@
import
numpy
as
np
import
tvm
import
topi
import
topi.testing
from
tvm.contrib.pickle_memoize
import
memoize
from
topi.util
import
get_const_tuple
...
...
topi/tests/python/test_topi_dense.py
View file @
0e6370db
...
...
@@ -2,6 +2,7 @@
import
numpy
as
np
import
tvm
import
topi
import
topi.testing
from
topi.util
import
get_const_tuple
from
tvm.contrib.pickle_memoize
import
memoize
...
...
topi/tests/python/test_topi_depthwise_conv2d.py
View file @
0e6370db
import
tvm
import
topi
import
topi.testing
import
numpy
as
np
from
scipy
import
signal
from
topi.util
import
get_const_tuple
...
...
topi/tests/python/test_topi_depthwise_conv2d_back_input.py
View file @
0e6370db
...
...
@@ -5,6 +5,7 @@ from tvm.contrib.pickle_memoize import memoize
from
scipy
import
signal
from
topi.util
import
get_const_tuple
from
topi.nn.util
import
get_pad_tuple
import
topi.testing
from
topi.cuda.depthwise_conv2d
import
schedule_depthwise_conv2d_backward_input_nhwc
...
...
topi/tests/python/test_topi_depthwise_conv2d_back_weight.py
View file @
0e6370db
import
tvm
import
topi
import
topi.testing
import
numpy
as
np
from
tvm.contrib.pickle_memoize
import
memoize
from
scipy
import
signal
...
...
topi/tests/python/test_topi_math.py
View file @
0e6370db
import
numpy
as
np
import
tvm
import
topi
import
topi.testing
from
topi
import
util
...
...
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