mirror of https://github.com/llvm/torch-mlir
Document requirements for `torch_mlir_e2e_test` (#3722)
This documents which CMake options must be set to be able to use `torch_mlir_e2e_test`, required e.g. for `projects/pt1/tools/e2e_test.sh`. Makes progress on #3696. Closes #3719.pull/3730/head
parent
99848265c3
commit
e4f2bdf0db
|
@ -109,6 +109,15 @@ cmake -GNinja -Bbuild \
|
||||||
-DLLVM_ENABLE_ASSERTIONS=ON \
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Flags to run end-to-end tests:
|
||||||
|
|
||||||
|
Running the end-to-end execution tests locally requires enabling the native PyTorch extension features and the JIT IR importer, which depends on the
|
||||||
|
former and defaults to `ON` if not changed:
|
||||||
|
```shell
|
||||||
|
-DTORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS=ON \
|
||||||
|
-DTORCH_MLIR_ENABLE_JIT_IR_IMPORTER=ON \
|
||||||
|
```
|
||||||
|
|
||||||
### Building against a pre-built LLVM
|
### Building against a pre-built LLVM
|
||||||
|
|
||||||
If you have built llvm-project separately in the directory `$LLVM_INSTALL_DIR`, you can also build the project *out-of-tree* using the following command as template:
|
If you have built llvm-project separately in the directory `$LLVM_INSTALL_DIR`, you can also build the project *out-of-tree* using the following command as template:
|
||||||
|
@ -396,6 +405,8 @@ Torch-MLIR has two types of tests:
|
||||||
a homegrown testing framework (see
|
a homegrown testing framework (see
|
||||||
`projects/pt1/python/torch_mlir_e2e_test/framework.py`) and the test suite
|
`projects/pt1/python/torch_mlir_e2e_test/framework.py`) and the test suite
|
||||||
lives at `projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py`.
|
lives at `projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py`.
|
||||||
|
The tests require to build with `TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS` (and
|
||||||
|
the dependent option `TORCH_MLIR_ENABLE_JIT_IR_IMPORTER`) set to `ON`.
|
||||||
|
|
||||||
2. Compiler and Python API unit tests. These use LLVM's `lit` testing framework.
|
2. Compiler and Python API unit tests. These use LLVM's `lit` testing framework.
|
||||||
For example, these might involve using `torch-mlir-opt` to run a pass and
|
For example, these might involve using `torch-mlir-opt` to run a pass and
|
||||||
|
|
Loading…
Reference in New Issue