Skip to content

Commit

Permalink
Update development.md with source builds (llvm#1105)
Browse files Browse the repository at this point in the history
Add source builds and remove deprecated libtorch information.
  • Loading branch information
powderluv authored and gpetters94 committed Jul 27, 2022
1 parent 5521084 commit a521d3c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions development.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,14 @@ $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.

# 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:
# PyTorch source builds and custom PyTorch versions

Torch-MLIR by default builds with the latest nightly PyTorch version. This can be toggled to build from latest PyTorch source with
```
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
-DTORCH_MLIR_USE_INSTALLED_PYTORCH=OFF
-DPYTORCH_REPO=vivekkhandelwal1/pytorch # Optional Github path. Defaults to pytorch/pytorch
-DPYTORCH_BRANCH=master #Optional. Defaults to PyTorch's main branch
```
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

Expand Down

0 comments on commit a521d3c

Please sign in to comment.