[all-commits] [llvm/llvm-project] 9e199f: [MLIR][OpenMP][Docs] NFC: Reorganize 'omp' dialect...

Sergio Afonso via All-commits all-commits at lists.llvm.org
Wed Sep 4 05:27:16 PDT 2024


  Branch: refs/heads/users/skatrak/mlir-omp-docs-01-reorg
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e199fbcc857fe0b93bdff7cde8d13365766dabf
      https://github.com/llvm/llvm-project/commit/9e199fbcc857fe0b93bdff7cde8d13365766dabf
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2024-09-03 (Tue, 03 Sep 2024)

  Changed paths:
    A mlir/docs/Dialects/OpenMPDialect/ODS.md
    A mlir/docs/Dialects/OpenMPDialect/_index.md

  Log Message:
  -----------
  [MLIR][OpenMP][Docs] NFC: Reorganize 'omp' dialect documentation

This patch creates a handwritten main documentation page for the OpenMP dialect
linking to the ODS-generated one as a sub-section.

This new page can be extended to better describe overall design decisions of
the dialect rather than relying exclusively on documentation generated
automatically from ODS descriptions. After some investigation, there seem to be
a few main ways we could structure dialect documentation to allow the
introduction of possibly extensive handwritten text.
  - Create a top-level OpenMPDialect.td file that includes the auto-generated
one. This is what the `acc` dialect currently does, but it results in the
addition of two equal TOCs (one of them automatically generated). It would be
possible to move the `include` before all handwritten sections so that the page
would have a single TOC, but I believe moving general descriptions to the end
of the document would hurt readability. Also keeping the section order without
introducing a second TOC would mean the TOC would be inserted somewhere halfway
through the page, which isn't useful.
  - Create an OpenMPDialect directory with an _index.md including the
auto-generated documentation. This is a different way of reproducing the same
issues described above, which is what is currently done for the `linalg`
dialect. The multiple TOC issue there is avoided by only including
automatically-generated documentation for operations (i.e. `mlir-tblgen
-gen-op-doc`) rather than for dialects (i.e. `mlir-tblgen -gen-dialect-doc`).
That approach would make it impossible to generate all of the documentation
without adding new tablegen backends for `DialectAttr`, `DialectType` and
`EnumAttrInfo` definitions or making the TOC optional through a command line
option.
  - Create an OpenMPDialect directory with an _index.md that does not include
the auto-generated documentation. Instead, link to another document in that
directory with includes it. This is the approach taken here, and it circumvents
all these issues without having to make any changes to tablegen backends.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list