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
1c425f14
Commit
1c425f14
authored
Feb 18, 2022
by
Shucai Xiao
Browse files
clang format
parent
2244846a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
src/program.cpp
src/program.cpp
+22
-22
No files found.
src/program.cpp
View file @
1c425f14
...
@@ -672,15 +672,12 @@ int program::max_ins_length() const
...
@@ -672,15 +672,12 @@ int program::max_ins_length() const
static
auto
&
get_titles
()
static
auto
&
get_titles
()
{
{
static
std
::
vector
<
std
::
string
>
titles
=
static
std
::
vector
<
std
::
string
>
titles
=
{
"Instructions"
,
{
"Instructions"
,
"Time(ms)
\t
"
,
"Time(ms)
\t
"
,
"Percentage
\t
"
,
"Percentage
\t
"
,
"(b, m, n, k)
\t
"
,
"(b, m, n, k)
\t
"
,
"Flops(TFlops/s)
\t
"
,
"Flops(TFlops/s)
\t
"
,
"Throughput(GB/s)"
"Throughput(GB/s)"
};
};
return
titles
;
return
titles
;
}
}
...
@@ -691,15 +688,18 @@ static void print_title(std::ostream& os, std::size_t max_ins_len)
...
@@ -691,15 +688,18 @@ static void print_title(std::ostream& os, std::size_t max_ins_len)
std
::
string
&
str
=
titles
.
front
();
std
::
string
&
str
=
titles
.
front
();
str
.
append
(
max_ins_len
+
1
-
str
.
length
(),
' '
);
str
.
append
(
max_ins_len
+
1
-
str
.
length
(),
' '
);
str
.
append
(
1
,
'\t'
);
str
.
append
(
1
,
'\t'
);
for
(
auto
&
s
:
titles
)
for
(
auto
&
s
:
titles
)
{
{
os
<<
s
;
os
<<
s
;
}
}
os
<<
std
::
endl
;
os
<<
std
::
endl
;
}
}
static
void
print_ins_perf
(
std
::
ostream
&
os
,
const
std
::
vector
<
std
::
string
>&
titles
,
static
void
print_ins_perf
(
std
::
ostream
&
os
,
instruction_ref
ins
,
double
t
,
double
total_t
)
const
std
::
vector
<
std
::
string
>&
titles
,
instruction_ref
ins
,
double
t
,
double
total_t
)
{
{
auto
&
time_str
=
titles
.
at
(
1
);
auto
&
time_str
=
titles
.
at
(
1
);
auto
&
time_per
=
titles
.
at
(
2
);
auto
&
time_per
=
titles
.
at
(
2
);
...
@@ -732,8 +732,8 @@ static void print_ins_perf(std::ostream& os, const std::vector<std::string>& tit
...
@@ -732,8 +732,8 @@ static void print_ins_perf(std::ostream& os, const std::vector<std::string>& tit
auto
inss
=
to_shapes
(
ins
->
inputs
());
auto
inss
=
to_shapes
(
ins
->
inputs
());
auto
alens
=
inss
.
front
().
lens
();
auto
alens
=
inss
.
front
().
lens
();
auto
blens
=
inss
.
at
(
1
).
lens
();
auto
blens
=
inss
.
at
(
1
).
lens
();
auto
mb
=
std
::
accumulate
(
auto
mb
=
alens
.
rbegin
()
+
2
,
alens
.
rend
(),
1
,
std
::
multiplies
<
std
::
size_t
>
{});
std
::
accumulate
(
alens
.
rbegin
()
+
2
,
alens
.
rend
(),
1
,
std
::
multiplies
<
std
::
size_t
>
{});
int
mm
=
alens
[
alens
.
size
()
-
2
];
int
mm
=
alens
[
alens
.
size
()
-
2
];
int
mk
=
alens
.
back
();
int
mk
=
alens
.
back
();
int
mn
=
blens
.
back
();
int
mn
=
blens
.
back
();
...
...
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