Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
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
...
@@ -117,19 +117,19 @@ struct schedule_model
void
sched
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
n
)
const
void
sched
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
n
)
const
{
{
assert
((
*
this
).
private_detail_te_handle_mem_var
);
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
void
wait
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
wait_id
)
const
{
{
assert
((
*
this
).
private_detail_te_handle_mem_var
);
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
void
record
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
wait_id
)
const
{
{
assert
((
*
this
).
private_detail_te_handle_mem_var
);
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
std
::
size_t
weight
(
const
operation
&
op
)
const
...
@@ -192,19 +192,19 @@ struct schedule_model
...
@@ -192,19 +192,19 @@ struct schedule_model
void
sched
(
program
&
p
,
instruction_ref
ins
,
std
::
size_t
n
)
const
override
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
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
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
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
...
@@ -25,7 +25,7 @@ struct record_event
return
{};
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
struct
wait_event
...
...
test/schedule_test.cpp
View file @
9607aef2
...
@@ -209,7 +209,7 @@ std::vector<T> unique(std::vector<T> x)
...
@@ -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
)
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
)
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
import
string
,
sys
,
re
,
os
trivial
=
[
'std::size_t'
,
'instruction_ref'
]
headers
=
'''
headers
=
'''
#include <algorithm>
#include <algorithm>
#include <cassert>
#include <cassert>
...
@@ -286,7 +292,7 @@ def convert_member(d, struct_name):
...
@@ -286,7 +292,7 @@ def convert_member(d, struct_name):
member
[
'this'
]
=
x
member
[
'this'
]
=
x
if
'const'
in
t
:
if
'const'
in
t
:
member
[
'member_const'
]
=
'const'
member
[
'member_const'
]
=
'const'
if
t
.
endswith
((
'&'
,
'*'
)):
if
t
.
endswith
((
'&'
,
'*'
))
or
t
in
trivial
:
if
use_member
:
member_args
.
append
(
x
)
if
use_member
:
member_args
.
append
(
x
)
args
.
append
(
arg_name
)
args
.
append
(
arg_name
)
else
:
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