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
4ba30478
Commit
4ba30478
authored
Feb 24, 2019
by
Junru Shao
Committed by
Tianqi Chen
Feb 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix -Wreturn-std-move and -Wself-assign-overloaded (#2669)
parent
16b009b2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
11 deletions
+11
-11
nnvm/src/pass/infer_shape_type.cc
+1
-1
src/codegen/verilog/verilog_ir.cc
+2
-2
src/pass/combine_context_call.cc
+1
-1
src/relay/ir/expr_functor.cc
+1
-1
src/relay/ir/type_functor.cc
+1
-1
src/relay/pass/alter_op_layout.cc
+1
-1
src/relay/pass/fuse_ops.cc
+1
-1
src/relay/pass/to_a_normal_form.cc
+1
-1
src/relay/pass/type_infer.cc
+1
-1
topi/include/topi/nn/l2_normalize.h
+1
-1
No files found.
nnvm/src/pass/infer_shape_type.cc
View file @
4ba30478
...
@@ -199,7 +199,7 @@ Graph InferAttr(Graph &&ret,
...
@@ -199,7 +199,7 @@ Graph InferAttr(Graph &&ret,
ret
.
attrs
[
attr_name
]
=
std
::
make_shared
<
any
>
(
std
::
move
(
rshape
));
ret
.
attrs
[
attr_name
]
=
std
::
make_shared
<
any
>
(
std
::
move
(
rshape
));
// number of nodes who knows the shape.
// number of nodes who knows the shape.
ret
.
attrs
[
unknown_name
]
=
std
::
make_shared
<
any
>
(
num_unknown
);
ret
.
attrs
[
unknown_name
]
=
std
::
make_shared
<
any
>
(
num_unknown
);
return
ret
;
return
std
::
move
(
ret
)
;
}
}
NNVM_REGISTER_PASS
(
InferShape
)
NNVM_REGISTER_PASS
(
InferShape
)
...
...
src/codegen/verilog/verilog_ir.cc
View file @
4ba30478
...
@@ -46,7 +46,7 @@ class StageInputReplacer : public IRMutator {
...
@@ -46,7 +46,7 @@ class StageInputReplacer : public IRMutator {
Var
new_var
(
it
->
second
->
var
->
name_hint
+
".sync"
,
op
->
type
);
Var
new_var
(
it
->
second
->
var
->
name_hint
+
".sync"
,
op
->
type
);
inputs_
.
Set
(
new_var
,
it
->
second
);
inputs_
.
Set
(
new_var
,
it
->
second
);
replace_
[
op
]
=
new_var
;
replace_
[
op
]
=
new_var
;
return
new_var
;
return
std
::
move
(
new_var
)
;
}
}
Expr
Mutate_
(
const
Load
*
op
,
const
Expr
&
e
)
final
{
Expr
Mutate_
(
const
Load
*
op
,
const
Expr
&
e
)
final
{
CHECK
(
is_zero
(
op
->
index
))
CHECK
(
is_zero
(
op
->
index
))
...
@@ -60,7 +60,7 @@ class StageInputReplacer : public IRMutator {
...
@@ -60,7 +60,7 @@ class StageInputReplacer : public IRMutator {
Var
data
(
it
->
second
->
var
->
name_hint
+
".load.sync"
,
op
->
type
);
Var
data
(
it
->
second
->
var
->
name_hint
+
".load.sync"
,
op
->
type
);
inputs_
.
Set
(
data
,
it
->
second
);
inputs_
.
Set
(
data
,
it
->
second
);
replace_
[
op
->
buffer_var
.
get
()]
=
data
;
replace_
[
op
->
buffer_var
.
get
()]
=
data
;
return
data
;
return
std
::
move
(
data
)
;
}
}
// inputs that get replaced.
// inputs that get replaced.
Map
<
Var
,
StageInput
>
inputs_
;
Map
<
Var
,
StageInput
>
inputs_
;
...
...
src/pass/combine_context_call.cc
View file @
4ba30478
...
@@ -39,7 +39,7 @@ class ContextCallCombiner final : public IRMutator {
...
@@ -39,7 +39,7 @@ class ContextCallCombiner final : public IRMutator {
}
}
Var
ctx_var
(
name
,
ctx
.
type
());
Var
ctx_var
(
name
,
ctx
.
type
());
ctx_map_
[
ctx
]
=
ctx_var
;
ctx_map_
[
ctx
]
=
ctx_var
;
return
ctx_var
;
return
std
::
move
(
ctx_var
)
;
}
}
}
else
{
}
else
{
return
IRMutator
::
Mutate_
(
op
,
e
);
return
IRMutator
::
Mutate_
(
op
,
e
);
...
...
src/relay/ir/expr_functor.cc
View file @
4ba30478
...
@@ -364,7 +364,7 @@ class ExprBinder : public ExprMutator {
...
@@ -364,7 +364,7 @@ class ExprBinder : public ExprMutator {
if
(
it
!=
args_map_
.
end
())
{
if
(
it
!=
args_map_
.
end
())
{
return
(
*
it
).
second
;
return
(
*
it
).
second
;
}
else
{
}
else
{
return
id
;
return
std
::
move
(
id
)
;
}
}
}
}
...
...
src/relay/ir/type_functor.cc
View file @
4ba30478
...
@@ -192,7 +192,7 @@ class TypeBinder : public TypeMutator {
...
@@ -192,7 +192,7 @@ class TypeBinder : public TypeMutator {
if
(
it
!=
args_map_
.
end
())
{
if
(
it
!=
args_map_
.
end
())
{
return
(
*
it
).
second
;
return
(
*
it
).
second
;
}
else
{
}
else
{
return
id
;
return
std
::
move
(
id
)
;
}
}
}
}
...
...
src/relay/pass/alter_op_layout.cc
View file @
4ba30478
...
@@ -34,7 +34,7 @@ Expr TransformLayout(Expr raw, Layout src_layout, Layout dst_layout) {
...
@@ -34,7 +34,7 @@ Expr TransformLayout(Expr raw, Layout src_layout, Layout dst_layout) {
attrs
->
src_layout
=
src_layout
.
name
();
attrs
->
src_layout
=
src_layout
.
name
();
attrs
->
dst_layout
=
dst_layout
.
name
();
attrs
->
dst_layout
=
dst_layout
.
name
();
Call
transform
=
CallNode
::
make
(
transform_op
,
{
raw
},
Attrs
{
attrs
});
Call
transform
=
CallNode
::
make
(
transform_op
,
{
raw
},
Attrs
{
attrs
});
return
transform
;
return
std
::
move
(
transform
)
;
}
}
// Memorize layout transform so we can reuse internal transformed nodes
// Memorize layout transform so we can reuse internal transformed nodes
...
...
src/relay/pass/fuse_ops.cc
View file @
4ba30478
...
@@ -773,7 +773,7 @@ class FuseMutator : private ExprMutator {
...
@@ -773,7 +773,7 @@ class FuseMutator : private ExprMutator {
}
else
{
}
else
{
// This is an intermediate node of a fused function
// This is an intermediate node of a fused function
// simply return the new call.
// simply return the new call.
return
new_call
;
return
std
::
move
(
new_call
)
;
}
}
}
else
{
}
else
{
return
ExprMutator
::
VisitExpr_
(
call
);
return
ExprMutator
::
VisitExpr_
(
call
);
...
...
src/relay/pass/to_a_normal_form.cc
View file @
4ba30478
...
@@ -398,7 +398,7 @@ class Fill : ExprFunctor<Expr(const Expr&, const Var&)> {
...
@@ -398,7 +398,7 @@ class Fill : ExprFunctor<Expr(const Expr&, const Var&)> {
visited_
->
insert
(
gv
);
visited_
->
insert
(
gv
);
mod_
->
Update
(
gv
,
Downcast
<
Function
>
(
relay
::
ToANormalForm
(
mod_
->
Lookup
(
gv
),
mod_
,
visited_
)));
mod_
->
Update
(
gv
,
Downcast
<
Function
>
(
relay
::
ToANormalForm
(
mod_
->
Lookup
(
gv
),
mod_
,
visited_
)));
}
}
return
gv
;
return
std
::
move
(
gv
)
;
}
}
Expr
VisitExpr_
(
const
OpNode
*
op
,
const
Var
&
v
)
final
{
Expr
VisitExpr_
(
const
OpNode
*
op
,
const
Var
&
v
)
final
{
...
...
src/relay/pass/type_infer.cc
View file @
4ba30478
...
@@ -724,7 +724,7 @@ Expr InferType(const Expr& expr, const Module& mod_ref) {
...
@@ -724,7 +724,7 @@ Expr InferType(const Expr& expr, const Module& mod_ref) {
// FromExpr wraps a naked expression as a function, we will unbox
// FromExpr wraps a naked expression as a function, we will unbox
// it here.
// it here.
if
(
expr
.
as
<
FunctionNode
>
())
{
if
(
expr
.
as
<
FunctionNode
>
())
{
return
func
;
return
std
::
move
(
func
)
;
}
else
{
}
else
{
return
func
->
body
;
return
func
->
body
;
}
}
...
...
topi/include/topi/nn/l2_normalize.h
View file @
4ba30478
...
@@ -39,7 +39,7 @@ inline Tensor l2_normalize(const Tensor& data,
...
@@ -39,7 +39,7 @@ inline Tensor l2_normalize(const Tensor& data,
topi
::
sqrt
(
tvm
::
compute
(
expand_sum
->
shape
,
topi
::
sqrt
(
tvm
::
compute
(
expand_sum
->
shape
,
[
&
](
const
Array
<
Var
>&
i
){
[
&
](
const
Array
<
Var
>&
i
){
return
(
max
(
expand_sum
(
i
),
eps
));
return
(
max
(
expand_sum
(
i
),
eps
));
},
name
=
name
,
tag
=
tag
)));
},
name
,
tag
)));
}
}
}
// namespace nn
}
// namespace nn
}
// namespace topi
}
// namespace topi
...
...
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