mirror of https://github.com/llvm/torch-mlir
Update PYTHONPATH in development.md (#2644)
Modify PYTHONPATH to new related directory in docs.pull/2674/head snapshot-20231219.1057
parent
8649b84e3f
commit
89cfbe894d
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue