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
ac27d7b5
Commit
ac27d7b5
authored
Apr 10, 2023
by
Paul
Browse files
Format
parent
c45afff0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/pass_manager.cpp
src/pass_manager.cpp
+7
-5
No files found.
src/pass_manager.cpp
View file @
ac27d7b5
...
...
@@ -68,9 +68,11 @@ void run_pass(program& prog, const pass& p, tracer trace)
std
::
size_t
get_size
(
const
program
&
p
)
{
std
::
size_t
n
=
0
;
for
(
auto
*
mod
:
p
.
get_modules
())
{
for
(
const
auto
&
ins
:*
mod
)
{
if
(
ins
.
name
()
!=
"@literal"
)
for
(
auto
*
mod
:
p
.
get_modules
())
{
for
(
const
auto
&
ins
:
*
mod
)
{
if
(
ins
.
name
()
!=
"@literal"
)
continue
;
n
+=
ins
.
get_literal
().
get_shape
().
bytes
();
}
...
...
@@ -81,8 +83,8 @@ std::size_t get_size(const program& p)
std
::
string
pretty_size
(
std
::
size_t
n
)
{
const
std
::
vector
<
std
::
string
>
keys
=
{
""
,
"K"
,
"M"
,
"G"
,
"T"
};
double
d
=
n
;
std
::
size_t
i
=
0
;
double
d
=
n
;
std
::
size_t
i
=
0
;
while
(
d
>
1024
and
i
<
keys
.
size
())
{
d
/=
1024
;
...
...
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