| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
PiperOrigin-RevId: 286906740
|
|
|
|
|
|
|
| |
Closes tensorflow/mlir#261
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/261 from nmostafa:nmostafa/unranked 96b6e918f6ed64496f7573b2db33c0b02658ca45
PiperOrigin-RevId: 284037040
|
|
|
|
|
|
| |
Closes tensorflow/mlir#177
PiperOrigin-RevId: 275692653
|
|
|
|
|
|
|
|
|
| |
See RFC: https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/xE2IzfhE3Wg.
Opaque location stores two pointers, one of them points to some data structure that is external to MLIR, and the other one is unique for each type and represents type id of that data structure. OpaqueLoc also stores an optional location that can be used if the first one is not suitable.
OpaqueLoc is managed similar to FileLineColLoc. It is passed around by MLIR transformations and can be used in compound locations like CallSiteLoc.
PiperOrigin-RevId: 273266510
|
|
|
|
| |
PiperOrigin-RevId: 272851237
|
|
|
|
|
|
| |
Most dialects are initialized statically, which does not have a guaranteed initialization order. By keeping the dialect list sorted, we can guarantee a deterministic iteration order of dialects.
PiperOrigin-RevId: 264522875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tensorflow/mlir#58 fixed and exercised
verification of load/store ops using empty affine maps. Unfortunately,
it didn't exercise the creation of them. This PR addresses that aspect.
It removes the assumption of AffineMap having at least one result and
stores a pointer to MLIRContext as member of AffineMap.
* Add empty map support to affine.store + test
* Move MLIRContext to AffineMapStorage
Closes tensorflow/mlir#74
PiperOrigin-RevId: 264416260
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
affine.load/affine.store/std.load/std.store
Verification complained when using zero-dimensional memrefs in
affine.load, affine.store, std.load and std.store. This PR extends
verification so that those memrefs can be used.
Closes tensorflow/mlir#58
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/58 from dcaballe:dcaballe/zero-dim 49bcdcd45c52c48beca776431328e5ce551dfa9e
PiperOrigin-RevId: 262164916
|
|
|
|
|
|
| |
This is fixing the build of MLIR on MacOS when built within TensorFlow
PiperOrigin-RevId: 261223250
|
|
|
|
|
|
| |
This allows for the attribute to hold symbolic references to other operations than FuncOp. This also allows for removing the dependence on FuncOp from the base Builder.
PiperOrigin-RevId: 257650017
|
|
|
|
|
|
| |
This allows for removing the last direct reference to FuncOp from ModuleOp.
PiperOrigin-RevId: 257498296
|
|
|
|
|
|
|
|
| |
into the mlir namespace.
Now that Locations are attributes, they have direct access to the MLIR context. This allows for simplifying error emission by removing unnecessary context lookups.
PiperOrigin-RevId: 255112791
|
|
|
|
| |
PiperOrigin-RevId: 255078768
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ModuleOp contains a single region that must contain a single block. This block must be terminated by a new pseudo operation 'module_terminator'. The syntax for this operations is as follows:
`module` (`attributes` attr-dict)? region
Example:
module {
...
}
module attributes { ... } {
...
}
PiperOrigin-RevId: 254513752
|
|
|
|
|
|
| |
This will allow for locations to be used in the same contexts as attributes. Given that attributes are nullable types, the 'Location' class now represents a non-nullable wrapper around a 'LocationAttr'. This preserves the desired semantics we have for non-optional locations.
PiperOrigin-RevId: 254505278
|
|
|
|
|
|
| |
types(I1/I16/I32/etc.) when creating the MLIRContext. This allows for these symbols to be accessed without the need to perform any lookups/locking.
PiperOrigin-RevId: 254410080
|
|
|
|
|
|
| |
Identifier already contains all of the necessary functionality/verification, so having a separate class for filenames is unnecessary.
PiperOrigin-RevId: 253855505
|
|
|
|
|
|
| |
being a separate Attribute type. DenseElementsAttr provides a better internal representation for splat values as well as better API for accessing elements.
PiperOrigin-RevId: 253138287
|
|
|
|
|
|
| |
DenseFPElementsAttr in favor of just one DenseElementsAttr. Now that attribute has the ability to define 'classof(Attribute attr)' methods, these derived classes can just be specializations of the main attribute class.
PiperOrigin-RevId: 251948820
|
|
|
|
| |
PiperOrigin-RevId: 251712106
|
|
|
|
|
|
| |
functionality of 'Function', but with an operation. The pretty syntax for the operation is exactly the same as that of Function. This operation is currently builtin, but should hopefully be moved to a different dialect when it has been completely decoupled from IR/. This is the first patch in a large series that refactors Functions to be represented as operations.
PiperOrigin-RevId: 251281612
|
|
|
|
|
|
|
|
|
|
|
| |
attribute, DictionaryAttr. This attribute maintains a sorted list of NamedAttributes. This will allow for operations/functions to maintain sub dictionaries of attributes.
The syntax is the same as top level attribute dictionaries:
{sub_dictionary: {fn: @someFn, boolAttr: true}}
--
PiperOrigin-RevId: 250898950
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250572818
|
|
|
|
|
|
|
|
| |
dialect reference.
--
PiperOrigin-RevId: 249467245
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MLIRContext does not have to be aware of the SDBM unique data structures
directly. Move the SDBM storage uniquer from MLIRContext to the SDBM dialect
instance. Expressions that previously required a context to be constructed now
require an instance of the dialect in order to access the uniquer. While they
could look up the dialect in the context, it would have introduced a rather
expensive lookup into each construction. Instead, the caller is expected to
obtain the dialect instance and cache it.
--
PiperOrigin-RevId: 249245199
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SDBM expressions are designed as components of an attribute, similarly to
affine expressions. As such, they need to be unique'd in the MLIRContext.
When SDBM expressions were implemented, uniqu'ing objects in a context required
to modify MLIRContext implementation. This is no longer the case as generic
StorageUniquer has been introduced. Port the SDBMExpr uniqu'ing to use a newly
introduced uniquer and remove SDBM construction from MLIRContext.cpp.
--
PiperOrigin-RevId: 249244739
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Affine expressions are designed as components of an attribute and are unique'd
in the MLIRContext. When affine expressions were implemented, uniqu'ing
objects in a context required to modify MLIRContext implementation. This is no
longer the case as generic StorageUniquer has been introduced. Port the
AffineExpr construction to use the new infrastructure by introducing an
affineUniquer into the MLIRContext.
--
PiperOrigin-RevId: 249207539
|
|
|
|
|
|
|
|
|
|
|
|
| |
adds support for a pretty syntax for dialects attributes that is synonymous with the pretty syntax for dialect types. This cl also adds a new attribute 'OpaqueAttr' that allows for roundtripping attributes attached to unregistered dialects.
Dialect attributes have the following syntax:
dialect-attribute ::= `#` dialect-namespace `<` `"` attr-data `"` `>`
dialect-attribute ::= `#` alias-name pretty-dialect-sym-body?
--
PiperOrigin-RevId: 248344416
|
|
|
|
|
|
|
|
| |
the awkward use of CallSiteLoc as a variable usage location.
--
PiperOrigin-RevId: 248014642
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 247979132
|
|
|
|
|
|
|
|
| |
has been removed. The dependency was on the op casting methods, which have now moved out of Operation, used by the walker.
--
PiperOrigin-RevId: 247944666
|
|
|
|
|
|
|
|
| |
the final steps towards allowing dialects to define their own attributes, but there are still several things missing before this is fully supported(e.g. parsing/printing ).
--
PiperOrigin-RevId: 247684322
|
|
|
|
|
|
|
|
| |
identifiers for class types. This replaces the duplicated functionality of AnalysisID/PassID/etc.
--
PiperOrigin-RevId: 247237835
|
|
|
|
|
|
|
|
|
|
| |
and, transitively, access to the context.
This also fixes a bug where FunctionAttrs were not being remapped for function and function argument attributes.
--
PiperOrigin-RevId: 246876924
|
|
|
|
|
|
|
|
| |
optional. This allows for the ability to exclusively use the new diagnostic interface without breaking all of the existing usages. Several diagnostics emitted in lib/IR have been updated to make use of this functionality.
--
PiperOrigin-RevId: 246546044
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 246546015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InFlightDiagnostic.
The Diagnostic class contains all of the information necessary to report a diagnostic to the DiagnosticEngine. It should generally not be constructed directly, and instead used transitively via InFlightDiagnostic. A diagnostic is currently comprised of several different elements:
* A severity level.
* A source Location.
* A list of DiagnosticArguments that help compose and comprise the output message.
* A DiagnosticArgument represents any value that may be part of the diagnostic, e.g. string, integer, Type, Attribute, etc.
* Arguments can be added to the diagnostic via the stream(<<) operator.
* (In a future cl) A list of attached notes.
* These are in the form of other diagnostics that provide supplemental information to the main diagnostic, but do not have context on their own.
The InFlightDiagnostic class represents an RAII wrapper around a Diagnostic that is set to be reported with the diagnostic engine. This allows for the user to modify a diagnostic that is inflight. The internally wrapped diagnostic can be reported directly or automatically upon destruction.
These classes allow for more natural composition of diagnostics by removing the restriction that the message of a diagnostic is comprised of a single Twine. They should also allow for nice incremental improvements to the diagnostics experience in the future, e.g. formatv style diagnostics.
Simple Example:
emitError(loc, "integer bitwidth is limited to " + Twine(IntegerType::kMaxWidth) + " bits");
emitError(loc) << "integer bitwidth is limited to " << IntegerType::kMaxWidth << " bits";
--
PiperOrigin-RevId: 246526439
|
|
|
|
|
|
|
|
| |
functionality needed to separate notes from remarks. It also provides a starting point to start building out better remark infrastructure.
--
PiperOrigin-RevId: 246175216
|
|
|
|
|
|
|
|
| |
'DiagnosticEngine' and move the diagnostic handler support and final diagnostic emission from the MLIRContext to it.
--
PiperOrigin-RevId: 246163897
|
|
|
|
|
|
|
|
| |
coded in the MLIRContext. This allows for attributes to be uniqued similarly to types. This is the second step towards allowing dialects to define attributes.
--
PiperOrigin-RevId: 245974705
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 245844236
|
|
|
|
|
|
|
|
|
|
| |
none-type ::= `none`
The `none` type is a unit type, i.e. a type with exactly one possible value, where its value does not have a defined dynamic representation.
--
PiperOrigin-RevId: 245599248
|
|
|
|
|
|
|
|
|
|
|
| |
Striped difference-bound matrix expressions are a subset of affine expressions
supporting low-complexity algorithms that can be useful for loop
transformations. This introduces the basic data data structures for building
such expressions and unique'ing them in a MLIRContext.
--
PiperOrigin-RevId: 245380206
|
|
|
|
|
|
|
|
| |
TypeUniquer into its own class 'StorageUniquer'. This is the first step in supporting dialect extensible attributes.
--
PiperOrigin-RevId: 245358744
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A unit attribute is an attribute that represents a value of `unit` type. The
`unit` type allows only one value forming a singleton set. This attribute value
is used to represent attributes that only have meaning from their existence.
One example of such an attribute could be the `swift.self` attribute. This attribute indicates that a function parameter is the self/context
parameter. It could be represented as a boolean attribute(true or false), but a
value of false doesn't really bring any value. The parameter either is the
self/context or it isn't.
```mlir {.mlir}
// A unit attribute defined with the `unit` value specifier.
func @verbose_form(i1 {unitAttr : unit})
// A unit attribute can also be defined without the `unit` value specifier.
func @simple_form(i1 {unitAttr})
```
--
PiperOrigin-RevId: 245254045
|
|
|
|
|
|
|
|
|
|
| |
Extract common code from getAffineSymbolExpr and getAffineConstantExpr into a
utility function safeGetOrCreate, similarly to the existing overloads for sets
and maps. The position in the vector is used as indexing key. NFC.
--
PiperOrigin-RevId: 244820859
|
|
|
|
|
|
|
|
|
|
| |
Fixes test in opt mode.
Closes: tensorflow/mlir#17.
--
PiperOrigin-RevId: 243711043
|
|
|
|
|
|
|
|
|
| |
This addresses the "suggest parentheses around ‘&&’ within ‘||’
[-Wparentheses]" compiler warnings.
--
PiperOrigin-RevId: 242868670
|
|
|
|
|
|
|
|
| |
FunctionAttr::dropFunctionReference.
--
PiperOrigin-RevId: 242050934
|
|
|
|
|
|
|
|
|
| |
This came up in a review of the tutorial, it was suggested that "opaque" is more
descriptive than "unknown" here.
--
PiperOrigin-RevId: 241832927
|