Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, 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, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# c60b897d 10-Jul-2022 River Riddle <[email protected]>

[mlir] Refactor the Parser library in preparation for an MLIR binary format

The current Parser library is solely focused on providing API for
the textual MLIR format, but MLIR will soon also provide

[mlir] Refactor the Parser library in preparation for an MLIR binary format

The current Parser library is solely focused on providing API for
the textual MLIR format, but MLIR will soon also provide a binary
format. This commit renames the current Parser library to AsmParser to
better correspond to what the library is actually intended for. A new
Parser library is added which will act as a unified parser interface
between both text and binary formats. Most parser clients are
unaffected, given that the unified interface is essentially the same as
the current interface. Only clients that rely on utilizing the
AsmParserState, or those that want to parse Attributes/Types need to be
updated to point to the AsmParser library.

Differential Revision: https://reviews.llvm.org/D129605

show more ...


# 333ee218 21-Jul-2022 Alex Zinenko <[email protected]>

[mlir] Transform dialect: separate dependent and generated dialects

In the Transform dialect extensions, provide the separate mechanism to
declare dependent dialects (the dialects the transform IR d

[mlir] Transform dialect: separate dependent and generated dialects

In the Transform dialect extensions, provide the separate mechanism to
declare dependent dialects (the dialects the transform IR depends on)
and the generated dialects (the dialects the payload IR may be
transformed into). This allows the Transform dialect clients that are
only constructing the transform IR to avoid loading the dialects
relevant for the payload IR along with the Transform dialect itself,
thus decreasing the build/link time.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D130289

show more ...


# 33c18fbc 23-Jul-2022 Kazu Hirata <[email protected]>

[mlir] Use value instead of getValue (NFC)


# 6fa6901b 23-Jul-2022 Kazu Hirata <[email protected]>

Use has_value instead of hasValue (NFC)


# 32c6e081 22-Jul-2022 Matthias Springer <[email protected]>

[mlir][linalg] Add attribute matcher to structured.match transform op

This is useful for building small test cases and will be utilized in a subsequent commit that adds a fusion example.

Differenti

[mlir][linalg] Add attribute matcher to structured.match transform op

This is useful for building small test cases and will be utilized in a subsequent commit that adds a fusion example.

Differential Revision: https://reviews.llvm.org/D130344

show more ...


# bc882ed2 22-Jul-2022 Matthias Springer <[email protected]>

[mlir][linalg][transform] Add fuse_into_containing op

This op fuses a given payload op into a given container op. Inside the container, all uses of the producer are replaced (fused) with the newly i

[mlir][linalg][transform] Add fuse_into_containing op

This op fuses a given payload op into a given container op. Inside the container, all uses of the producer are replaced (fused) with the newly inserted op. If the producer is tileable and accessed via a tensor.extract_slice, the new op computes only the requested slice ("tile and fuse"). Otherwise, the entire tensor value is computed inside the container ("clone and fuse").

Differential Revision: https://reviews.llvm.org/D130244

show more ...


# 297ba167 21-Jul-2022 Christopher Bate <[email protected]>

[mlir][linalg] Add tile_size option to `structured.tile_to_foreach_thread_op`

This change modifies `structured.tile_to_foreach_thread_op` so that
it accepts either `tile_sizes` or `num_threads` para

[mlir][linalg] Add tile_size option to `structured.tile_to_foreach_thread_op`

This change modifies `structured.tile_to_foreach_thread_op` so that
it accepts either `tile_sizes` or `num_threads` parameters. If
`tile_sizes` are specified, then the number of threads required is
derived the tile sizes rather than the other way around. In both cases,
more aggressive folding of loop parameters is enabled during the
transformation, allowing for the potential elimination of `affine.min`
and `affine.max` operations in the static shape case when calculating
the final adjusted tile size.

Differential Revision: https://reviews.llvm.org/D130139

show more ...


# 1f77f01c 21-Jul-2022 Nicolas Vasilache <[email protected]>

[mlir][Linalg] Add a Transform dialect NavigationOp op to match a list of ops or an interface.

This operation is a NavigationOp that simplifies the writing of transform IR.
Since there is no way of

[mlir][Linalg] Add a Transform dialect NavigationOp op to match a list of ops or an interface.

This operation is a NavigationOp that simplifies the writing of transform IR.
Since there is no way of refering to an interface by name, the current implementation uses
an EnumAttr and depends on the interfaces it supports.
In the future, it would be worthwhile to remove this dependence and generalize.

Differential Revision: https://reviews.llvm.org/D130267

show more ...


# 18b92c66 19-Jul-2022 Nicolas Vasilache <[email protected]>

[mlir][Linalg] Add a TileToForeachThread transform.

This revision adds a new transformation to tile a TilingInterface `op` to a tiled `scf.foreach_thread`, applying
tiling by `num_threads`.
If non-e

[mlir][Linalg] Add a TileToForeachThread transform.

This revision adds a new transformation to tile a TilingInterface `op` to a tiled `scf.foreach_thread`, applying
tiling by `num_threads`.
If non-empty, the `threadDimMapping` is added as an attribute to the resulting `scf.foreach_thread`.
0-tile sizes (i.e. tile by the full size of the data) are used to encode
that a dimension is not tiled.

Differential Revision: https://reviews.llvm.org/D129577

show more ...


# 1a5d0076 16-Jul-2022 Kazu Hirata <[email protected]>

Use has_value/value instead of hasValue/getValue (NFC)


# 5a001136 13-Jul-2022 Nicolas Vasilache <[email protected]>

[mlir][Linalg] Retire LinalgPromotion pattern

This revision removes the LinalgPromotion pattern and adds a `transform.structured.promotion` op.
Since the LinalgPromotion transform allows the injecti

[mlir][Linalg] Retire LinalgPromotion pattern

This revision removes the LinalgPromotion pattern and adds a `transform.structured.promotion` op.
Since the LinalgPromotion transform allows the injection of arbitrary C++ via lambdas, the current
transform op does not handle it.
It is left for future work to decide what the right transform op control is for those cases.

Note the underlying implementation remains unchanged and the mechanism is still controllable by
lambdas from the API.

During this refactoring it was also determined that the `dynamicBuffers` option does not actually
connect to a change of behavior in the algorithm.
This also exhibits that the related test is wrong (and dangerous).
Both the option and the test are therefore removed.

Lastly, a test that connects patterns using the filter-based mechanism is removed: all the independent
pieces are already tested separately.

Context: https://discourse.llvm.org/t/psa-retire-linalg-filter-based-patterns/63785

Differential Revision: https://reviews.llvm.org/D129649

show more ...


# a5c802a4 08-Jul-2022 Alex Zinenko <[email protected]>

[mlir] fold more eagerly in structured op splitting

Existing implementation of structured op splitting creates several
affine.apply and affine.min operations in its subshape computation.
As these sh

[mlir] fold more eagerly in structured op splitting

Existing implementation of structured op splitting creates several
affine.apply and affine.min operations in its subshape computation.
As these shapes are further used in data slice extraction, this may lead
to slice shapes being dynamic even when the original shapes and the
splitting point are static. This is particularly visible when splitting
is combined with further subsetting transformations such as tiling. Use
composition and folding more aggressively in splitting to avoid this.

In particular, introduce a `createComposedAffineMin` function that the
affine map used in "min" with the maps used by any `affine.apply` that
may be feeding the operands to the "min". This enables production of
more static shapes. Also introduce a `createComposedFoldedAffineApply`
function that combines the existing `createComposedAffineApply` with
in-place folding to propagate constants produced by zero-input affine
maps. Using these when splitting allows the subsequent canonicalizer
pass to recover static shapes for structured ops.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D129379

show more ...


# e15b855e 08-Jul-2022 Alex Zinenko <[email protected]>

[mlir] Use semantically readable functions for transform op effects

A recent commit introduced helper functions with semantically meaningful names
to populate the lists of memory effects in transfor

[mlir] Use semantically readable functions for transform op effects

A recent commit introduced helper functions with semantically meaningful names
to populate the lists of memory effects in transform ops, use them whenever
possible.

Depends On D129287

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D129365

show more ...


# 3963b4d0 07-Jul-2022 Alex Zinenko <[email protected]>

[mlir] Transform op for multitile size generation

Introduce a structured transform op that emits IR computing the multi-tile
sizes with requested parameters (target size and divisor) for the given
s

[mlir] Transform op for multitile size generation

Introduce a structured transform op that emits IR computing the multi-tile
sizes with requested parameters (target size and divisor) for the given
structured op. The sizes may fold to arithmetic constant operations when the
shape is constant. These operations may then be used to call the existing
tiling transformation with a single non-zero dynamic size (i.e. perform
strip-mining) for each of the dimensions separately, thus achieving multi-size
tiling with optional loop interchange. A separate test exercises the entire
script.

Depends On D129217

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D129287

show more ...


# 4e4a4c05 07-Jul-2022 Alex Zinenko <[email protected]>

[mlir] Allow Tile transform op to take dynamic sizes

Extend the definition of the Tile structured transform op to enable it
accepting handles to operations that produce tile sizes at runtime. This i

[mlir] Allow Tile transform op to take dynamic sizes

Extend the definition of the Tile structured transform op to enable it
accepting handles to operations that produce tile sizes at runtime. This is
useful by itself and prepares for more advanced tiling strategies. Note that
the changes are relevant only to the transform dialect, the tiling
transformation itself already supports dynamic sizes.

Depends On D129216

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D129217

show more ...


# 52307109 07-Jul-2022 Nicolas Vasilache <[email protected]>

[mlir][Transform] Make applyToOne return a DiagnosedSilenceableFailure

This revision revisits the implementation of applyToOne and its handling
of recoverable errors as well as propagation of null h

[mlir][Transform] Make applyToOne return a DiagnosedSilenceableFailure

This revision revisits the implementation of applyToOne and its handling
of recoverable errors as well as propagation of null handles.
The implementation is simplified to always require passing a vector<Operation*>
in which the results are returned, resulting in less template instantiation magic.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D129185

show more ...


# ff6e5508 07-Jul-2022 Alex Zinenko <[email protected]>

[mlir] Structured transforms: introduce op splitting

Introduce a new transformation on structured ops that splits the iteration
space into two parts along the specified dimension. The index at which

[mlir] Structured transforms: introduce op splitting

Introduce a new transformation on structured ops that splits the iteration
space into two parts along the specified dimension. The index at which the
splitting happens may be static or dynamic. This transformation can be seen as
a rudimentary form of index-set splitting that only supports the splitting
along hyperplanes parallel to the iteration space hyperplanes, and is therefore
decomposable into per-dimension application.

It is a key low-level transformation that enables independent scheduling for
different parts of the iteration space of the same op, which hasn't been
possible previously. It may be used to implement, e.g., multi-sized tiling. In
future, peeling can be implemented as a combination of split-off amount
computation and splitting.

The transformation is conceptually close to tiling in its separation of the
iteration and data spaces, but cannot be currently implemented on top of
TilingInterface as the latter does not properly support `linalg.index`
offsetting.

Note that the transformation intentionally bypasses folding of
`tensor.extract_slice` operations when creating them as this folding was found
to prevent repeated splitting of the same operation because due to internal
assumptions about extract/insert_slice combination in dialect utilities.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D129090

show more ...


# 178f9bd6 28-Jun-2022 Nicolas Vasilache <[email protected]>

[mlir][Linalg] Uniformize SplitReduction transforms and add option to use Bufferization::AllocTensor

This revision merges the 2 split_reduction transforms and adds extra control by using attributes.

[mlir][Linalg] Uniformize SplitReduction transforms and add option to use Bufferization::AllocTensor

This revision merges the 2 split_reduction transforms and adds extra control by using attributes.

SplitReduction is known to require a concrete additional buffer to store tempoaray information.
Add an option to introduce a `bufferization.alloc_tensor` instead of `linalg.init_tensor`.
This behaves better with subset-based tiling and bufferization.

Differential Revision: https://reviews.llvm.org/D128722

show more ...


Revision tags: llvmorg-14.0.6
# d5716395 21-Jun-2022 Nicolas Vasilache <[email protected]>

[mlir][Linalg] SplitReduction implementation without tensor::ExpandShapeOp

This revision proposes a different implementation of the SplitReductoin transformation that does
not rely on tensor::Expand

[mlir][Linalg] SplitReduction implementation without tensor::ExpandShapeOp

This revision proposes a different implementation of the SplitReductoin transformation that does
not rely on tensor::ExpandShapeOp.

Previously, a dimension `[k]` would be split into `[k][kk]` via an ExpandShapeOp.
Instead, this revision proposes to rewrite `[k]` into `[factor * k + kk]`.

There are different tradeoffs involved but the proposed implementation is more general because
the affine rewrite is well-defined. In particular, it works naturally with `?` parallel dimensions and
non-trivial indexing maps.

A further rewrite of `[factor * k + kk]` + ExpandShapeOp is possible as a followup.

Differential Revision: https://reviews.llvm.org/D128266

show more ...


# 74f06601 22-Jun-2022 Nicolas Vasilache <[email protected]>

[mlir][Transform] NFC - Pass TransformState as an argument to applyToOne methods

This will allow implementing state-dependent behavior in the future.

Differential Revision: https://reviews.llvm.org

[mlir][Transform] NFC - Pass TransformState as an argument to applyToOne methods

This will allow implementing state-dependent behavior in the future.

Differential Revision: https://reviews.llvm.org/D128327

show more ...


# f439b319 21-Jun-2022 Nicolas Vasilache <[email protected]>

[mlir][Linalg] Split reduction transform op

This revision separates the `LinalgSplitReduction` pattern, whose application is based on attributes,
from its implementation.
A transform dialect op exte

[mlir][Linalg] Split reduction transform op

This revision separates the `LinalgSplitReduction` pattern, whose application is based on attributes,
from its implementation.
A transform dialect op extension is added to control the application of the transformation at a finer granularity.

Differential Revision: https://reviews.llvm.org/D128165

show more ...


# 1d45282a 15-Jun-2022 Alex Zinenko <[email protected]>

[mlir] address post-commit review for D127724

- make transform.alternatives op apply only to isolated-from-above payload IR
scopes;
- fix potential leak;
- fix several typos.


# e3890b7f 14-Jun-2022 Alex Zinenko <[email protected]>

[mlir] Introduce transform.alternatives op

Introduce a transform dialect op that allows one to attempt different
transformation sequences on the same piece of payload IR until one of them
succeeds.

[mlir] Introduce transform.alternatives op

Introduce a transform dialect op that allows one to attempt different
transformation sequences on the same piece of payload IR until one of them
succeeds. This op fundamentally expands the scope of possibilities in the
transform dialect that, until now, could only propagate transformation failure,
at least using in-tree operations. This requires a more detailed specification
of the execution model for the transform dialect that now indicates how failure
is handled and propagated.

Transformations described by transform operations now have tri-state results,
with some errors being fundamentally irrecoverable (e.g., generating malformed
IR) and some others being recoverable by containing ops. Existing transform ops
directly implementing the `apply` interface method are updated to produce this
directly. Transform ops with the `TransformEachTransformOpTrait` are currently
considered to produce only irrecoverable failures and will be updated
separately.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D127724

show more ...


Revision tags: llvmorg-14.0.5
# b6c58ec4 09-Jun-2022 Alex Zinenko <[email protected]>

[mlir] add producer fusion to structured transform ops

This relies on the existing TileAndFuse pattern for tensor-based structured
ops. It complements pure tiling, from which some utilities are gene

[mlir] add producer fusion to structured transform ops

This relies on the existing TileAndFuse pattern for tensor-based structured
ops. It complements pure tiling, from which some utilities are generalized.

Depends On D127300

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D127319

show more ...


# 5f0d4f20 09-Jun-2022 Alex Zinenko <[email protected]>

[mlir] Introduce Transform ops for loops

Introduce transform ops for "for" loops, in particular for peeling, software
pipelining and unrolling, along with a couple of "IR navigation" ops. These ops

[mlir] Introduce Transform ops for loops

Introduce transform ops for "for" loops, in particular for peeling, software
pipelining and unrolling, along with a couple of "IR navigation" ops. These ops
are intended to be generalized to different kinds of loops when possible and
therefore use the "loop" prefix. They currently live in the SCF dialect as
there is no clear place to put transform ops that may span across several
dialects, this decision is postponed until the ops actually need to handle
non-SCF loops.

Additionally refactor some common utilities for transform ops into trait or
interface methods, and change the loop pipelining to be a returning pattern.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D127300

show more ...


12