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
c9a2f3da
Unverified
Commit
c9a2f3da
authored
Jun 11, 2019
by
Tianqi Chen
Committed by
GitHub
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RELAY] Pass infra cleanup (#3336)
parent
d6c4aba8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
include/tvm/relay/transform.h
+3
-2
python/tvm/relay/transform.py
+0
-0
src/relay/pass/pass_manager.cc
+4
-4
tests/python/relay/test_pass_manager.py
+7
-0
No files found.
include/tvm/relay/transform.h
View file @
c9a2f3da
...
...
@@ -202,7 +202,8 @@ class PassInfoNode : public RelayNode {
v
->
Visit
(
"required"
,
&
required
);
}
TVM_DLL
static
PassInfo
make
(
int
opt_level
,
std
::
string
name
,
TVM_DLL
static
PassInfo
make
(
int
opt_level
,
std
::
string
name
,
tvm
::
Array
<
tvm
::
Expr
>
required
);
static
constexpr
const
char
*
_type_key
=
"relay.PassInfo"
;
...
...
@@ -467,7 +468,7 @@ TVM_DLL Pass SimplifyInference();
* type information filled in, as well as it's checked type field
* populated with the result type.
*
* \return The pass.
* \return The pass.
*/
TVM_DLL
Pass
InferType
();
...
...
python/tvm/relay/transform.py
View file @
c9a2f3da
This diff is collapsed.
Click to expand it.
src/relay/pass/pass_manager.cc
View file @
c9a2f3da
...
...
@@ -465,8 +465,8 @@ TVM_STATIC_IR_FUNCTOR_REGISTER(IRPrinter, vtable)
TVM_REGISTER_NODE_TYPE
(
ModulePassNode
);
TVM_REGISTER_API
(
"relay._transform.
Creat
eModulePass"
)
.
set_body_typed
(
CreateModulePass
);
TVM_REGISTER_API
(
"relay._transform.
Mak
eModulePass"
)
.
set_body_typed
(
ModulePassNode
::
make
);
TVM_REGISTER_API
(
"relay._transform.RunPass"
)
.
set_body
([](
TVMArgs
args
,
TVMRetValue
*
ret
)
{
...
...
@@ -485,8 +485,8 @@ TVM_STATIC_IR_FUNCTOR_REGISTER(IRPrinter, vtable)
TVM_REGISTER_NODE_TYPE
(
FunctionPassNode
);
TVM_REGISTER_API
(
"relay._transform.
Creat
eFunctionPass"
)
.
set_body_typed
(
CreateFunctionPass
);
TVM_REGISTER_API
(
"relay._transform.
Mak
eFunctionPass"
)
.
set_body_typed
(
FunctionPassNode
::
make
);
TVM_STATIC_IR_FUNCTOR_REGISTER
(
IRPrinter
,
vtable
)
.
set_dispatch
<
FunctionPassNode
>
([](
const
FunctionPassNode
*
node
,
...
...
tests/python/relay/test_pass_manager.py
View file @
c9a2f3da
...
...
@@ -259,6 +259,12 @@ def test_function_pass():
test_pass_run
()
def
test_pass_info
():
info
=
relay
.
transform
.
PassInfo
(
opt_level
=
1
,
name
=
"xyz"
)
assert
info
.
opt_level
==
1
assert
info
.
name
==
"xyz"
def
test_sequential_pass
():
shape
=
(
10
,
)
dtype
=
'float32'
...
...
@@ -449,3 +455,4 @@ if __name__ == "__main__":
test_function_pass
()
test_sequential_pass
()
test_sequential_with_scoping
()
test_pass_info
()
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