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
144ec2f4
Commit
144ec2f4
authored
4 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
Fixing LLVM_SRC_ROOT asseertions in approx knob handling
parent
3f09f978
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/approx_knobs_utils.cc
+11
-14
11 additions, 14 deletions
...s/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
with
11 additions
and
14 deletions
llvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
+
11
−
14
View file @
144ec2f4
...
...
@@ -7,7 +7,7 @@
#include
<string.h>
#include
"approx_knob_utils.h"
#include
"debug.h"
PerfParams
::
PerfParams
(){
...
...
@@ -25,16 +25,15 @@ PerfParams::PerfParams(int row1, int col1, int skip_offset1){
PerfParamSet
::
PerfParamSet
(){
char
llvm_src_root
[
100
];
strcpy
(
llvm_src_root
,
getenv
(
"LLVM_SRC_ROOT"
));
if
(
llvm_src_root
==
NULL
){
char
*
env_str
=
getenv
(
"LLVM_SRC_ROOT"
);
printf
(
"ERROR: SET LLVM_SRC_ROOT
\n
"
);
abort
(
);
if
(
env_str
==
NULL
){
ERROR
(
"ERROR: SET LLVM_SRC_ROOT
\n
"
);
}
strcpy
(
llvm_src_root
,
env_str
);
printf
(
"*LLVM_SRC_ROOT = %s"
,
llvm_src_root
);
char
*
knobs_file_path
=
strcat
(
llvm_src_root
,
"/projects/hpvm-tensor-rt/autotuner/data/global_knobs.txt"
);
...
...
@@ -48,8 +47,7 @@ PerfParamSet::PerfParamSet(){
while
(
std
::
getline
(
file
,
line
))
{
// Read each line
printf
(
"***** line === "
,
line
);
//printf ("***** line === %s ", line);
std
::
istringstream
iss
(
line
);
std
::
string
token
;
while
(
std
::
getline
(
iss
,
token
,
'\t'
)){
// Read each token in the line
...
...
@@ -118,14 +116,13 @@ SampParams::SampParams(int skip_rate1, int skip_offset1, float interpolation_id1
SampParamSet
::
SampParamSet
(){
char
llvm_src_root
[
100
];
strcpy
(
llvm_src_root
,
getenv
(
"LLVM_SRC_ROOT"
));
if
(
llvm_src_root
==
NULL
){
char
*
env_str
=
getenv
(
"LLVM_SRC_ROOT"
);
printf
(
"ERROR: SET LLVM_SRC_ROOT
\n
"
);
abort
(
);
if
(
env_str
==
NULL
){
ERROR
(
"ERROR: SET LLVM_SRC_ROOT
\n
"
);
}
strcpy
(
llvm_src_root
,
env_str
);
printf
(
"* LLVM_SRC_ROOT = %s
\n
"
,
llvm_src_root
);
char
*
knobs_file_path
=
strcat
(
llvm_src_root
,
"/projects/hpvm-tensor-rt/autotuner/data/global_knobs.txt"
);
...
...
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