History log of /llvm-project/mlir/lib/Dialect/Transform/IR/TransformOps.cpp (Results 1 – 25 of 152)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# f6bfbc87 06-Jan-2025 Oleksandr "Alex" Zinenko <git@ozinenko.com>

[mlir] flush output in transform.print (#121382)

Print operations are often used for debugging, immediately before the
compiler aborts. In such cases, it is sometimes possible that the output
isn'

[mlir] flush output in transform.print (#121382)

Print operations are often used for debugging, immediately before the
compiler aborts. In such cases, it is sometimes possible that the output
isn't fully produced yet. Make sure it is by explicitly flushing the
output.

show more ...


# 09dfc571 20-Dec-2024 Jacques Pienaar <jpienaar@google.com>

[mlir] Enable decoupling two kinds of greedy behavior. (#104649)

The greedy rewriter is used in many different flows and it has a lot of
convenience (work list management, debugging actions, tracin

[mlir] Enable decoupling two kinds of greedy behavior. (#104649)

The greedy rewriter is used in many different flows and it has a lot of
convenience (work list management, debugging actions, tracing, etc). But
it combines two kinds of greedy behavior 1) how ops are matched, 2)
folding wherever it can.

These are independent forms of greedy and leads to inefficiency. E.g.,
cases where one need to create different phases in lowering and is
required to applying patterns in specific order split across different
passes. Using the driver one ends up needlessly retrying folding/having
multiple rounds of folding attempts, where one final run would have
sufficed.

Of course folks can locally avoid this behavior by just building their
own, but this is also a common requested feature that folks keep on
working around locally in suboptimal ways.

For downstream users, there should be no behavioral change. Updating
from the deprecated should just be a find and replace (e.g., `find ./
-type f -exec sed -i
's|applyPatternsAndFoldGreedily|applyPatternsGreedily|g' {} \;` variety)
as the API arguments hasn't changed between the two.

show more ...


Revision tags: llvmorg-19.1.6
# 1c352e66 15-Dec-2024 Oleksandr "Alex" Zinenko <git@ozinenko.com>

make transform.split_handle accept any handle kind (#118752)

It can now split value and parameter handles in addition to operation
handles. This is a generally useful functionality.


Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# 884221ed 16-Sep-2024 JOE1994 <joseph942010@gmail.com>

[mlir] Tidy uses of llvm::raw_stream_ostream (NFC)

As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly

( 65b13610a5226b84889b923ba

[mlir] Tidy uses of llvm::raw_stream_ostream (NFC)

As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly

( 65b13610a5226b84889b923bae884ba395ad084d for further reference )

* Don't call raw_string_ostream::flush(), which is essentially a no-op.
* Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.

show more ...


# 67e7f05a 12-Sep-2024 Kazu Hirata <kazu@google.com>

[Dialect] Avoid repeated hash lookups (NFC) (#108319)


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# d1ca1d01 19-Jul-2024 Guillermo Callaghan <guillermo.callaghan@huawei.com>

[mlir] Makes `zip_shortest` an optional keyword in `transform.foreach` (#98492)

This PR addresses a [comment] made by @ftynse about the syntax for
`ForeachOp`. The syntax was modified by @muneebkha

[mlir] Makes `zip_shortest` an optional keyword in `transform.foreach` (#98492)

This PR addresses a [comment] made by @ftynse about the syntax for
`ForeachOp`. The syntax was modified by @muneebkhan85 in #82792, where
the attribute dictionary was moved to the middle.
This patch moves it back to its original place at the end. And
introduces an optional keyword for `zip_shortest`.

[comment]:
https://github.com/llvm/llvm-project/pull/82792#pullrequestreview-2132814144

show more ...


# a9efcbf4 21-Jun-2024 muneebkhan85 <150162960+muneebkhan85@users.noreply.github.com>

[MLIR] Add continuous tiling to transform dialect (#82792)

This patch enables continuous tiling of a target structured op using
diminishing tile sizes. In cases where the tensor dimensions are not

[MLIR] Add continuous tiling to transform dialect (#82792)

This patch enables continuous tiling of a target structured op using
diminishing tile sizes. In cases where the tensor dimensions are not
exactly divisible by the tile size, we are left with leftover tensor
chunks that are irregularly tiled. This approach enables tiling of the
leftover chunk with a smaller tile size and repeats this process
recursively using exponentially diminishing tile sizes. This eventually
generates a chain of loops that apply tiling using diminishing tile
sizes.

Adds `continuous_tile_sizes` op to the transform dialect. This op, when
given a tile size and a dimension, computes a series of diminishing tile
sizes that can be used to tile the target along the given dimension.
Additionally, this op also generates a series of chunk sizes that the
corresponding tile sizes should be applied to along the given dimension.

Adds `multiway` attribute to `transform.structured.split` that enables
multiway splitting of a single target op along the given dimension, as
specified in a list enumerating the chunk sizes.

show more ...


# 2c1ae801 19-Jun-2024 donald chen <chenxunyu1993@gmail.com>

[mlir][side effect] refactor(*): Include more precise side effects (#94213)

This patch adds more precise side effects to the current ops with memory
effects, allowing us to determine which OpOperan

[mlir][side effect] refactor(*): Include more precise side effects (#94213)

This patch adds more precise side effects to the current ops with memory
effects, allowing us to determine which OpOperand/OpResult/BlockArgument
the
operation reads or writes, rather than just recording the reading and
writing
of values. This allows for convenient use of precise side effects to
achieve
analysis and optimization.

Related discussions:
https://discourse.llvm.org/t/rfc-add-operandindex-to-sideeffect-instance/79243

show more ...


Revision tags: llvmorg-18.1.8
# d462bf68 14-Jun-2024 Rolf Morel <rolf.morel@huawei.com>

[mlir][Transform] Extend transform.foreach to take multiple arguments (#93705)

Changes transform.foreach's interface to take multiple arguments, e.g.
transform.foreach %ops1, %ops2, %params : ... {

[mlir][Transform] Extend transform.foreach to take multiple arguments (#93705)

Changes transform.foreach's interface to take multiple arguments, e.g.
transform.foreach %ops1, %ops2, %params : ... { ^bb0(%op1, %op2,
%param): BODY } The semantics are that the payloads for these handles
get iterated over as if the payloads have been zipped-up together - BODY
gets executed once for each such tuple. The documentation explains that
this implementation requires that the payloads have the same length.

This change also enables the target argument(s) to be any op/value/param
handle.

The added test cases demonstrate some use cases for this change.

show more ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6
# 4527adc5 15-May-2024 Daniel Kuts <kutz@ispras.ru>

Fix null pointer dereference in logging in mlir TransformOps (#92237)

A variable `typeConverterOp` may be nullptr after dynamic cast. There is
a security guard for this, but during logging error me

Fix null pointer dereference in logging in mlir TransformOps (#92237)

A variable `typeConverterOp` may be nullptr after dynamic cast. There is
a security guard for this, but during logging error message the variable
getting dereferenced.
Found with static analysis.

show more ...


# e4b04b39 03-May-2024 Oleksandr "Alex" Zinenko <git@ozinenko.com>

[mlir] make transform.foreach_match forward arguments (#89920)

It may be useful to have access to additional handles or parameters when
performing matches and actions in `foreach_match`, for exampl

[mlir] make transform.foreach_match forward arguments (#89920)

It may be useful to have access to additional handles or parameters when
performing matches and actions in `foreach_match`, for example, to
parameterize the matcher by rank or restrict it in a non-trivial way.
Enable `foreach_match` to forward additional handles from operands to
matcher symbols and from action symbols to results.

show more ...


Revision tags: llvmorg-18.1.5
# a5757c5b 19-Apr-2024 Christian Sigg <chsigg@users.noreply.github.com>

Switch member calls to `isa/dyn_cast/cast/...` to free function calls. (#89356)

This change cleans up call sites. Next step is to mark the member
functions deprecated.

See https://mlir.llvm.org/

Switch member calls to `isa/dyn_cast/cast/...` to free function calls. (#89356)

This change cleans up call sites. Next step is to mark the member
functions deprecated.

See https://mlir.llvm.org/deprecation and
https://discourse.llvm.org/t/preferred-casting-style-going-forward.

show more ...


# 37b26bf4 17-Apr-2024 Oleksandr "Alex" Zinenko <zinenko@google.com>

[mlir] transform.apply_patterns support more config options (#88484)

Greedy rewrite driver has options to control the number of rewrites
applies. Expose those via the corresponding transform op.


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3
# a8cfa7cb 01-Apr-2024 Jakub Kuderski <jakub@nod-labs.com>

[mlir][TD] Allow op printing flags as `transform.print` attrs (#86846)

Introduce 3 new optional attributes to the `transform.print` ops:
* `assume_verified`
* `use_local_scope`
* `skip_regions`

[mlir][TD] Allow op printing flags as `transform.print` attrs (#86846)

Introduce 3 new optional attributes to the `transform.print` ops:
* `assume_verified`
* `use_local_scope`
* `skip_regions`

The primary motivation is to allow printing on large inputs that
otherwise take forever to print and verify. For the full context, see
this IREE issue: https://github.com/openxla/iree/issues/16901.

Also add some tests and fix the op description.

show more ...


# 971b8525 01-Apr-2024 Jakub Kuderski <jakub@nod-labs.com>

[mlir][NFC] Simplify type checks with isa predicates (#87183)

For more context on isa predicates, see:
https://github.com/llvm/llvm-project/pull/83753.


# 0b790572 28-Mar-2024 Oleksandr "Alex" Zinenko <zinenko@google.com>

[mlir] propagate silenceable failures in transform.foreach_match (#86956)

The original implementation was eagerly reporting silenceable failures
from actions as definite failures. Since silenceable

[mlir] propagate silenceable failures in transform.foreach_match (#86956)

The original implementation was eagerly reporting silenceable failures
from actions as definite failures. Since silenceable failures are
intended for cases when the IR has not been irreversibly modified, it's
okay to propagate them as silenceable failures of the parent op.

Fixes #86834.

show more ...


# 91856b34 28-Mar-2024 Oleksandr "Alex" Zinenko <zinenko@google.com>

[mlir] move MatchOpInterface under Transform/Interfaces (#86899)

This is similar to the TransformOpInterface move.


# fa1b807b 27-Mar-2024 Oleksandr "Alex" Zinenko <zinenko@google.com>

[mlir] fix crash in transform.print verification (#86679)

Transform op trait verification calls `getEffects`, and since trait
verification runs before op verification, this call cannot assume the o

[mlir] fix crash in transform.print verification (#86679)

Transform op trait verification calls `getEffects`, and since trait
verification runs before op verification, this call cannot assume the op
to be valid. However, the operand getters now return a `TypedValue` that
unconditionally casts the value to the expected type, leading to an
assertion failure. Use the untyped mechanism instead.

Fixes #84701.

show more ...


# 5a9bdd85 20-Mar-2024 Oleksandr "Alex" Zinenko <zinenko@google.com>

[mlir] split transform interfaces into a separate library (#85221)

Transform interfaces are implemented, direction or via extensions, in
libraries belonging to multiple other dialects. Those dialec

[mlir] split transform interfaces into a separate library (#85221)

Transform interfaces are implemented, direction or via extensions, in
libraries belonging to multiple other dialects. Those dialects don't
need to depend on the non-interface part of the transform dialect, which
includes the growing number of ops and transitive dependency footprint.

Split out the interfaces into a separate library. This in turn requires
flipping the dependency from the interface on the dialect that has crept
in because both co-existed in one library. The interface shouldn't
depend on the transform dialect either.

As a consequence of splitting, the capability of the interpreter to
automatically walk the payload IR to identify payload ops of a certain
kind based on the type used for the entry point symbol argument is
disabled. This is a good move by itself as it simplifies the interpreter
logic. This functionality can be trivially replaced by a
`transform.structured.match` operation.

show more ...


Revision tags: llvmorg-18.1.2
# c1029b6a 10-Mar-2024 Matthias Springer <me@m-sp.org>

[mlir][Transform] `apply_conversion_patterns`: Update handles (#83950)

Until now, `transform.apply_conversion_patterns` consumed the target
handle and potentially invalidated handles. This commit a

[mlir][Transform] `apply_conversion_patterns`: Update handles (#83950)

Until now, `transform.apply_conversion_patterns` consumed the target
handle and potentially invalidated handles. This commit adds tracking
functionality similar to `transform.apply_patterns`, such that handles
are no longer invalidated, but updated based on op replacements
performed by the dialect conversion.

This new functionality is hidden behind a `preserve_handles` attribute
for now.

show more ...


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4
# 1ddc5413 20-Oct-2023 Mehdi Amini <joker.eph@gmail.com>

Apply clang-tidy fixes for readability-simplify-boolean-expr in TransformOps.cpp (NFC)


# 70ebc78e 20-Oct-2023 Mehdi Amini <joker.eph@gmail.com>

Apply clang-tidy fixes for performance-unnecessary-value-param in TransformOps.cpp (NFC)


# 153661db 20-Oct-2023 Mehdi Amini <joker.eph@gmail.com>

Apply clang-tidy fixes for llvm-qualified-auto in TransformOps.cpp (NFC)


# 42b16035 19-Jan-2024 Quinn Dawkins <quinn.dawkins@gmail.com>

[mlir][transform] Add an op for replacing values with function calls (#78398)

Adds `transform.func.cast_and_call` that takes a set of inputs and
outputs and replaces the uses of those outputs with

[mlir][transform] Add an op for replacing values with function calls (#78398)

Adds `transform.func.cast_and_call` that takes a set of inputs and
outputs and replaces the uses of those outputs with a call to a function
at a specified insertion point.

The idea with this operation is to allow users to author independent IR
outside of a to-be-compiled module, and then match and replace a slice
of the program with a call to the external function.

Additionally adds a mechanism for populating a type converter with a set
of conversion materialization functions that allow insertion of
casts on the inputs/outputs to and from the types of the function
signature.

show more ...


# 5caab8bb 18-Jan-2024 Quinn Dawkins <quinn.dawkins@gmail.com>

[mlir][transform] Add transform.get_operand op (#78397)

Similar to `transform.get_result`, except it returns a handle to the
operand indicated by a positional specification, same as is defined for

[mlir][transform] Add transform.get_operand op (#78397)

Similar to `transform.get_result`, except it returns a handle to the
operand indicated by a positional specification, same as is defined for
the linalg match ops.

Additionally updates `get_result` to take the same positional specification.
This makes the use case of wanting to get all of the results of an
operation easier by no longer requiring the user to reconstruct the list
of results one-by-one.

show more ...


1234567