<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/test/lib/Dialect/Test/TestAttributes.h, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[mlir][bufferization] Test tensor encoding -&gt; memref layout conversion (#161166)</title>
<updated>2025-10-15T10:44:17+00:00</updated>
<author>
<name>Andrei Golubev</name>
<email>andrey.golubev@intel.com</email>
</author>
<published>2025-10-15T10:44:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3141bdefff4e6ec8dd266ce5ff7c4db4fff1ea23'/>
<id>3141bdefff4e6ec8dd266ce5ff7c4db4fff1ea23</id>
<content type='text'>
Support custom types (4/N): test that it is possible to customize memref
layout specification for custom operations and function boundaries.

This is purely a test setup (no API modifications) to ensure users are
able to pass information from tensors to memrefs within bufferization
process. To achieve this, a test pass is required (since bufferization
options have to be set manually). As there is already a
--test-one-shot-module-bufferize pass present, it is extended for the
purpose.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support custom types (4/N): test that it is possible to customize memref
layout specification for custom operations and function boundaries.

This is purely a test setup (no API modifications) to ensure users are
able to pass information from tensors to memrefs within bufferization
process. To achieve this, a test pass is required (since bufferization
options have to be set manually). As there is already a
--test-one-shot-module-bufferize pass present, it is extended for the
purpose.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][polynomial] Remove polynomial dialect (#139766)</title>
<updated>2025-05-13T23:04:30+00:00</updated>
<author>
<name>Jeremy Kun</name>
<email>jkun@google.com</email>
</author>
<published>2025-05-13T23:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a3d2b7e2cb0fd421b0170721ed5becf099b53c5a'/>
<id>a3d2b7e2cb0fd421b0170721ed5becf099b53c5a</id>
<content type='text'>
Cf. https://discourse.llvm.org/t/future-of-the-polynomial-dialect/86117

For posterity, the polynomial dialect development has moved to HEIR, and
as of this writing the different components can be found here:

-
https://github.com/google/heir/tree/a422f130fa42ed2acf319a1bd6e420b651863c03/lib/Dialect/Polynomial
-
https://github.com/google/heir/tree/a422f130fa42ed2acf319a1bd6e420b651863c03/lib/Transforms/PolynomialApproximation
-
https://github.com/google/heir/tree/a422f130fa42ed2acf319a1bd6e420b651863c03/lib/Transforms/LowerPolynomialEval</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cf. https://discourse.llvm.org/t/future-of-the-polynomial-dialect/86117

For posterity, the polynomial dialect development has moved to HEIR, and
as of this writing the different components can be found here:

-
https://github.com/google/heir/tree/a422f130fa42ed2acf319a1bd6e420b651863c03/lib/Dialect/Polynomial
-
https://github.com/google/heir/tree/a422f130fa42ed2acf319a1bd6e420b651863c03/lib/Transforms/PolynomialApproximation
-
https://github.com/google/heir/tree/a422f130fa42ed2acf319a1bd6e420b651863c03/lib/Transforms/LowerPolynomialEval</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Ptr] Add the `MemorySpaceAttrInterface` interface and dependencies. (#86870)</title>
<updated>2025-03-19T14:55:24+00:00</updated>
<author>
<name>Fabian Mora</name>
<email>fmora.dev@gmail.com</email>
</author>
<published>2025-03-19T14:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2b8f887915020431112c35397368edd34b313f9a'/>
<id>2b8f887915020431112c35397368edd34b313f9a</id>
<content type='text'>
This patch introduces the `MemorySpaceAttrInterface` interface. This
interface is responsible for handling the semantics of `ptr` operations.

For example, this interface can be used to create read-only memory
spaces, making any other operation other than a load a verification
error, see `TestConstMemorySpaceAttr` for a possible implementation of
this concept.

This patch also introduces Enum dependencies `AtomicOrdering`, and
`AtomicBinOp`, both enumerations are clones of the Enums with the same
name in the LLVM Dialect.

Also, see:
- [[RFC] `ptr` dialect &amp; modularizing ptr ops in the LLVM
dialect](https://discourse.llvm.org/t/rfc-ptr-dialect-modularizing-ptr-ops-in-the-llvm-dialect/75142)
for rationale.
- https://github.com/llvm/llvm-project/pull/73057 for a prototype
implementation of the full change.

**Note: Ignore the first commit, that's being reviewed in
https://github.com/llvm/llvm-project/pull/86860 .**</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces the `MemorySpaceAttrInterface` interface. This
interface is responsible for handling the semantics of `ptr` operations.

For example, this interface can be used to create read-only memory
spaces, making any other operation other than a load a verification
error, see `TestConstMemorySpaceAttr` for a possible implementation of
this concept.

This patch also introduces Enum dependencies `AtomicOrdering`, and
`AtomicBinOp`, both enumerations are clones of the Enums with the same
name in the LLVM Dialect.

Also, see:
- [[RFC] `ptr` dialect &amp; modularizing ptr ops in the LLVM
dialect](https://discourse.llvm.org/t/rfc-ptr-dialect-modularizing-ptr-ops-in-the-llvm-dialect/75142)
for rationale.
- https://github.com/llvm/llvm-project/pull/73057 for a prototype
implementation of the full change.

**Note: Ignore the first commit, that's being reviewed in
https://github.com/llvm/llvm-project/pull/86860 .**</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] load dialects for non-namespaced attrs (#96242)</title>
<updated>2024-06-21T11:23:45+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2024-06-21T11:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bc82793b304cff80605cf7ab14f51a7924d27481'/>
<id>bc82793b304cff80605cf7ab14f51a7924d27481</id>
<content type='text'>
The mlir-translate tool calls into the parser without loading registered
dependent dialects, and the parser only loads attributes if the
fully-namespaced attribute is present in the textual IR. This causes
parsing to break when an op has an attribute that prints/parses without
the namespaced attribute.

Co-authored-by: Jeremy Kun &lt;jkun@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mlir-translate tool calls into the parser without loading registered
dependent dialects, and the parser only loads attributes if the
fully-namespaced attribute is present in the textual IR. This causes
parsing to break when an op has an attribute that prints/parses without
the namespaced attribute.

Co-authored-by: Jeremy Kun &lt;jkun@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Improve MLIR Attribute::get() method efficiency by reducing the amount of argument copies (#68067)</title>
<updated>2023-10-04T01:07:46+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2023-10-04T01:07:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5fc28e7a8d989fffafec2301529d0164a28799b2'/>
<id>5fc28e7a8d989fffafec2301529d0164a28799b2</id>
<content type='text'>
This ensures that the proper std::forward/std::move are involved, we go from 6
copy-constructions to 0 (!) on Attribute creation in release builds.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that the proper std::forward/std::move are involved, we go from 6
copy-constructions to 0 (!) on Attribute creation in release builds.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "[mlir][linalg] Replace "string" iterator_types attr with enums in LinalgInterface.""</title>
<updated>2022-11-11T09:54:08+00:00</updated>
<author>
<name>Oleg Shyshkov</name>
<email>shyshkov@google.com</email>
</author>
<published>2022-11-10T10:42:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e6598b053dc71845423132ac0803b1ecd0b71d45'/>
<id>e6598b053dc71845423132ac0803b1ecd0b71d45</id>
<content type='text'>
With python code fixed.

This reverts commit 41280908e43d47903960c66237ab49caa5641b4d.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With python code fixed.

This reverts commit 41280908e43d47903960c66237ab49caa5641b4d.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir][linalg] Replace "string" iterator_types attr with enums in LinalgInterface."</title>
<updated>2022-11-09T14:59:54+00:00</updated>
<author>
<name>Oleg Shyshkov</name>
<email>shyshkov@google.com</email>
</author>
<published>2022-11-09T14:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=41280908e43d47903960c66237ab49caa5641b4d'/>
<id>41280908e43d47903960c66237ab49caa5641b4d</id>
<content type='text'>
Breaks linalg python tests. Would need to also update python/mlir/dialects/linalg/opdsl.

This reverts commit b809d73973bb5aeedeb6a18cac2a7b3111d0c8d2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Breaks linalg python tests. Would need to also update python/mlir/dialects/linalg/opdsl.

This reverts commit b809d73973bb5aeedeb6a18cac2a7b3111d0c8d2.
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][linalg] Replace "string" iterator_types attr with enums in LinalgInterface.</title>
<updated>2022-11-09T14:47:29+00:00</updated>
<author>
<name>Oleg Shyshkov</name>
<email>shyshkov@google.com</email>
</author>
<published>2022-11-09T14:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b809d73973bb5aeedeb6a18cac2a7b3111d0c8d2'/>
<id>b809d73973bb5aeedeb6a18cac2a7b3111d0c8d2</id>
<content type='text'>
[RFC: EnumAttr for iterator types in Linalg](https://discourse.llvm.org/t/rfc-enumattr-for-iterator-types-in-linalg/64535)

This affect touches and probably breaks most of the code that creates `linalg.generic`. A fix would be to replace calls to `getParallelIteratorTypeName/getReductionIteratorTypeName` with `mlir::utils::IteratorType::parallel/reduction` and types from `StringRef` to `mlir::utils::IteratorType`.

Due to limitations of tablegen, shared C++ definition of IteratorType enum lives in StructuredOpsUtils.td, but each dialect should have it's own EnumAttr wrapper. To avoid conflict, all enums in a dialect are put into a separate file with a separate tablegen rule.

Test dialect td files are refactored a bit.

Printed format of `linalg.generic` temporarily remains unchanged to avoid breaking code and tests in the same change.

Differential Revision: https://reviews.llvm.org/D137658
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[RFC: EnumAttr for iterator types in Linalg](https://discourse.llvm.org/t/rfc-enumattr-for-iterator-types-in-linalg/64535)

This affect touches and probably breaks most of the code that creates `linalg.generic`. A fix would be to replace calls to `getParallelIteratorTypeName/getReductionIteratorTypeName` with `mlir::utils::IteratorType::parallel/reduction` and types from `StringRef` to `mlir::utils::IteratorType`.

Due to limitations of tablegen, shared C++ definition of IteratorType enum lives in StructuredOpsUtils.td, but each dialect should have it's own EnumAttr wrapper. To avoid conflict, all enums in a dialect are put into a separate file with a separate tablegen rule.

Test dialect td files are refactored a bit.

Printed format of `linalg.generic` temporarily remains unchanged to avoid breaking code and tests in the same change.

Differential Revision: https://reviews.llvm.org/D137658
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add a generic DialectResourceBlobManager to simplify resource blob management</title>
<updated>2022-08-01T19:37:16+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-07-26T01:25:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5f58e14b36edbdacef86a2f3fc192b5720b2ba62'/>
<id>5f58e14b36edbdacef86a2f3fc192b5720b2ba62</id>
<content type='text'>
The DialectResourceBlobManager class provides functionality for managing resource blobs
in a generic, dialect-agnostic fashion. In addition to this class, a dialect interface and custom
resource handle are provided to simplify referencing and interacting with the manager. These
classes intend to simplify the work required for dialects that want to manage resource blobs
during compilation, such as for large elements attrs.  The old manager for the resource example
in the test dialect has been updated to use this, which provides and cleaner and more consistent API.

This commit also adds new HeapAsmResourceBlob and ImmortalAsmResourceBlob to simplify
creating resource blobs in common scenarios.

Differential Revision: https://reviews.llvm.org/D130021
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DialectResourceBlobManager class provides functionality for managing resource blobs
in a generic, dialect-agnostic fashion. In addition to this class, a dialect interface and custom
resource handle are provided to simplify referencing and interacting with the manager. These
classes intend to simplify the work required for dialects that want to manage resource blobs
during compilation, such as for large elements attrs.  The old manager for the resource example
in the test dialect has been updated to use this, which provides and cleaner and more consistent API.

This commit also adds new HeapAsmResourceBlob and ImmortalAsmResourceBlob to simplify
creating resource blobs in common scenarios.

Differential Revision: https://reviews.llvm.org/D130021
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Allow for attaching external resources to .mlir files</title>
<updated>2022-06-29T19:14:01+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-06-28T20:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ea488bd6e1f7bf52d6ec7a40c7116670f06e92a6'/>
<id>ea488bd6e1f7bf52d6ec7a40c7116670f06e92a6</id>
<content type='text'>
This commit enables support for providing and processing external
resources within MLIR assembly formats. This is a mechanism with which
dialects, and external clients, may attach additional information when
printing IR without that information being encoded in the IR itself.
External resources are not uniqued within the MLIR context, are not
attached directly to any operation, and are solely intended to live and be
processed outside of the immediate IR. There are many potential uses of this
functionality, for example MLIR's pass crash reproducer could utilize this to
attach the pass resource executing when a crash occurs. Other types of
uses may be embedding large amounts of binary data, such as weights in ML
applications, that shouldn't be copied directly into the MLIR context, but
need to be kept adjacent to the IR.

External resources are encoded using a key-value pair nested within a
dictionary anchored by name either on a dialect, or an externally registered
entity. The key is an identifier used to disambiguate the data. The value
may be stored in various limited forms, but general encodings use a string
(human readable) or blob format (binary). Within the textual format, an
example may be of the form:

```mlir
{-#
  // The `dialect_resources` section within the file-level metadata
  // dictionary is used to contain any dialect resource entries.
  dialect_resources: {
    // Here is a dictionary anchored on "foo_dialect", which is a dialect
    // namespace.
    foo_dialect: {
      // `some_dialect_resource` is a key to be interpreted by the dialect,
      // and used to initialize/configure/etc.
      some_dialect_resource: "Some important resource value"
    }
  },
  // The `external_resources` section within the file-level metadata
  // dictionary is used to contain any non-dialect resource entries.
  external_resources: {
    // Here is a dictionary anchored on "mlir_reproducer", which is an
    // external entity representing MLIR's crash reproducer functionality.
    mlir_reproducer: {
      // `pipeline` is an entry that holds a crash reproducer pipeline
      // resource.
      pipeline: "func.func(canonicalize,cse)"
    }
  }
```

Differential Revision: https://reviews.llvm.org/D126446
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit enables support for providing and processing external
resources within MLIR assembly formats. This is a mechanism with which
dialects, and external clients, may attach additional information when
printing IR without that information being encoded in the IR itself.
External resources are not uniqued within the MLIR context, are not
attached directly to any operation, and are solely intended to live and be
processed outside of the immediate IR. There are many potential uses of this
functionality, for example MLIR's pass crash reproducer could utilize this to
attach the pass resource executing when a crash occurs. Other types of
uses may be embedding large amounts of binary data, such as weights in ML
applications, that shouldn't be copied directly into the MLIR context, but
need to be kept adjacent to the IR.

External resources are encoded using a key-value pair nested within a
dictionary anchored by name either on a dialect, or an externally registered
entity. The key is an identifier used to disambiguate the data. The value
may be stored in various limited forms, but general encodings use a string
(human readable) or blob format (binary). Within the textual format, an
example may be of the form:

```mlir
{-#
  // The `dialect_resources` section within the file-level metadata
  // dictionary is used to contain any dialect resource entries.
  dialect_resources: {
    // Here is a dictionary anchored on "foo_dialect", which is a dialect
    // namespace.
    foo_dialect: {
      // `some_dialect_resource` is a key to be interpreted by the dialect,
      // and used to initialize/configure/etc.
      some_dialect_resource: "Some important resource value"
    }
  },
  // The `external_resources` section within the file-level metadata
  // dictionary is used to contain any non-dialect resource entries.
  external_resources: {
    // Here is a dictionary anchored on "mlir_reproducer", which is an
    // external entity representing MLIR's crash reproducer functionality.
    mlir_reproducer: {
      // `pipeline` is an entry that holds a crash reproducer pipeline
      // resource.
      pipeline: "func.func(canonicalize,cse)"
    }
  }
```

Differential Revision: https://reviews.llvm.org/D126446
</pre>
</div>
</content>
</entry>
</feed>
