| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Region body constructors in EDSC now take a callback to the function that fills
in the body. This callback is called immediately and not stored, so it is
sufficient to pass a reference to it and avoid a potentially expensive copy.
--
PiperOrigin-RevId: 250473793
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The affine.for operation has restrictions that make it suitable for dependence analysis. The Linalg dialect aims at being more general.
This CL introduces linalg.for, and its associated terminator, along with a simple roundtripping test.
A `linalg.for` only takes one value of index type for lower bound, upper bound and step.
Example usage:
```
linalg.for %iv = %lb to %ub step %step {
... // body
}
```
--
PiperOrigin-RevId: 250369722
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250335025
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250311059
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250310618
|
|
|
|
|
|
|
|
| |
missing error for attribute aliases that contain '.' characters.
--
PiperOrigin-RevId: 250291646
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250282024
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix Block::splitBlock and Block::eraseFromFunction that erronously assume
blocks belong to functions. They now belong to regions. When splitting, new
blocks should be created in the same region as the existing block. When
erasing a block, it should be removed from the region rather than from the
function body that transitively contains the region.
Also rename Block::eraseFromFunction to Block::erase for consistency with other
IR containers.
--
PiperOrigin-RevId: 250278272
|
|
|
|
|
|
|
|
|
|
| |
The original implementation did not map the return value of the intrinsics
call to the result value of the special register op. Uses of the result
value hence hit a nullpointer.
--
PiperOrigin-RevId: 250255436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lowering from the Affine dialect to the Standard dialect was originally
implemented as a standalone pass. However, it may be used by other passes
willing to lower away some of the affine constructs as a part of their
operation. Decouple the transformation functions from the pass infrastructure
and expose the entry point for the lowering.
Also update the lowering functions to use `LogicalResult` instead of bool for
return values.
--
PiperOrigin-RevId: 250229198
|
|
|
|
|
|
|
|
| |
Make the correspondence between the ODS and C++ side clearer.
--
PiperOrigin-RevId: 250211194
|
|
|
|
|
|
|
|
| |
Verify pattern specification, added benefit, named pattern and location recording using TestDialect. Naming is verified via explicitly adding named pattern to TestPatternDriver pass. Refactoring test to verify the desired functionality rather than generated code.
--
PiperOrigin-RevId: 250205618
|
|
|
|
|
|
|
|
|
|
| |
MLIR input.
Report errors using the file and line location using SourceMgr's diagnostic reporting. Reduce some horizontal white spacing too.
--
PiperOrigin-RevId: 250193646
|
|
|
|
|
|
|
|
| |
to allow reuse throughout the codebase.
--
PiperOrigin-RevId: 250160508
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250109802
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250085298
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250062529
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250049416
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL sets up the basic structure for a SPIR-V dialect: operation
definition specification, dialect registration, testing, etc.
A single op, FMul, is defined and tested to showcase.
The SPIR-V dialect aims to be a simple proxy for the SPIR-V binary format
to enable straightforward and lightweight conversion from/to the binary
format. Ops in this dialect should stay as the same semantic level and
try to be a mechanical mapping to the corresponding SPIR-V instructions;
but they can deviate representationally to allow using MLIR mechanisms.
--
PiperOrigin-RevId: 250040830
|
|
|
|
|
|
|
|
| |
match/rewrite methods with an instance of the source op instead of a raw Operation*.
--
PiperOrigin-RevId: 250003405
|
|
|
|
|
|
|
|
| |
This does tracks the location by recording all the ops in the source pattern and using the fused location for the transformed op. Track the locations via the rewrite state which is a bit heavy weight, in follow up to change to matchAndRewrite this will be addressed (and need for extra array go away).
--
PiperOrigin-RevId: 249986555
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249986537
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249986120
|
|
|
|
|
|
|
|
| |
that can be generated during a rewrite. This will enable analyses to start understanding the possible effects of applying a rewrite pattern.
--
PiperOrigin-RevId: 249936309
|
|
|
|
|
|
|
|
|
|
| |
const case.
Builders can be further refined but wanted to address bug where the result type was used beyond the first depth.
--
PiperOrigin-RevId: 249936004
|
|
|
|
|
|
|
|
| |
with ''.
--
PiperOrigin-RevId: 249935489
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249933184
|
|
|
|
|
|
|
|
| |
construction. This simplifies building the conversion pattern list from multiple sources.
--
PiperOrigin-RevId: 249930583
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249928980
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249928953
|
|
|
|
|
|
|
|
| |
Also removed a redundant check for rank after already checking for static shape (which implies rank)
--
PiperOrigin-RevId: 249927636
|
|
|
|
|
|
|
|
|
|
|
|
| |
its base classes.
Introduces a hasRank() method to make checking for rank a bit easier.
This is partially to make it easier to make MemRef subclass ShapedType
--
PiperOrigin-RevId: 249927442
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249916947
|
|
|
|
|
|
|
|
| |
This is useful for dialects that use tuples but only support a subset of types.
--
PiperOrigin-RevId: 249910133
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249901490
|
|
|
|
|
|
|
|
| |
operand->getType. This also simplifies some lingering usages of result->getType.
--
PiperOrigin-RevId: 249889174
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249887371
|
|
|
|
|
|
|
|
|
|
| |
*) Adds LoopFusionUtils which will expose a set of loop fusion utilities (e.g. dependence checks, fusion cost/storage reduction, loop fusion transformation) for use by loop fusion algorithms. Support for checking block-level fusion-preventing dependences is added in this CL (additional loop fusion utilities will be added in subsequent CLs).
*) Adds TestLoopFusion test pass for testing LoopFusionUtils at a fine granularity.
*) Adds unit test for testing dependence check for block-level fusion-preventing dependences.
--
PiperOrigin-RevId: 249861071
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249857277
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally, FunctionConverter::convertRegion in the DialectConversion framework
was implemented as a function template because it was creating a new region in
the parent object, which could have been an op or a function. Since
DialectConversion now operates in place, new region is no longer created so
there is no need for convertRegion to be aware of the parent, only of the error
reporting location.
--
PiperOrigin-RevId: 249826392
|
|
|
|
|
|
|
|
|
| |
These are translated to an llvm::ConstantDataArray on translation to llvm IR
proper.
--
PiperOrigin-RevId: 249813111
|
|
|
|
|
|
|
|
| |
operations that contain FunctionAttr. It is up to the users of operations to query the module for a specific function referenced by a FunctionAttr.
--
PiperOrigin-RevId: 249743109
|
|
|
|
|
|
|
|
| |
simplify saving and restoring the currently registered handler.
--
PiperOrigin-RevId: 249735912
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249734666
|
|
|
|
|
|
|
|
|
|
| |
This better matches other container types. Seems better to do that, even though tuples are a little different, since they don't have a single element type.
Also fixed its description to mention the element type.
--
PiperOrigin-RevId: 249730341
|
|
|
|
|
|
|
|
| |
'TestDialect' that allows for the use of FileCheck to test things that aren't currently used anywhere else in tree. As a first order, this should simplify the tests used for tablegen components revolving around operation constraints/patterns.
--
PiperOrigin-RevId: 249724328
|
|
|
|
|
|
|
|
| |
This emphasizes that it is potentially less constrained than you might desire (especially dialects will frequently not support all bit widths), and better matches the other type names, especially the container types.
--
PiperOrigin-RevId: 249718409
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL prepares for mixing lowering of tiled linalg operations to loops with load and store operations. In particular it is necessary to capture partial tile information in views. This CL makes slice ops during Linalg tiling properly stop at partial tile boundaries by implementing `min` with a `cmpi` and `select` over values of index type.
To be consistent with lowering to loops, the implementation of tiling also drops specifics of accessing values via ranges and instead uses ranges of the form
`[0, dim(view), 1]` for creating view slices. This simplifies the code for the implementation of tiling and utils.
This also allows removing restrictions around needing a View or SliceOp defined in the current function context (as well as all it RangeOps). The restriction removal is tested by making the dot test operate directly on views.
The above is still subject to folding of the linalg.dim operation left for a future CL.
At this time, mixing tiling and lowering to loops all the way to execution is not yet functional because affine.for does not allow arbitrarily defined values of index type as its operands.
The previously introduced linalg.range_intersection was not sufficient to capture the necessary information and still required dealing with max quantities.
A followup CL will remove linalg.range_intersection.
--
PiperOrigin-RevId: 249698823
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249697345
|
|
|
|
|
|
|
|
|
| |
attr. This supports both the SplatElementsAttr and DenseElementsAttr for both
float and integer inputs / outputs.
--
PiperOrigin-RevId: 249681056
|