commit | cd58859fa7ddf14d88df507779c4fc085738da55 | [log] [tgz] |
---|---|---|
author | Twice <twice@apache.org> | Tue Sep 16 11:16:28 2025 +0800 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Sep 15 20:18:54 2025 -0700 |
tree | f891afa7e6c74c666e2bf9553a6e0af780d3716f | |
parent | 559d5e4843da87fbf1c000876ec75b596bf2f8f4 [diff] |
[MLIR][Python] Add docstring for generated python op classes (#158198) This PR adds support in mlir-tblgen for generating docstrings for each Python class corresponding to an MLIR op. The docstrings are currently derived from the op’s description in ODS, with indentation adjusted to display nicely in Python. This makes it easier for Python users to see the op descriptions directly in their IDE or LSP while coding. In the future, we can extend the docstrings to include explanations for each method, attribute, and so on. This idea was previously discussed in the `#mlir-python` channel on Discord with @makslevental and @superbobry. --------- Co-authored-by: Maksim Levental <maksim.levental@gmail.com> GitOrigin-RevId: 10d0d955e22be43abab8fe7e339e99068aaac030
See https://mlir.llvm.org/ for more information.