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
60da4705
Commit
60da4705
authored
Aug 08, 2018
by
Tang, Cheng
Committed by
Tianqi Chen
Aug 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tvm external registry entrypoint (#1562)
parent
1ed28aeb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletions
+11
-1
include/tvm/base.h
+6
-0
nnvm/src/compiler/graph_runtime.cc
+1
-1
src/api/api_base.cc
+4
-0
No files found.
include/tvm/base.h
View file @
60da4705
...
...
@@ -83,5 +83,11 @@ struct NodeFactoryReg
::dmlc::Registry<::tvm::NodeFactoryReg>::Get()->__REGISTER__(TypeName::_type_key) \
.set_body([]() { return std::make_shared<TypeName>(); })
TVM_DLL
::
dmlc
::
Registry
<::
tvm
::
NodeFactoryReg
>
*
GetTVMNodeFactoryRegistry
();
#define TVM_EXTERNAL_REGISTER_NODE_TYPE(TypeName) \
static DMLC_ATTRIBUTE_UNUSED ::tvm::NodeFactoryReg & __make_Node ## _ ## TypeName ## __ = \
::tvm::GetTVMNodeFactoryRegistry()->__REGISTER__(TypeName::_type_key) \
.set_body([]() { return std::make_shared<TypeName>(); })
}
// namespace tvm
#endif // TVM_BASE_H_
nnvm/src/compiler/graph_runtime.cc
View file @
60da4705
...
...
@@ -100,6 +100,6 @@ TVM_REGISTER_GLOBAL("nnvm.compiler._load_param_dict")
*
rv
=
ret
;
});
TVM_REGISTER_NODE_TYPE
(
NDArrayWrapperNode
);
TVM_
EXTERNAL_
REGISTER_NODE_TYPE
(
NDArrayWrapperNode
);
}
// namespace compiler
}
// namespace nnvm
src/api/api_base.cc
View file @
60da4705
...
...
@@ -41,4 +41,8 @@ TVM_REGISTER_API("_TVMSetStream")
.
set_body
([](
TVMArgs
args
,
TVMRetValue
*
ret
)
{
TVMSetStream
(
args
[
0
],
args
[
1
],
args
[
2
]);
});
TVM_DLL
::
dmlc
::
Registry
<::
tvm
::
NodeFactoryReg
>
*
GetTVMNodeFactoryRegistry
()
{
return
::
dmlc
::
Registry
<::
tvm
::
NodeFactoryReg
>::
Get
();
}
}
// namespace tvm
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