mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
Added missing set_dep_pypaths scripts.
This commit is contained in:
@@ -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
15
shark_runner/set_dep_pypaths.sh
Executable 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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user