From e158c2ff76995f8eb188367370bb1ff69b77a816 Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Fri, 4 Jul 2025 13:35:25 -0400 Subject: [PATCH 1/2] [mlir][docs][python] Fix up testing docs Use the correct path to binding tests. Also add a suggested ninja command to run tests. --- mlir/docs/Bindings/Python.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mlir/docs/Bindings/Python.md b/mlir/docs/Bindings/Python.md index b8bd0f507a510..90796ea0801a2 100644 --- a/mlir/docs/Bindings/Python.md +++ b/mlir/docs/Bindings/Python.md @@ -51,7 +51,9 @@ python -m pip install --upgrade pip # packages will be installed there. python -m pip install -r mlir/python/requirements.txt -# Now run `cmake`, `ninja`, et al. +# Now run `cmake`, `ninja`, et al. For example, to run python bindings test only +# using ninja: +ninja check-mlir-python ``` For interactive use, it is sufficient to add the @@ -859,7 +861,7 @@ mutually exclusive with a more complete mapping of the backing constructs. ## Testing -Tests should be added in the `test/Bindings/Python` directory and should +Tests should be added in the `mlir/test/python` directory and should typically be `.py` files that have a lit run line. We use `lit` and `FileCheck` based tests: From 495edba874007622a94213b3f5f2cccbf9a7eb7d Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Fri, 4 Jul 2025 13:39:47 -0400 Subject: [PATCH 2/2] Improve doc --- mlir/docs/Bindings/Python.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mlir/docs/Bindings/Python.md b/mlir/docs/Bindings/Python.md index 90796ea0801a2..bef9e7f54948d 100644 --- a/mlir/docs/Bindings/Python.md +++ b/mlir/docs/Bindings/Python.md @@ -51,8 +51,9 @@ python -m pip install --upgrade pip # packages will be installed there. python -m pip install -r mlir/python/requirements.txt -# Now run `cmake`, `ninja`, et al. For example, to run python bindings test only -# using ninja: +# Now run your build command with `cmake`, `ninja`, et al. + +# Run mlir tests. For example, to run python bindings tests only using ninja: ninja check-mlir-python ```