| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
OpAsmPrinter (NFC)
PiperOrigin-RevId: 253674584
|
|
|
|
|
|
|
| |
This CL also updates to use containing region as a fallback way to find
context since functions will eventually become ops with regions.
PiperOrigin-RevId: 253627322
|
|
|
|
|
|
|
|
| |
Arguably, this function is only useful for transformations and should not
pollute the main IR. Also make sure it accepts a the resulting container
by-reference instead of returning it.
PiperOrigin-RevId: 253622981
|
|
|
|
|
|
|
|
| |
Block.h/cpp.
This doesn't change much but makes it easier to find.
PiperOrigin-RevId: 253423041
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a generic CopyOp to Linalg and its lowering to loops.
The CopyOp supports input and output permutation maps.
When combined with tiling and allocating a new local buffer, this should provide basic support for implementing simple memory transfers with coalescing.
At the moment, lowering copies to a library call is not supported.
PiperOrigin-RevId: 253250497
|
|
|
|
|
|
|
|
|
| |
This converts entire loops into threads/blocks. No check on the size of the
block or grid, or on the validity of parallelization is performed, it is under
the responsibility of the caller to strip-mine the loops and to perform the
dependence analysis before calling the conversion.
PiperOrigin-RevId: 253189268
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 253124057
|
|
|
|
|
|
| |
return ranges as opposed to filling a SmallVector. This is much more efficient for the general case and allows for avoiding constructing APInt/APFloat/Attribute when possible.
PiperOrigin-RevId: 253092550
|
|
|
|
|
|
|
|
|
| |
value. The syntax for this is the same as 0-D tensors:
dense<tensor<100x100x100xi32>, 10>
dense<tensor<1x1x1xi64>, -5>
PiperOrigin-RevId: 252907880
|
|
|
|
|
|
| |
llvm::maskTrailingOnes<char> runs into a static assertion on the type not being
unsigned. Use `unsigned char` instead of `char`.
PiperOrigin-RevId: 252827214
|
|
|
|
|
|
| |
construction. This essentially means that we always auto-detect splat data and only store the minimum amount of data necessary. Support for parsing dense splats, and removing SplatElementsAttr(now that it is redundant) will come in followup cls
PiperOrigin-RevId: 252720561
|
|
|
|
|
|
| |
list. This is useful for any operation that wants to print a set of types in the same format as a FunctionType/Operation signature.
PiperOrigin-RevId: 252647152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces the support for region-containing operations to the dialect
conversion framework in order to support the conversion of affine control-flow
operations into the standard control flow with branches. Regions that belong
to an operation are converted before the operation itself. The
DialectConversionPattern can therefore access the converted regions of the
original operation and process them further if necessary. In particular, the
conversion is allowed to move the blocks from the original region to other
regions and to split blocks into multiple blocks. All block manipulations must
be performed through the PatternRewriter to ensure they will be undone if the
conversion fails.
Port the pass converting from the affine dialect (loops and ifs with bodies as
regions) to the standard dialect (branch-based cfg) to use DialectConversion in
order to exercise this new functionality. The modification to the lowering
functions are minor and are focused on using the PatterRewriter instead of
directly modifying the IR.
PiperOrigin-RevId: 252625169
|
|
|
|
|
|
| |
bit write/read functions to static functions in Attributes.cpp.
PiperOrigin-RevId: 252094145
|
|
|
|
|
|
|
|
|
| |
character buffer. This made assumptions about how DenseElementsAttr structured its internal storage, which may change in the future. To replace the existing use cases, a few utility methods have been added:
* 'get' methods that allow constructing from an ArrayRef of integer or floating point values.
* A 'reshape' method to allow for changing the shape without changing the underlying data.
PiperOrigin-RevId: 252067898
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
8-bits. This removes the requirement that the underlying buffer be aligned to 64 bits which opens the door for several optimizations in the future, e.g. detecting splat.
PiperOrigin-RevId: 251944922
|
|
|
|
|
|
| |
all regions of a given operation are explicit capture only and will not reference values defined above the enclosing operation. This trait will be useful for applying some of the properties currently attached to Functions to operations, e.g. verifying dominance within a specific operation, enabling multi-threading of certain transformations between different instances, etc.
PiperOrigin-RevId: 251927466
|
|
|
|
| |
PiperOrigin-RevId: 251783931
|
|
|
|
|
|
| |
signature of the entry block.
PiperOrigin-RevId: 251759848
|
|
|
|
| |
PiperOrigin-RevId: 251712106
|
|
|
|
|
|
| |
operation after creating it. This can be used to remove operations that are likely to be trivially folded later. Note, these functions only fold operations if all of the folded results are existing values.
PiperOrigin-RevId: 251674299
|
|
|
|
|
|
|
| |
* Add a getCurrentLocation that returns the location directly.
* Add parseOperandList/parseTrailingOperandList overloads without the required operand count.
PiperOrigin-RevId: 251585488
|
|
|
|
|
|
| |
instead of a function.
PiperOrigin-RevId: 251563898
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument attributes is the same as Function:
func @foo(i1 {dialect.attr: 10 : i64})
func @foo(%arg0: i1 {dialect.attr: 10 : i64}) {
return
}
PiperOrigin-RevId: 251473338
|
|
|
|
| |
PiperOrigin-RevId: 251333376
|
|
|
|
| |
PiperOrigin-RevId: 251306752
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 251048081
|
|
|
|
|
|
|
|
| |
to missing include)
--
PiperOrigin-RevId: 251000296
|
|
|
|
|
|
|
|
| |
This is more consistent with standard containers.
--
PiperOrigin-RevId: 250985851
|
|
|
|
|
|
|
|
|
|
| |
We want to support 64-bit shapes (even when the compiler is on a 32-bit architecture). Using int64_t consistently allows us to sidestep the bugginess of unsigned arithmetic.
Still unsigned: kind, memory space, and bit width. The first two are basically enums. We could have a discussion about the last one, but it's basically just a very large enum as well and we're not doing any math on it, I think.
--
PiperOrigin-RevId: 250985791
|
|
|
|
|
|
|
|
| |
SourceMgrDiagnosticHandlers.
--
PiperOrigin-RevId: 250974331
|
|
|
|
|
|
|
|
|
|
|
| |
Extract common methods into ShapedType.
Simplify methods.
Remove some extraneous asserts.
Replace sentinel value with a helper method to check the same.
--
PiperOrigin-RevId: 250945261
|
|
|
|
|
|
|
|
|
|
|
|
| |
MemRefs have the same notion of shape, rank, and fixed element type. This allows us to reuse utilities based on shape for memref.
All dyn_cast and isa calls for ShapedType have been checked and either modified to explicitly check for vector or tensor, or confirmed to not depend on the result being a vector or tensor.
Discussion in https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/cHLoyfGu8y8
--
PiperOrigin-RevId: 250945184
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This better matches the other methods in ShapedType which only make sense for ranked types. There's now an explicit hasRank for checking the rank. Actual call sites rarely used the "-1" sentinel to combine checking for rankedness and checking that rank is a certain value. And in most cases they should actually be checking for rankedness at a higher level using type predicates. Using an explicit method is clearer than a sentinel anyway.
--
PiperOrigin-RevId: 250720853
|
|
|
|
|
|
|
|
|
|
| |
having non-scalar elements.
The current logic assumes that ShapedType indicates a vector or tensor, which will not be true soon when MemRef subclasses ShapedType
--
PiperOrigin-RevId: 250586364
|
|
|
|
|
|
|
|
|
|
| |
tensors.
This is in preparation for making MemRef a subclass of ShapedType, but also UnrankedTensor should already be excluded.
--
PiperOrigin-RevId: 250580197
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 250572818
|
|
|
|
|
|
|
|
| |
with usages of FunctionAttr.
--
PiperOrigin-RevId: 250555680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
with ''.
--
PiperOrigin-RevId: 249935489
|
|
|
|
|
|
| |
--
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
|
|
|
|
|
|
|
|
| |
This is useful for dialects that use tuples but only support a subset of types.
--
PiperOrigin-RevId: 249910133
|
|
|
|
|
|
|
|
| |
operand->getType. This also simplifies some lingering usages of result->getType.
--
PiperOrigin-RevId: 249889174
|