summaryrefslogtreecommitdiffstats
path: root/mlir
Commit message (Collapse)AuthorAgeFilesLines
...
* NFC: Move the Function/Module/Operation::verify methods out-of-line.River Riddle2019-07-0219-63/+103
| | | | | | As Functions/Modules becomes operations, these methods will conflict with the 'verify' hook already on derived operation types. PiperOrigin-RevId: 256246112
* Add support for promoting Linalg views into new buffers.Nicolas Vasilache2019-07-025-40/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | This CL uses the generic CopyOp to promote a subview (constructed during tiling) into a new buffer + copy by: 1. Creating a new buffer for the subview. 2. Taking a view into the buffer and copying into it. 3. Adapting the linalg op to operating on the view from point 2. Tiling is extended with a boolean flag to enable promoting views (all or nothing for now). More specifically, the current implementation creates a buffer that is always of the full size of the ranges of the subview. This produces a buffer whose size may be bigger than the actual size of the `subView` at the boundaries and is related to the full/partial tile problem. In practice, we introduce a `buffer`, a `fullLocalView` and a `partialLocalView` such that: * `buffer` is always the size of the subview in the full tile case. * `fullLocalView` is a dense contiguous view into that buffer. * `partialLocalView` is a dense non-contiguous slice of `fullLocalView` that corresponds to the size of `subView` and accounting for boundary effects. The point of the full tile buffer is that constant static tile sizes are folded and result in a buffer type with statically known size and alignment properties. Padding is introduced on the boundary tiles with a `fill` op followed by a partial `copy` op. These behaviors will be refined later, on a per-need basis. PiperOrigin-RevId: 256237319
* Add support for SPIR-V Struct Types. Current support is limited toMahesh Ravishankar2019-07-029-95/+458
| | | | | | supporting only Offset decorations PiperOrigin-RevId: 256216704
* [spirv] Various small improvementsLei Zhang2019-07-025-21/+36
| | | | | | | | * Added comments * Improved op creation * Used LogicalResult where suitable PiperOrigin-RevId: 256203068
* NFC: Refactor Module to be value typed.River Riddle2019-07-0270-283/+373
| | | | | | As with Functions, Module will soon become an operation, which are value-typed. This eases the transition from Module to ModuleOp. A new class, OwningModuleRef is provided to allow for owning a reference to a Module, and will auto-delete the held module on destruction. PiperOrigin-RevId: 256196193
* docs: minor spelling tweaksBrett Koonce2019-07-029-12/+12
| | | | Close tensorflow/mlir#23
* Resolving buffer operand of linalg.view doesnt have the informationMahesh Ravishankar2019-07-028-48/+84
| | | | | | | | | | | about the buffer size. This is needed to resolve the operand correctly. Add that information to view op serialization/deserialization Also modify the parsing of buffer type by splitting at 'x' to side-step issues with StringRef number parsing. PiperOrigin-RevId: 256188319
* Update readme to reflect accepting contributions.Jacques Pienaar2019-07-021-3/+3
| | | | PiperOrigin-RevId: 256171145
* [ODS] NFC: Rename EnumAttr to StrEnumAttr to be consistent with IntEnumAttrLei Zhang2019-07-025-24/+22
| | | | PiperOrigin-RevId: 256169019
* [spirv] Use I32EnumAttr for enum attributesLei Zhang2019-07-0212-240/+324
| | | | | | | | | | | | This saves us the excessive string conversions and comparisons in verification and transformation and scopes them only to parsing and printing, which are meant for I/O so string conversions should be fine. In order to do this, changed the custom assembly format of spv.module regarding addressing model and memory model. PiperOrigin-RevId: 256149856
* NFC: Update the Operation 'walk' methods to use llvm::function_ref instead ↵River Riddle2019-07-029-15/+15
| | | | | | of std::function. PiperOrigin-RevId: 256099638
* NFC: Add several utilities to OpState.River Riddle2019-07-022-4/+29
| | | | | | | | | * 'walk' functionality. * Method to set the location. * 'dump'/'print' methods. * Method to set the attributes. PiperOrigin-RevId: 256097960
* EnumsGen: remove dangling assertionLei Zhang2019-07-021-1/+0
| | | | | | | | | StringAttr-backed enum attribute cases changed to allow explicit values, But this assertion was not deleted. Fixes https://github.com/tensorflow/mlir/issues/39 PiperOrigin-RevId: 256090793
* Update variable naming to match LLVM coding style.Jacques Pienaar2019-07-012-8/+8
| | | | | | | | Update to follow enumerators naming style https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly this also avoids the mach/boolean.h macros. PiperOrigin-RevId: 256069831
* gpu::LaunchOp: canonicalize away constant kernel argumentsAlex Zinenko2019-07-015-1/+101
| | | | | | | | | | | | | The GPU Launch operation may take constants as arguments, in particular affine-to-GPU mapping pass automatically forwards potentially constant lower bounds of loops into the kernel. Define a canonicalization pattern for LaunchOp that recreates the constants inside the kernel region instead of accepting them as kernel arguments. This is currently restricted to standard constants but may be extended to other constant operations. Also fix an off-by-one indexing bug in OperandStorage::eraseOperand. PiperOrigin-RevId: 256035437
* Generalize the CFG graph printing for Functions to work on Regions instead.River Riddle2019-07-018-71/+45
| | | | PiperOrigin-RevId: 256029944
* Standardize the definition and usage of getAllArgAttrs between FuncOp and ↵River Riddle2019-07-013-8/+8
| | | | | | Function. PiperOrigin-RevId: 255988352
* NFC: Refactor Function to be value typed.River Riddle2019-07-01103-874/+986
| | | | | | Move the data members out of Function and into a new impl storage class 'FunctionStorage'. This allows for Function to become value typed, which will greatly simplify the transition of Function to FuncOp(given that FuncOp is also value typed). PiperOrigin-RevId: 255983022
* Update the 1->N legalizer test to use "test.return" so that the conversion ↵River Riddle2019-07-011-7/+3
| | | | | | cast is elided properly. PiperOrigin-RevId: 255979732
* TypeConversion: do not materialize conversion of the type to itselfAlex Zinenko2019-07-012-0/+16
| | | | | | | | | | Type conversion does not necessarily affect all types, some of them may remain untouched. The type conversion tool from the dialect conversion framework will unconditionally insert a temporary cast operation from the type to itself anyway, and will try to materialize it to a real conversion operation if there are remaining uses. Simply use the original value instead. PiperOrigin-RevId: 255975450
* Run FileCheck on test-legalizer.mlirAlex Zinenko2019-07-011-2/+6
| | | | | | | | The RUN line was missing a call to FileCheck making the test always pass. Add the call to FileCheck and temporarily disable one of the tests that does not produce the expected result. PiperOrigin-RevId: 255974805
* Add affine-to-standard lowerings for affine.load/store/dma_start/dma_wait.Andy Davis2019-07-012-1/+192
| | | | PiperOrigin-RevId: 255960171
* Also disable generating underlying value to symbol conversion declaration ↵Lei Zhang2019-07-011-3/+7
| | | | | | when there is an enumerant without explicit value PiperOrigin-RevId: 255950779
* Avoid generating underlying value to symbol conversion function if there is ↵Lei Zhang2019-07-011-0/+7
| | | | | | an enumerant without explicit value. PiperOrigin-RevId: 255945801
* [ODS] Introduce IntEnumAttrLei Zhang2019-07-0112-174/+383
| | | | | | | | | | | | | | | | | | | In ODS, right now we use StringAttrs to emulate enum attributes. It is suboptimal if the op actually can and wants to store the enum as a single integer value; we are paying extra cost on storing and comparing the attribute value. This CL introduces a new enum attribute subclass that are backed by IntegerAttr. The downside with IntegerAttr-backed enum attributes is that the assembly form now uses integer values, which is less obvious than the StringAttr-backed ones. However, that can be remedied by defining custom assembly form with the help of the conversion utility functions generated via EnumsGen. Choices are given to the dialect writers to decide which one to use for their enum attributes. PiperOrigin-RevId: 255935542
* Add a folder-based EDSC intrinsics constructor (NFC)Nicolas Vasilache2019-07-016-9/+64
| | | | PiperOrigin-RevId: 255908660
* Expose AffineToGPUPass for use with PassManagerAlex Zinenko2019-07-012-4/+56
| | | | | | | | Originally, AffineToGPUPass was created and registered in the source file mainly for testing purposes. Provide a factory function that constructs AffineToGPU pass to make it usable in pass pipelines. PiperOrigin-RevId: 255902831
* Extract the automatic function renaming and symbol table out of Module.River Riddle2019-07-0110-47/+110
| | | | | | This functionality is now moved to a new class, ModuleManager. This class allows for inserting functions into a module, and will auto-rename them on insert to ensure a unique name. This now means that users adding new functions to a module must ensure that the function name is unique, as the Module will no longer do it automatically. This also means that Module::getNamedFunction now operates in O(N) instead of the O(c) time it did before. This simplifies the move of Modules to Operations as the ModuleOp will not be able to have this functionality. PiperOrigin-RevId: 255846088
* Move BufferAllocOp and BufferDeallocOp to ODSNicolas Vasilache2019-07-016-128/+129
| | | | | | This CL also fixes a parsing issue in the BufferType, adds LLVM lowering support for handling the static constant buffer size and a roundtrip test. PiperOrigin-RevId: 255834356
* Update link to presentationjpienaar2019-06-281-2/+1
|
* Internal changeJacques Pienaar2019-06-281-2/+1
| | | | PiperOrigin-RevId: 255700627
* Merge pull request tensorflow/mlir#36 from pkanwar23:patch-2A. Unique TensorFlower2019-06-281-2/+47
|\ | | | | | | PiperOrigin-RevId: 255694478
| * Update CONTRIBUTING.mdpkanwar232019-06-281-1/+1
| | | | | | Co-Authored-By: Mehdi Amini <joker.eph@gmail.com>
| * Update CONTRIBUTING.mdpkanwar232019-06-281-22/+1
| |
| * Update CONTRIBUTING.mdpkanwar232019-06-281-3/+5
| |
| * Update CONTRIBUTING.mdpkanwar232019-06-281-5/+5
| |
| * Update CONTRIBUTING.mdpkanwar232019-06-281-2/+66
| |
* | Add new operations affine.dma_start and affine.dma_wait which take affine ↵Andy Davis2019-06-283-6/+644
|/ | | | | | | | | maps for indexing memrefs by construction. These ops are analogues of the current standard ops dma_start/wait, with the exception that the memref operands are affine expressions of loop IVs and symbols (analogous to affine.load/store). The addition of these operations will enable changes to affine transformation and analysis passes which operate on memory dereferencing operations. PiperOrigin-RevId: 255658382
* [spirv] Move conversion passes to a new libraryLei Zhang2019-06-283-3/+18
| | | | PiperOrigin-RevId: 255648303
* Refactor DialectConversion to use 'materializeConversion' when a type ↵River Riddle2019-06-286-89/+91
| | | | | | | | conversion must persist after the conversion has finished. During conversion, if a type conversion has dangling uses a type conversion must persist after conversion has finished to maintain valid IR. In these cases, we now query the TypeConverter to materialize a conversion for us. This allows for the default case of a full conversion to continue working as expected, but also handle the degenerate cases more robustly. PiperOrigin-RevId: 255637171
* Add buffer size information to Linalg::BufferType. If the size isMahesh Ravishankar2019-06-286-52/+97
| | | | | | | | constant then it is represented as <size x elementType>. If the size is not a compile time constant, then it is represented as <? x elementType>. PiperOrigin-RevId: 255619400
* Respect the user provided type when parsing StringAttr.River Riddle2019-06-274-6/+29
| | | | PiperOrigin-RevId: 255532918
* Update cmake depedency.Jacques Pienaar2019-06-271-0/+1
| | | | PiperOrigin-RevId: 255532863
* Return an error when parseType doesnt parse the entire string passedMahesh Ravishankar2019-06-274-3/+23
| | | | PiperOrigin-RevId: 255505300
* Cleanup the 'clone' methods and remove the need to explicitly pass in the ↵River Riddle2019-06-277-29/+41
| | | | | | | | context. This also adds a new 'Region::cloneInto' method that accepts an insertion position. PiperOrigin-RevId: 255504640
* Parenthesize match expression to avoid operator precedence issuesMLIR Team2019-06-272-2/+2
| | | | PiperOrigin-RevId: 255435454
* Allow attaching a type to StringAttr.River Riddle2019-06-2710-11/+41
| | | | | | Some dialects allow for string types, and this allows for reusing StringAttr for constants of these types. PiperOrigin-RevId: 255413948
* Fix incorrect type used in forward declaration.Jacques Pienaar2019-06-271-1/+1
| | | | | | Addresses compiler warning. PiperOrigin-RevId: 255407691
* Support parsing MLIR source from stdin.MLIR Team2019-06-261-1/+1
| | | | PiperOrigin-RevId: 255316118
* Add a new AttributeElementIterator to DenseElementsAttr.River Riddle2019-06-263-35/+85
| | | | | | This allows for iterating over the internal elements via an iterator_range of Attribute, and also allows for removing the final SmallVectorImpl based 'getValues' method. PiperOrigin-RevId: 255309555
OpenPOWER on IntegriCloud