summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/StandardOps/Ops.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for PatternRewriter::eraseOp.River Riddle2019-10-161-8/+6
| | | | | | This hook is useful when an operation is known to be dead, and no replacement values make sense. PiperOrigin-RevId: 275052756
* Add unary ops and ExpOp to Standard Dialect.Alexander Belyaev2019-10-111-2/+17
| | | | PiperOrigin-RevId: 274152154
* Allow dynamic but ranked types in ops with SameOperandsAndResultShape and ↵Smit Hinsu2019-10-081-18/+1
| | | | | | | | | | SameOperandsAndResultType traits Currently SameOperandsAndResultShape trait allows operands to have tensor<*xf32> and tensor<2xf32> but doesn't allow tensor<?xf32> and tensor<10xf32>. Also, use the updated shape compatibility helper function in TensorCastOp::areCastCompatible method. PiperOrigin-RevId: 273658336
* Fix typos, NFC.Christian Sigg2019-10-041-1/+1
| | | | PiperOrigin-RevId: 272851237
* Add fpext and fptrunc to the Standard dialect and includes conversion to LLVMMLIR Team2019-10-031-0/+22
| | | | PiperOrigin-RevId: 272768027
* NFC - clean up op accessor usage, std.load/store op verify, other stale infoUday Bondhugula2019-09-271-22/+4
| | | | | | | | | | | - also remove stale terminology/references in docs Signed-off-by: Uday Bondhugula <uday@polymagelabs.com> Closes tensorflow/mlir#148 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/148 from bondhugula:cleanup e846b641a3c2936e874138aff480a23cdbf66591 PiperOrigin-RevId: 271618279
* Introduce splat op + provide its LLVM loweringUday Bondhugula2019-09-241-8/+57
| | | | | | | | | | | | | | | - introduce splat op in standard dialect (currently for int/float/index input type, output type can be vector or statically shaped tensor) - implement LLVM lowering (when result type is 1-d vector) - add constant folding hook for it - while on Ops.cpp, fix some stale names Signed-off-by: Uday Bondhugula <uday@polymagelabs.com> Closes tensorflow/mlir#141 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/141 from bondhugula:splat 48976a6aa0a75be6d91187db6418de989e03eb51 PiperOrigin-RevId: 270965304
* Add integer sign- and zero-extension and truncation to standard.Manuel Freiberger2019-09-211-0/+67
| | | | | | | | | | | | This adds sign- and zero-extension and truncation of integer types to the standard dialects. This allows to perform integer type conversions without having to go to the LLVM dialect and introduce custom type casts (between standard and LLVM integer types). Closes tensorflow/mlir#134 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/134 from ombre5733:sext-zext-trunc-in-std c7657bc84c0ca66b304e53ec03797e09152e4d31 PiperOrigin-RevId: 270479722
* NFC: Pass OpAsmPrinter by reference instead of by pointer.River Riddle2019-09-201-142/+142
| | | | | | MLIR follows the LLVM style of pass-by-reference. PiperOrigin-RevId: 270401378
* NFC: Pass OperationState by reference instead of by pointer.River Riddle2019-09-201-110/+110
| | | | | | MLIR follows the LLVM convention of passing by reference instead of by pointer. PiperOrigin-RevId: 270396945
* NFC: Pass OpAsmParser by reference instead of by pointer.River Riddle2019-09-201-195/+192
| | | | | | MLIR follows the LLVM style of pass-by-reference. PiperOrigin-RevId: 270315612
* add missing memref cast fold pattern for dim opUday Bondhugula2019-09-131-0/+6
| | | | | | | | | | | | | | | - add missing canonicalization pattern to fold memref_cast + dim to dim (needed to propagate constant when folding a dynamic shape to a static one) - also fix an outdated/inconsistent comment in StandardOps/Ops.td Signed-off-by: Uday Bondhugula <uday@polymagelabs.com> Closes tensorflow/mlir#126 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/126 from bondhugula:quickfix 4566e75e49685c532faffff91d64c5d83d4da524 PiperOrigin-RevId: 269020058
* Cmpf constant folding for nan and infGeoffrey Martin-Noble2019-09-121-4/+4
| | | | PiperOrigin-RevId: 268783645
* Add the initial inlining infrastructure.River Riddle2019-09-051-1/+50
| | | | | | | | | | | | | | | | | | This defines a set of initial utilities for inlining a region(or a FuncOp), and defines a simple inliner pass for testing purposes. A new dialect interface is defined, DialectInlinerInterface, that allows for dialects to override hooks controlling inlining legality. The interface currently provides the following hooks, but these are just premilinary and should be changed/added to/modified as necessary: * isLegalToInline - Determine if a region can be inlined into one of this dialect, *or* if an operation of this dialect can be inlined into a given region. * shouldAnalyzeRecursively - Determine if an operation with regions should be analyzed recursively for legality. This allows for child operations to be closed off from the legality checks for operations like lambdas. * handleTerminator - Process a terminator that has been inlined. This cl adds support for inlining StandardOps, but other dialects will be added in followups as necessary. PiperOrigin-RevId: 267426759
* Add implementation for tensor_load and tensor_store operations.Stephan Herhut2019-08-281-0/+57
| | | | | | This change adds definitions, parsing and verification for both ops. PiperOrigin-RevId: 265954051
* Add a hook to the OpAsmDialectInterface to allow providing a special name ↵River Riddle2019-08-211-0/+37
| | | | | | | | for the operation result. This generalizes the current special handling for constant operations(they get named 'cst'/'true'/'false'/etc.) PiperOrigin-RevId: 264723379
* NFC: Move LLVMIR, SDBM, and StandardOps to the Dialect/ directory.River Riddle2019-08-191-0/+2102
PiperOrigin-RevId: 264193915
OpenPOWER on IntegriCloud