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
6798ba80
Unverified
Commit
6798ba80
authored
Jan 29, 2020
by
abergeron
Committed by
GitHub
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure to visit the arguments of inlined functions (#4783)
parent
1b8522e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
src/relay/backend/vm/inline_primitives.cc
+12
-2
No files found.
src/relay/backend/vm/inline_primitives.cc
View file @
6798ba80
...
@@ -87,12 +87,22 @@ struct PrimitiveInliner : ExprMutator {
...
@@ -87,12 +87,22 @@ struct PrimitiveInliner : ExprMutator {
if
(
auto
func
=
op
.
as
<
FunctionNode
>
())
{
if
(
auto
func
=
op
.
as
<
FunctionNode
>
())
{
if
(
func
->
IsPrimitive
())
{
if
(
func
->
IsPrimitive
())
{
return
CallNode
::
make
(
GetRef
<
Function
>
(
func
),
call
->
args
,
call
->
attrs
,
call
->
type_args
);
tvm
::
Array
<
Expr
>
call_args
;
for
(
auto
arg
:
call
->
args
)
{
auto
new_arg
=
VisitExpr
(
arg
);
call_args
.
push_back
(
new_arg
);
}
return
CallNode
::
make
(
GetRef
<
Function
>
(
func
),
call_args
,
call
->
attrs
,
call
->
type_args
);
}
}
}
}
if
(
auto
global
=
op
.
as
<
GlobalVarNode
>
())
{
if
(
auto
global
=
op
.
as
<
GlobalVarNode
>
())
{
return
CallNode
::
make
(
GetRef
<
GlobalVar
>
(
global
),
call
->
args
,
call
->
attrs
,
call
->
type_args
);
tvm
::
Array
<
Expr
>
call_args
;
for
(
auto
arg
:
call
->
args
)
{
auto
new_arg
=
VisitExpr
(
arg
);
call_args
.
push_back
(
new_arg
);
}
return
CallNode
::
make
(
GetRef
<
GlobalVar
>
(
global
),
call_args
,
call
->
attrs
,
call
->
type_args
);
}
}
return
ExprMutator
::
VisitExpr_
(
call
);
return
ExprMutator
::
VisitExpr_
(
call
);
...
...
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