| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
simplify saving and restoring the currently registered handler.
--
PiperOrigin-RevId: 249735912
|
|
|
|
|
|
|
|
|
| |
attr. This supports both the SplatElementsAttr and DenseElementsAttr for both
float and integer inputs / outputs.
--
PiperOrigin-RevId: 249681056
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249604199
|
|
|
|
| |
PiperOrigin-RevId: 249550805
|
|
|
|
|
|
|
|
|
| |
attr. This supports both the SplatElementsAttr and DenseElementsAttr for both
float and integer inputs / outputs.
--
PiperOrigin-RevId: 249538085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of pointer. The one downside to this is that the function reference held by a FunctionAttr needs to be explicitly looked up from the parent module. This provides several benefits though:
* There is no longer a need to explicitly remap function attrs.
- This removes a potentially expensive call from the destructor of Function.
- This will enable some interprocedural transformations to now run intraprocedurally.
- This wasn't scalable and forces dialect defined attributes to override
a virtual function.
* Replacing a function is now a trivial operation.
* This is a necessary first step to representing functions as operations.
--
PiperOrigin-RevId: 249510802
|
|
|
|
|
|
|
|
|
|
|
|
| |
Region::getContainingOperation()/getContainingFunction() instead of asserting
This avoids crashing when trying to dump an operation nested in a region that isn't yet attached to an operation, which is quite useful when debugging.
This alone won't be enough to print an unlink Operation, it'll display `<<UNLINKED INSTRUCTION>>`.
--
PiperOrigin-RevId: 249496388
|
|
|
|
|
|
|
|
| |
dialect reference.
--
PiperOrigin-RevId: 249467245
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 249466645
|
|
|
|
|
|
|
|
| |
available in Diagnostics.h. This provides a common utility for deterministically handling diagnostics in a multi-threaded environment.
--
PiperOrigin-RevId: 249325937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
We now have sufficient extensibility in dialects to move attribute components
such as SDBM out of the core IR into a dedicated dialect and make them
optional. Introduce an SDBM dialect and move the code. This is a mostly
non-functional change.
--
PiperOrigin-RevId: 249244802
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
respective FunctionAttr.
--
PiperOrigin-RevId: 249137558
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 248987646
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 248968285
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 248967563
|
|
|
|
|
|
|
|
| |
a value within a single operation.
--
PiperOrigin-RevId: 248961779
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation makes some assumptions about what can be a shaped type, which aren't really necessary. It also has strange behavior for types that aren't in the limited set it handles (e.g. dialect-defined types)
Updated the comment to match the implementation.
This is partially motivated by the desire to make MemRef a subclass of ShapedType
--
PiperOrigin-RevId: 248859674
|
|
|
|
|
|
|
|
| |
instead of Pattern. This simplifies the infrastructure a bit by being able to reuse PatternRewriter and the RewritePatternMatcher, but also starts to lay the groundwork for a more generalized legalization framework that can operate on DialectOpConversions as well as normal RewritePatterns.
--
PiperOrigin-RevId: 248836492
|
|
|
|
|
|
|
|
| |
This is necessary for allowing more complicated rewrites in the future that may do things like update the insertion point (e.g. for rewrites involving regions).
--
PiperOrigin-RevId: 248803153
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 248797935
|
|
|
|
|
|
|
|
| |
This otherwise triggers "unused variable" errors in optimized build mode.
--
PiperOrigin-RevId: 248706350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide an "unsafe" version of the overloaded arithmetic operators for SDBM
expressions. These operators expect the operands to be of the right SDBM
expression subtype and assert if they are not. They also perform simple
folding operations as well as some semantically correct operations that
construct an SDBM expression of a different subtype, e.g., a difference
expression if the RHS of an operator+ is a negated variable. These operators
are scoped in a namespace to allow for a future "safe" version of the operators
that propagates null expressions to denote the error state when expressions
have wrong subtypes.
--
PiperOrigin-RevId: 248704153
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the storage class for striped difference-bound matrices (SDBM) as a
container with a difference bounds matrix and a list of stripe expressions. An
SDBM defines an integer set. Provide conversion mechanisms between lists of
SDBM expressions treated as equalities with zero or less-than-or-equal
inequalities with zero.
--
PiperOrigin-RevId: 248702871
|
|
|
|
|
|
|
|
|
|
| |
valid at runtime.
tensor<*xf32> could be a tensor<1xf32> at runtime but this verifyShapeMatch would return failure and say function is invalid.
--
PiperOrigin-RevId: 248583038
|
|
|
|
|
|
|
|
| |
'fold'. This new unified fold hook will take constant attributes as operands, and may return an existing 'Value *' or a constant 'Attribute' when folding. This removes the awkward situation where a simple canonicalization like "sub(x,x)->0" had to be written as a canonicalization pattern as opposed to a fold.
--
PiperOrigin-RevId: 248582024
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is in preparation for making it also support/be a parent class of MemRefType. MemRefs have similar shape/rank/element semantics and it would be useful to be able to use these same utilities for them.
This CL should not change any semantics and only change variables, types, string literals, and comments. In follow-up CLs I will prepare all callers to handle MemRef types or remove their dependence on ShapedType.
Discussion/Rationale in https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/cHLoyfGu8y8
--
PiperOrigin-RevId: 248476449
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
files. (NFC)
--
PiperOrigin-RevId: 248332674
|
|
|
|
|
|
|
|
|
|
| |
This CL gives a pattern-matching-y look and feel to AffineExpr.
For now this uses a shared_ptr instead of unique'ing into a bumpPtrAllocator.
SDBM gives a simple use case with more idiomatic syntax for matchers.
--
PiperOrigin-RevId: 248188075
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-whitespace if the column is unknown(zero). This also fixes a small bug with call stack printing.
Example:
/tmp/file_C.py:21:5: error: 'foo.bar' op attribute 'something'
raise app.UsageError('Too many command-line arguments.')
^
/tmp/file_D.py:20:3: note: called from
if len(argv) > 1:
^
/tmp/file_E.py:19:1: note: called from
def main(argv):
^
/tmp/file_F.py:24:3: note: called from
app.run(main)
^
--
PiperOrigin-RevId: 248151212
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stacks.
Example:
/tmp/file_C.py:17:1: error: 'foo.bar' op attribute 'something' ...
app.run(main)
^
/tmp/file_D.py:14:1: note: called from
raise app.UsageError('Too many command-line arguments.')
^
/tmp/file_E.py:12:1: note: called from
def main(argv):
^
/tmp/file_F.py:13:1: note: called from
if len(argv) > 1:
^
--
PiperOrigin-RevId: 248074804
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 248050178
|
|
|
|
|
|
|
|
| |
the awkward use of CallSiteLoc as a variable usage location.
--
PiperOrigin-RevId: 248014642
|
|
|
|
|
|
|
|
| |
enum to allow for dialects to define attribute kinds. The currently defined attributes kinds have now been moved to StandardAttributes.
--
PiperOrigin-RevId: 247988373
|
|
|
|
|
|
| |
--
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
|
|
|
|
|
|
|
|
| |
fields/methods to the .cpp file.
--
PiperOrigin-RevId: 247768443
|
|
|
|
|
|
|
|
| |
location/message/kind. This opens the door for many more powerful use cases: fixits, colors, etc.
--
PiperOrigin-RevId: 247705673
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
files seen in diagnostics.
--
PiperOrigin-RevId: 247681779
|
|
|
|
|
|
|
|
|
| |
The switch is supposed to be fully covered, but GCC warns that:
"control reaches end of non-void function"
--
PiperOrigin-RevId: 247672430
|
|
|
|
|
|
|
|
| |
FileLineColLoc.
--
PiperOrigin-RevId: 247662828
|
|
|
|
|
|
|
|
| |
the llvm::SourceMgr has no main file.
--
PiperOrigin-RevId: 247605584
|
|
|
|
|
|
|
|
| |
Fix clang warnings
--
PiperOrigin-RevId: 247556495
|
|
|
|
|
|
|
|
| |
a new llvm::SourceMgr diagnostic handler 'SourceMgrDiagnosticVerifierHandler'. This will allow for other tools to reuse the 'expected-*' functionality.
--
PiperOrigin-RevId: 247514684
|
|
|
|
|
|
|
|
| |
managers with multiple buffers.
--
PiperOrigin-RevId: 247482733
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 247472005
|