Update PYTHONPATH in development.md (#2644)

Modify PYTHONPATH to new related directory in docs.
pull/2674/head snapshot-20231219.1057
Yinrun Lyu 2023-12-19 14:46:55 +08:00 committed by GitHub
parent 8649b84e3f
commit 89cfbe894d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ portable_realpath() {
td="$(portable_realpath "$(dirname "$0")"/..)" td="$(portable_realpath "$(dirname "$0")"/..)"
build_dir="$(portable_realpath "${TORCH_MLIR_BUILD_DIR:-$td/build}")" 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() { write_env_file() {
echo "Updating $build_dir/.env file" echo "Updating $build_dir/.env file"

View File

@ -109,13 +109,13 @@ cmake --build build
### Linux and macOS ### Linux and macOS
```shell ```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 ### Windows PowerShell
```shell ```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 ## 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): (if running on Windows, modify the environment variable as shown above):
```shell ```shell
source mlir_venv/bin/activate 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 python projects/pt1/examples/torchscript_resnet18_all_output_types.py
``` ```