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
2091f2a7
Commit
2091f2a7
authored
4 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
Working getopt() handling for config file reload
parent
f6b57d73
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/keras/keras_frontend/hpvm_dfg_translator.py
+21
-3
21 additions, 3 deletions
hpvm/projects/keras/keras_frontend/hpvm_dfg_translator.py
with
21 additions
and
3 deletions
hpvm/projects/keras/keras_frontend/hpvm_dfg_translator.py
+
21
−
3
View file @
2091f2a7
...
...
@@ -682,7 +682,7 @@ class HPVMTranslator:
input_str
+=
"
std::string input_path = test_input_path;
\n
"
input_str
+=
"
std::string labels_path = test_labels_path;
\n\n
"
input_str
+=
"
if (
argc >= 2 && std::string(argv[1])
==
\"
tune
\"
){
\n
"
input_str
+=
"
if (
runtype
==
\"
tune
\"
){
\n
"
input_str
+=
"
input = tune_input;
\n
"
input_str
+=
"
input_path = tune_input_path;
\n
"
input_str
+=
"
labels_path = tune_labels_path;
\n\n
"
...
...
@@ -701,6 +701,15 @@ class HPVMTranslator:
main_func_str
+=
self
.
weight_str
main_func_str
+=
self
.
input_str
main_func_str
+=
"
\n
"
+
HPVM_init
+
"
();
\n
"
main_func_str
+=
"""
if(config_path !=
""
){
llvm_hpvm_initializeRuntimeController(config_path.c_str());
}
"""
main_func_str
+=
"
RootIn* args = static_cast<RootIn*>(malloc(sizeof(RootIn)));
\n\n
"
main_func_str
+=
self
.
handleTuneTestData
()
...
...
@@ -751,7 +760,16 @@ class HPVMTranslator:
tuner_main_func_str
+=
"
\n
int ret = 0;
\n
"
tuner_main_func_str
+=
"
while ((ret = fifo_wait())) {
\n
"
tuner_main_func_str
+=
"
\n
"
+
HPVM_init
+
"
();
\n\n
"
tuner_main_func_str
+=
"
\n
"
+
HPVM_init
+
"
();
\n
"
tuner_main_func_str
+=
"""
if(config_path !=
""
){
llvm_hpvm_initializeRuntimeController(config_path.c_str());
}
"""
tuner_main_func_str
+=
"
std::string input_pth = (ret == 1 ? test_input_path : tune_input_path);
\n
"
tuner_main_func_str
+=
"
std::string labels_pth = (ret == 1 ? test_labels_path : tune_labels_path);
\n
"
...
...
@@ -863,7 +881,7 @@ void printUsage(){
getopt_str
=
"""
std::string runtype;
std::string config_path;
std::string config_path
=
""
;
int flag;
while ( (flag = getopt (argc, argv,
"
d:c:
"
)) != -1){
switch (flag)
...
...
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