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
d164459d
Commit
d164459d
authored
4 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
Removing knob reading prints
parent
03584c81
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
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
+8
-6
8 additions, 6 deletions
...s/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
with
8 additions
and
6 deletions
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
+
8
−
6
View file @
d164459d
...
@@ -23,7 +23,8 @@ PerfParams::PerfParams(int row1, int col1, int skip_offset1) {
...
@@ -23,7 +23,8 @@ PerfParams::PerfParams(int row1, int col1, int skip_offset1) {
}
}
PerfParamSet
::
PerfParamSet
()
{
PerfParamSet
::
PerfParamSet
()
{
printf
(
"- knobs_file_path = %s
\n
"
,
GLOBAL_KNOBS_FILE
);
//printf("- knobs_file_path = %s \n", GLOBAL_KNOBS_FILE);
std
::
ifstream
file
(
GLOBAL_KNOBS_FILE
);
std
::
ifstream
file
(
GLOBAL_KNOBS_FILE
);
std
::
string
line
;
std
::
string
line
;
...
@@ -59,8 +60,8 @@ PerfParamSet::PerfParamSet() {
...
@@ -59,8 +60,8 @@ PerfParamSet::PerfParamSet() {
std
::
getline
(
token_stream
,
tok
,
','
);
std
::
getline
(
token_stream
,
tok
,
','
);
int
offset
=
atoi
(
tok
.
c_str
());
int
offset
=
atoi
(
tok
.
c_str
());
printf
(
"**** knob = %d, row = %d, col = %d, offset = %d
\n\n
"
,
knob
,
//
printf("**** knob = %d, row = %d, col = %d, offset = %d \n\n", knob,
row
,
col
,
offset
);
//
row, col, offset);
PerfParams
params
(
row
,
col
,
offset
);
PerfParams
params
(
row
,
col
,
offset
);
perf_knob_map
[
knob
]
=
params
;
perf_knob_map
[
knob
]
=
params
;
}
}
...
@@ -92,7 +93,8 @@ SampParams::SampParams(int skip_rate1, int skip_offset1,
...
@@ -92,7 +93,8 @@ SampParams::SampParams(int skip_rate1, int skip_offset1,
}
}
SampParamSet
::
SampParamSet
()
{
SampParamSet
::
SampParamSet
()
{
printf
(
"- knobs_file_path = %s
\n
"
,
GLOBAL_KNOBS_FILE
);
//printf("- knobs_file_path = %s \n", GLOBAL_KNOBS_FILE);
std
::
ifstream
file
(
GLOBAL_KNOBS_FILE
);
std
::
ifstream
file
(
GLOBAL_KNOBS_FILE
);
std
::
string
line
;
std
::
string
line
;
...
@@ -114,7 +116,7 @@ SampParamSet::SampParamSet() {
...
@@ -114,7 +116,7 @@ SampParamSet::SampParamSet() {
int
index2
=
token
.
find
(
","
);
int
index2
=
token
.
find
(
","
);
std
::
string
knob_str
=
token
.
substr
(
index2
+
1
);
std
::
string
knob_str
=
token
.
substr
(
index2
+
1
);
int
knob
=
atoi
(
knob_str
.
c_str
());
int
knob
=
atoi
(
knob_str
.
c_str
());
printf
(
"knob = %d
\n
"
,
knob
);
//
printf("knob = %d \n", knob);
std
::
getline
(
iss
,
token
,
'\t'
);
std
::
getline
(
iss
,
token
,
'\t'
);
std
::
istringstream
token_stream
(
token
);
std
::
istringstream
token_stream
(
token
);
...
@@ -130,7 +132,7 @@ SampParamSet::SampParamSet() {
...
@@ -130,7 +132,7 @@ SampParamSet::SampParamSet() {
std
::
getline
(
token_stream
,
tok
,
','
);
std
::
getline
(
token_stream
,
tok
,
','
);
float
interpolation_id
=
atof
(
tok
.
c_str
());
float
interpolation_id
=
atof
(
tok
.
c_str
());
printf
(
"skip_every = %d, offset = %d
\n
"
,
skip_every
,
offset
);
//
printf("skip_every = %d, offset = %d \n", skip_every, offset);
SampParams
params
(
skip_every
,
offset
,
interpolation_id
);
SampParams
params
(
skip_every
,
offset
,
interpolation_id
);
samp_knob_map
[
knob
]
=
params
;
samp_knob_map
[
knob
]
=
params
;
}
}
...
...
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