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
ed090fb4
Commit
ed090fb4
authored
4 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
BugFix: Adding checks for global_knobs.txt existence
parent
68743c31
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
+11
-3
11 additions, 3 deletions
...s/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cc
+2
-1
2 additions, 1 deletion
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cc
with
13 additions
and
4 deletions
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_knobs_utils.cc
+
11
−
3
View file @
ed090fb4
...
@@ -24,16 +24,20 @@ PerfParams::PerfParams(int row1, int col1, int skip_offset1) {
...
@@ -24,16 +24,20 @@ 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
);
if
(
!
file
){
ERROR
(
" Could NOT find global_knobs.txt
\n
"
);
}
std
::
string
line
;
std
::
string
line
;
std
::
string
partial
;
std
::
string
partial
;
std
::
vector
<
std
::
string
>
tokens
;
std
::
vector
<
std
::
string
>
tokens
;
while
(
std
::
getline
(
file
,
line
))
{
// Read each line
while
(
std
::
getline
(
file
,
line
))
{
// Read each line
//
printf ("***** line === %s ", line);
//printf ("***** line === %s ", line);
std
::
istringstream
iss
(
line
);
std
::
istringstream
iss
(
line
);
std
::
string
token
;
std
::
string
token
;
while
(
std
::
getline
(
iss
,
token
,
'\t'
))
{
// Read each token in the line
while
(
std
::
getline
(
iss
,
token
,
'\t'
))
{
// Read each token in the line
...
@@ -94,9 +98,13 @@ SampParams::SampParams(int skip_rate1, int skip_offset1,
...
@@ -94,9 +98,13 @@ 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
);
if
(
!
file
){
ERROR
(
"Could NOT find global_knobs.txt
\n
"
);
}
std
::
string
line
;
std
::
string
line
;
std
::
string
partial
;
std
::
string
partial
;
std
::
vector
<
std
::
string
>
tokens
;
std
::
vector
<
std
::
string
>
tokens
;
...
...
This diff is collapsed.
Click to expand it.
hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cc
+
2
−
1
View file @
ed090fb4
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#define LOG_DEBUG 0 // Sets the debug logging to true
#define LOG_DEBUG 0 // Sets the debug logging to true
#define LOG_INFO 1 // Sets the info logging to true
#define LOG_INFO 1 // Sets the info logging to true
#define LOG_ERROR 1 // Print Errors
#define ASSERT_FLAG // Sets assertions to true (opposite of NDEBUG macro)
#define ASSERT_FLAG // Sets assertions to true (opposite of NDEBUG macro)
#include
"debug.h"
#include
"debug.h"
...
@@ -35,7 +36,7 @@ void DEBUG(const char *format, ...) {
...
@@ -35,7 +36,7 @@ void DEBUG(const char *format, ...) {
}
}
void
ERROR
(
const
char
*
format
,
...)
{
void
ERROR
(
const
char
*
format
,
...)
{
if
(
!
LOG_
DEBUG
)
// Don't print if logging info is disabled
if
(
!
LOG_
ERROR
)
// Don't print if logging info is disabled
return
;
return
;
va_list
args
;
va_list
args
;
va_start
(
args
,
format
);
va_start
(
args
,
format
);
...
...
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