Skip to content

Commit e4f2bdf

Browse files
authored
Document requirements for torch_mlir_e2e_test (llvm#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 llvm#3696. Closes llvm#3719.
1 parent 9984826 commit e4f2bdf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: docs/development.md

+11
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ cmake -GNinja -Bbuild \
109109
-DLLVM_ENABLE_ASSERTIONS=ON \
110110
```
111111

112+
#### Flags to run end-to-end tests:
113+
114+
Running the end-to-end execution tests locally requires enabling the native PyTorch extension features and the JIT IR importer, which depends on the
115+
former and defaults to `ON` if not changed:
116+
```shell
117+
-DTORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS=ON \
118+
-DTORCH_MLIR_ENABLE_JIT_IR_IMPORTER=ON \
119+
```
120+
112121
### Building against a pre-built LLVM
113122

114123
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:
396405
a homegrown testing framework (see
397406
`projects/pt1/python/torch_mlir_e2e_test/framework.py`) and the test suite
398407
lives at `projects/pt1/python/torch_mlir_e2e_test/test_suite/__init__.py`.
408+
The tests require to build with `TORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS` (and
409+
the dependent option `TORCH_MLIR_ENABLE_JIT_IR_IMPORTER`) set to `ON`.
399410

400411
2. Compiler and Python API unit tests. These use LLVM's `lit` testing framework.
401412
For example, these might involve using `torch-mlir-opt` to run a pass and

0 commit comments

Comments
 (0)