Skip to content

Commit

Permalink
Update PYTHONPATH in development.md (#2644)
Browse files Browse the repository at this point in the history
Modify PYTHONPATH to new related directory in docs.
  • Loading branch information
yinrun authored Dec 19, 2023
1 parent 8649b84 commit 89cfbe8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build_tools/write_env_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

Expand Down

0 comments on commit 89cfbe8

Please sign in to comment.