Document workaround for PyTorch skew (#1023)

* Document workaround for PyTorch skew

* Update with review feedback
pull/1013/head
powderluv 2022-07-07 14:52:37 -07:00 committed by GitHub
parent 6491c69539
commit 3d1a160101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -222,6 +222,19 @@ $TORCH_MLIR_BUILD_DIR/bin/llvm-lit $TORCH_MLIR_SRC_ROOT/test -v --filter=canonic
Most of the unit tests use the [`FileCheck` tool](https://llvm.org/docs/CommandGuide/FileCheck.html) to verify expected outputs. Most of the unit tests use the [`FileCheck` tool](https://llvm.org/docs/CommandGuide/FileCheck.html) to verify expected outputs.
# Unexpected test failures with PyTorch / Libtorch skew
Torch-MLIR currently by default links to libtorch binaries and tests are run with the PyTorch nightlies. This can cause version / api
skew in your tests like (https://github.com/llvm/torch-mlir/issues/1007). If you notice any unexpected test failures please follow the steps below:
```
rm -rf libtorch* # note the asterisk after libtorch, since there is also a .zip file that needs to be removed
rm -rf build/
python -m pip install -r requirements.txt --upgrade # to get the latest pytorch
# Then rebuild and test torch-mlir
```
We expect this to be fixed once we take on a dependency on PyTorch and build it from source. That work is being tracked in [this](https://github.com/llvm/torch-mlir/tree/release-src-build) branch.
# Updating the LLVM submodule # Updating the LLVM submodule
Torch-MLIR maintains `llvm-project` (which contains, among other things, Torch-MLIR maintains `llvm-project` (which contains, among other things,