Skip to content

Commit 96f8cfe

Browse files
authored
Cosmetic fixes in the code and typos in Python bindings docs (#121791)
Description: - removed trailing spaces in few files - fixed markdown link definition:
1 parent d0812db commit 96f8cfe

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mlir/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ configure_file(
170170
# The pybind11 library can be found (set with -DPYBIND_DIR=...)
171171
# The python executable is correct (set with -DPython3_EXECUTABLE=...)
172172
# By default, find_package and probing for installed pybind11 is performed.
173-
# Super projects can set MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES=ON to
173+
# Super projects can set MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES=ON to
174174
# disable all package setup and control it themselves.
175175
#-------------------------------------------------------------------------------
176176

mlir/docs/Bindings/Python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ class ConstantOp(_ods_ir.OpView):
10351035
...
10361036
```
10371037

1038-
expects `value` to be a `TypedAttr` (e.g., `IntegerAttr` or `FloatAttr`).
1038+
expects `value` to be a `TypedAttr` (e.g., `IntegerAttr` or `FloatAttr`).
10391039
Thus, a natural extension is a builder that accepts a MLIR type and a Python value and instantiates the appropriate `TypedAttr`:
10401040

10411041
```python
@@ -1181,9 +1181,9 @@ make the passes available along with the dialect.
11811181
Dialect functionality other than IR objects or passes, such as helper functions,
11821182
can be exposed to Python similarly to attributes and types. C API is expected to
11831183
exist for this functionality, which can then be wrapped using pybind11 and
1184-
`[include/mlir/Bindings/Python/PybindAdaptors.h](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Bindings/Python/PybindAdaptors.h)`,
1184+
[`include/mlir/Bindings/Python/PybindAdaptors.h`](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Bindings/Python/PybindAdaptors.h),
11851185
or nanobind and
1186-
`[include/mlir/Bindings/Python/NanobindAdaptors.h](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h)`
1186+
[`include/mlir/Bindings/Python/NanobindAdaptors.h`](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h)
11871187
utilities to connect to the rest of Python API. The bindings can be located in a
11881188
separate module or in the same module as attributes and types, and
11891189
loaded along with the dialect.

mlir/test/python/execution_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def callback(a):
306306
log(arr)
307307

308308
with Context():
309-
# The module takes a subview of the argument memref, casts it to an unranked memref and
309+
# The module takes a subview of the argument memref, casts it to an unranked memref and
310310
# calls the callback with it.
311311
module = Module.parse(
312312
r"""

0 commit comments

Comments
 (0)