Added missing set_dep_pypaths scripts.

This commit is contained in:
Prashant Kumar
2022-03-10 15:37:55 +00:00
parent 9f252d688a
commit 7a0296f359
2 changed files with 16 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ The Shark Runner provides inference and training APIs to run deep learning model
#Activate your virtual environment.
export TORCH_MLIR_BUILD_DIR=/path/to/torch-mlir/build
export IREE_BUILD_DIR=/path/to/iree-build
source ../set_dep_pypaths.sh
source set_dep_pypaths.sh
```
### Run a demo script

15
shark_runner/set_dep_pypaths.sh Executable file
View File

@@ -0,0 +1,15 @@
echo "Don't forget to activate your venv before calling this script";
export SCRIPTPATH=$(dirname "$(realpath BASH_SOURCE)");
if [ -z ${TORCH_MLIR_BUILD_DIR+x} ]; then echo "TORCH_MLIR_BUILD_DIR is unset"; exit 1; else echo "TORCH_MLIR_BUILD_DIR is set to '$TORCH_MLIR_BUILD_DIR'"; fi
if [ -z ${IREE_BUILD_DIR+x} ]; then echo "IREE_BUILD_DIR is unset"; exit 1; else echo "IREE_BUILD_DIR is set to '$IREE_BUILD_DIR'"; fi
if [ -z ${SHARK_SAMPLES_DIR+x} ]; then echo "SHARK_SAMPLES_DIR is unset, using '$SCRIPTPATH'"; export SHARK_SAMPLES_DIR=$SCRIPTPATH; else echo "SHARK_SAMPLES_DIR is set to '$SHARK_SAMPLES_DIR'"; fi
export PYTHONPATH=${PYTHONPATH}:${IREE_BUILD_DIR}/compiler-api/python_package:${IREE_BUILD_DIR}/bindings/python
export PYTHONPATH=${PYTHONPATH}:${TORCH_MLIR_BUILD_DIR}/tools/torch-mlir/python_packages/torch_mlir:${TORCH_MLIR_BUILD_DIR}/../examples
export PYTHONPATH=${PYTHONPATH}:${SHARK_SAMPLES_DIR}