Skip to content
Snippets Groups Projects
Commit ad72c188 authored by Hashim Sharif's avatar Hashim Sharif
Browse files

Auto Handling of non-absolute data paths

parent ff80f7eb
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,9 @@ class Benchmark:
if len(argv) > 2:
if argv[2] == "frontend":
if not os.path.isabs(self.data_dir):
self.data_dir = os.getcwd() + "/" + self.data_dir
if argv[1] == "hpvm_reload": # If reloading HPVM weights use this as directory to load from in HPVM-C generated src
self.data_dir = self.reload_dir
......@@ -134,15 +137,17 @@ class Benchmark:
self.num_classes,
(argv[1] == "hpvm_reload")) # Do not redump HPVM weights if `hpvm_reload` used
if len(argv) > 3 and argv[3] == "compile":
self.compileSource(working_dir, "approxhpvm_src.cc", "HPVM_binary")
else:
self.printUsage()
if len(argv) > 4 and argv[4] == "compile_tuner":
self.compileSource(working_dir, "approxhpvm_tuner_src.cc", "HPVM_tuner_binary")
else:
self.printUsage()
if len(argv) > 3:
if argv[3] == "compile":
self.compileSource(working_dir, "approxhpvm_src.cc", "HPVM_binary")
else:
self.printUsage()
if len(argv) > 4:
if argv[4] == "compile_tuner":
self.compileSource(working_dir, "approxhpvm_tuner_src.cc", "HPVM_tuner_binary")
else:
self.printUsage()
if argv[2] == "keras_dump":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment