diff --git a/hpvm/scripts/automated_tests.sh b/hpvm/scripts/automated_tests.sh deleted file mode 100644 index aece74eaa0a59e2e91807e9444c5c10054126cdd..0000000000000000000000000000000000000000 --- a/hpvm/scripts/automated_tests.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -CURRENT_DIR=`pwd` -BUILD_DIR=$CURRENT_DIR/build -HPVM_RT=hpvm-rt/hpvm-rt.bc - -if [ -f $BUILD_DIR/tools/hpvm/projects/$HPVM_RT ]; then - true -else - echo $BUILD_DIR/tools/hpvm/projects/$HPVM_RT - echo HPVM not installed! Exiting without running tests!. - exit 0 -fi - -LIT_DIR=$BUILD_DIR/bin/ - -LIT_TOOL=$LIT_DIR/llvm-lit - -TEST_DIR=$CURRENT_DIR/test -REG_TEST_DIR=$TEST_DIR/regressionTests -UNIT_TEST_DIR=$TEST_DIR/unitTests - -echo -echo Running tests ... -echo - -# Run regression tests -$LIT_TOOL -v $REG_TEST_DIR - -# Run unit tests -#$LIT_TOOL -v $UNIT_TEST_DIR diff --git a/hpvm/scripts/hpvm_installer.py b/hpvm/scripts/hpvm_installer.py index 4d1fefdc7a54db0388daec23c6853bf019afccce..cd6ef3bae08b0cd6c912a40b6a45e3ca37257c99 100755 --- a/hpvm/scripts/hpvm_installer.py +++ b/hpvm/scripts/hpvm_installer.py @@ -31,8 +31,14 @@ LINKS = [ "tools", ] MAKE_TARGETS = ["approxhpvm.py"] -MAKE_TEST_TARGETS = ["hpvm-check"] +MAKE_TEST_TARGETS = ["check-hpvm-dnn", "check-hpvm-pass"] +# Relative to project root which is __file__.parent.parent +PY_PACKAGES = [ + "projects/predtuner", + "projects/torch2hpvm", + "projects/keras", +] def parse_args(): parser = ArgumentParser( @@ -241,6 +247,16 @@ For more details refer to README.md. chdir(ROOT_DIR) +def install_py_packages(): + import sys + + project_root = Path(__file__).parent.parent + for package in PY_PACKAGES: + package_home = project_root / package + print(f"Installing python package {package_home}") + check_call([sys.executable, "-m", "pip", "install", str(package_home)]) + + def run_tests(): chdir(BUILD_DIR) # Run regression tests @@ -270,6 +286,7 @@ def main(): if not args.no_params: check_download_model_params() maybe_build(not args.no_build, args.parallel, args.targets, args.run_tests) + install_py_packages() if args.run_tests: run_tests() else: