Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
9607aef2
Commit
9607aef2
authored
Mar 09, 2019
by
Paul
Browse files
Fix clang tidy warnings
parent
c88ab964
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
src/include/migraphx/schedule_model.hpp
src/include/migraphx/schedule_model.hpp
+6
-6
src/targets/gpu/schedule_model.cpp
src/targets/gpu/schedule_model.cpp
+1
-1
test/schedule_test.cpp
test/schedule_test.cpp
+1
-1
tools/te.py
tools/te.py
+7
-1
No files found.
src/include/migraphx/schedule_model.hpp
View file @
9607aef2
...
...
@@ -117,19 +117,19 @@ struct schedule_model
void
sched
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
n
)
const
{
assert
((
*
this
).
private_detail_te_handle_mem_var
);
(
*
this
).
private_detail_te_get_handle
().
sched
(
p
,
std
::
move
(
ins
)
,
std
::
move
(
n
)
);
(
*
this
).
private_detail_te_get_handle
().
sched
(
p
,
ins
,
n
);
}
void
wait
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
wait_id
)
const
{
assert
((
*
this
).
private_detail_te_handle_mem_var
);
(
*
this
).
private_detail_te_get_handle
().
wait
(
p
,
std
::
move
(
ins
)
,
std
::
move
(
wait_id
)
)
;
(
*
this
).
private_detail_te_get_handle
().
wait
(
p
,
ins
,
wait_id
);
}
void
record
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
wait_id
)
const
{
assert
((
*
this
).
private_detail_te_handle_mem_var
);
(
*
this
).
private_detail_te_get_handle
().
record
(
p
,
std
::
move
(
ins
)
,
std
::
move
(
wait_id
)
)
;
(
*
this
).
private_detail_te_get_handle
().
record
(
p
,
ins
,
wait_id
);
}
std
::
size_t
weight
(
const
operation
&
op
)
const
...
...
@@ -192,19 +192,19 @@ struct schedule_model
void
sched
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
n
)
const
override
{
private_detail_te_value
.
sched
(
p
,
std
::
move
(
ins
)
,
std
::
move
(
n
)
);
private_detail_te_value
.
sched
(
p
,
ins
,
n
);
}
void
wait
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
wait_id
)
const
override
{
private_detail_te_value
.
wait
(
p
,
std
::
move
(
ins
)
,
std
::
move
(
wait_id
)
)
;
private_detail_te_value
.
wait
(
p
,
ins
,
wait_id
);
}
void
record
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
wait_id
)
const
override
{
private_detail_te_value
.
record
(
p
,
std
::
move
(
ins
)
,
std
::
move
(
wait_id
)
)
;
private_detail_te_value
.
record
(
p
,
ins
,
wait_id
);
}
std
::
size_t
weight
(
const
operation
&
op
)
const
override
...
...
src/targets/gpu/schedule_model.cpp
View file @
9607aef2
...
...
@@ -25,7 +25,7 @@ struct record_event
return
{};
}
void
finalize
(
context
&
ctx
,
const
shape
&
,
std
::
vector
<
shape
>
)
{
ctx
.
create_events
(
event
);
}
void
finalize
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
shape
>
&
)
{
ctx
.
create_events
(
event
);
}
};
struct
wait_event
...
...
test/schedule_test.cpp
View file @
9607aef2
...
...
@@ -209,7 +209,7 @@ std::vector<T> unique(std::vector<T> x)
std
::
vector
<
std
::
size_t
>
get_wait_for
(
std
::
vector
<
std
::
size_t
>
wait_for
)
{
return
unique
(
wait_for
);
return
unique
(
std
::
move
(
wait_for
)
)
;
}
std
::
vector
<
std
::
size_t
>
get_wait_for
(
std
::
size_t
wait_on
,
std
::
vector
<
std
::
size_t
>
wait_for
)
...
...
tools/te.py
View file @
9607aef2
import
string
,
sys
,
re
,
os
trivial
=
[
'std::size_t'
,
'instruction_ref'
]
headers
=
'''
#include <algorithm>
#include <cassert>
...
...
@@ -286,7 +292,7 @@ def convert_member(d, struct_name):
member
[
'this'
]
=
x
if
'const'
in
t
:
member
[
'member_const'
]
=
'const'
if
t
.
endswith
((
'&'
,
'*'
)):
if
t
.
endswith
((
'&'
,
'*'
))
or
t
in
trivial
:
if
use_member
:
member_args
.
append
(
x
)
args
.
append
(
arg_name
)
else
:
...
...
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