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
12a82ff9
Commit
12a82ff9
authored
Oct 10, 2022
by
Paul
Browse files
ONly device time for code objects
parent
25f0a80f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/targets/gpu/driver/perf.cpp
src/targets/gpu/driver/perf.cpp
+9
-6
No files found.
src/targets/gpu/driver/perf.cpp
View file @
12a82ff9
...
...
@@ -64,16 +64,19 @@ time_op(context& ictx, operation op, const std::vector<shape>& inputs, int n)
(
void
)
i
;
host_time
+=
time
<
milliseconds
>
(
run
);
}
// Measure device time
// Measure device time only for code_object ops which support it
double
device_time
=
0.0
;
if
(
op
.
name
()
==
"gpu::code_object"
)
{
gctx
.
enable_perf_measurement
();
run
();
double
device_time
=
0.0
;
for
(
auto
i
:
range
(
n
))
{
(
void
)
i
;
run
();
device_time
+=
gctx
.
get_elapsed_ms
();
}
}
return
std
::
make_pair
(
host_time
/
n
,
device_time
/
n
);
}
...
...
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