Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
cb89d89d
Commit
cb89d89d
authored
4 years ago
by
hashimsharif
Browse files
Options
Downloads
Patches
Plain Diff
Added frequency update time to hpcm controller - config timer
parent
5ab75fdd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp
+23
-8
23 additions, 8 deletions
.../hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp
with
23 additions
and
8 deletions
llvm/projects/hpvm-tensor-rt/tensor_runtime/src/hpvm-rt-controller.cpp
+
23
−
8
View file @
cb89d89d
...
@@ -41,6 +41,7 @@ void updateJetsonGPUFreq(int freq_level) {
...
@@ -41,6 +41,7 @@ void updateJetsonGPUFreq(int freq_level) {
unsigned
long
int
readJetsonGPUFreq
()
{
unsigned
long
int
readJetsonGPUFreq
()
{
FILE
*
cur_freq_file
=
FILE
*
cur_freq_file
=
fopen
(
"/sys/devices/17000000.gp10b/devfreq/17000000.gp10b/cur_freq"
,
"r"
);
fopen
(
"/sys/devices/17000000.gp10b/devfreq/17000000.gp10b/cur_freq"
,
"r"
);
// fopen("/sys/devices/17000000.gp10b/devfreq/17000000.gp10b/min_freq", "r");
if
(
cur_freq_file
==
NULL
)
{
if
(
cur_freq_file
==
NULL
)
{
printf
(
"Could not open cur_freq file
\n
"
);
printf
(
"Could not open cur_freq file
\n
"
);
}
}
...
@@ -1370,15 +1371,22 @@ extern "C" void llvm_hpvm_invokeRtControl_ADJUST(
...
@@ -1370,15 +1371,22 @@ extern "C" void llvm_hpvm_invokeRtControl_ADJUST(
RC
->
findTargetConfiguration
(
target_speedup
,
SPEEDUP
);
RC
->
findTargetConfiguration
(
target_speedup
,
SPEEDUP
);
RC
->
pause_profiler
();
RC
->
pause_profiler
();
std
::
pair
<
double
,
double
>
pinfo
=
RC
->
get_time_energy
();
RC
->
reset_profiler
();
RC
->
addToCurrentIterationControlTime
(
pinfo
.
first
);
RC
->
addToCurrentIterationControlEnergy
(
pinfo
.
second
);
//* *
//* *
//*Needed for the frequency variation experiment - not part of the control *
//*Needed for the frequency variation experiment - not part of the control *
RC
->
resume_profiler
();
RC
->
updateFrequency
();
RC
->
updateFrequency
();
//* */
RC
->
pause_profiler
();
std
::
pair
<
double
,
double
>
pinfo
=
RC
->
get_time_energy
();
std
::
pair
<
double
,
double
>
pinfo
2
=
RC
->
get_time_energy
();
RC
->
reset_profiler
();
RC
->
reset_profiler
();
RC
->
addToCurrentIterationControlTime
(
pinfo
.
first
);
RC
->
addToCurrentIterationConfigTime
(
pinfo2
.
first
);
RC
->
addToCurrentIterationControlEnergy
(
pinfo
.
second
);
RC
->
addToCurrentIterationConfigEnergy
(
pinfo2
.
second
);
//* */
INFO
(
INFO
(
"current iteration time = %f, current iteration energy = %f
\n
"
,
"current iteration time = %f, current iteration energy = %f
\n
"
,
...
@@ -1407,15 +1415,22 @@ extern "C" void llvm_hpvm_invokeRtControl_ADJUST_PR(
...
@@ -1407,15 +1415,22 @@ extern "C" void llvm_hpvm_invokeRtControl_ADJUST_PR(
RC
->
adjustTargetConfiguration
(
target_speedup
);
RC
->
adjustTargetConfiguration
(
target_speedup
);
RC
->
pause_profiler
();
RC
->
pause_profiler
();
std
::
pair
<
double
,
double
>
pinfo
=
RC
->
get_time_energy
();
RC
->
reset_profiler
();
RC
->
addToCurrentIterationControlTime
(
pinfo
.
first
);
RC
->
addToCurrentIterationControlEnergy
(
pinfo
.
second
);
//* *
//* *
//*Needed for the frequency variation experiment - not part of the control *
//*Needed for the frequency variation experiment - not part of the control *
RC
->
resume_profiler
();
RC
->
updateFrequency
();
RC
->
updateFrequency
();
//* */
RC
->
pause_profiler
();
std
::
pair
<
double
,
double
>
pinfo
=
RC
->
get_time_energy
();
std
::
pair
<
double
,
double
>
pinfo
2
=
RC
->
get_time_energy
();
RC
->
reset_profiler
();
RC
->
reset_profiler
();
RC
->
addToCurrentIterationControlTime
(
pinfo
.
first
);
RC
->
addToCurrentIterationConfigTime
(
pinfo2
.
first
);
RC
->
addToCurrentIterationControlEnergy
(
pinfo
.
second
);
RC
->
addToCurrentIterationConfigEnergy
(
pinfo2
.
second
);
//* */
INFO
(
INFO
(
"current iteration time = %f, current iteration energy = %f
\n
"
,
"current iteration time = %f, current iteration energy = %f
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment