From 89cfbe894df2592a296f48440005da244768b0fa Mon Sep 17 00:00:00 2001 From: Yinrun Lyu <5969932+yinrun@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:46:55 +0800 Subject: [PATCH] Update PYTHONPATH in development.md (#2644) Modify PYTHONPATH to new related directory in docs. --- build_tools/write_env_file.sh | 2 +- docs/development.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build_tools/write_env_file.sh b/build_tools/write_env_file.sh index 8f3c9a593..05179c56a 100755 --- a/build_tools/write_env_file.sh +++ b/build_tools/write_env_file.sh @@ -13,7 +13,7 @@ portable_realpath() { td="$(portable_realpath "$(dirname "$0")"/..)" build_dir="$(portable_realpath "${TORCH_MLIR_BUILD_DIR:-$td/build}")" -python_packages_dir="$build_dir/python_packages" +python_packages_dir="$build_dir/tools/torch-mlir/python_packages" write_env_file() { echo "Updating $build_dir/.env file" diff --git a/docs/development.md b/docs/development.md index c60312e7a..93ec50f4b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -109,13 +109,13 @@ cmake --build build ### Linux and macOS ```shell -export PYTHONPATH=`pwd`/build/python_packages/torch_mlir:`pwd`/projects/pt1/examples +export PYTHONPATH=`pwd`/build/tools/torch-mlir/python_packages/torch_mlir:`pwd`/projects/pt1/examples ``` ### Windows PowerShell ```shell -$env:PYTHONPATH = "$PWD/build/python_packages/torch_mlir;$PWD/projects/pt1/examples" +$env:PYTHONPATH = "$PWD/build/tools/torch-mlir/python_packages/torch_mlir;$PWD/projects/pt1/examples" ``` ## Testing MLIR output in various dialects @@ -126,7 +126,7 @@ Make sure you have activated the virtualenv and set the `PYTHONPATH` above (if running on Windows, modify the environment variable as shown above): ```shell source mlir_venv/bin/activate -export PYTHONPATH=`pwd`/build/tpython_packages/torch_mlir:`pwd`/projects/pt1/examples +export PYTHONPATH=`pwd`/build/tools/torch-mlir/python_packages/torch_mlir:`pwd`/projects/pt1/examples python projects/pt1/examples/torchscript_resnet18_all_output_types.py ```