Skip to content

Commit

Permalink
Seperate concerns (PR intel#92 solves it)
Browse files Browse the repository at this point in the history
  • Loading branch information
aahouzi committed Jan 29, 2024
1 parent 40d2c84 commit b13074d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions scripts/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@ def main(args_in: Optional[List[str]] = None) -> None:
if is_win():
path = Path(args.build_dir, "./Bin/Release/run_{}.exe".format(model_name))
else:
import neural_speed
package_path = os.path.dirname(neural_speed.__file__)
path = Path(package_path, "./run_{}".format(model_name))
if args.one_click_run == "True":
import neural_speed
package_path = os.path.dirname(neural_speed.__file__)
path = Path(package_path, "./run_{}".format(model_name))
else:
path = Path(args.build_dir, "./bin/run_{}".format(model_name))

if not path.exists():
print("Please build graph first or select the correct model name.")
Expand Down
9 changes: 6 additions & 3 deletions scripts/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ def main(args_in: Optional[List[str]] = None) -> None:
if is_win():
path = Path(args.build_dir, "./Bin/Release/quant_{}.exe".format(model_name))
else:
import neural_speed
package_path = os.path.dirname(neural_speed.__file__)
path = Path(package_path, "./quant_{}".format(model_name))
if args.one_click_run == "True":
import neural_speed
package_path = os.path.dirname(neural_speed.__file__)
path = Path(package_path, "./quant_{}".format(model_name))
else:
path = Path(args.build_dir, "./bin/quant_{}".format(model_name))
if not path.exists():
print(path)
print("Please build graph first or select the correct model name.")
Expand Down

0 comments on commit b13074d

Please sign in to comment.