- Mar 30, 2019
-
-
Jacques Pienaar authored
Add create function on builder to make it easier to create ops of registered types. Enables doing `builder.create<AddFOp>(lhs, rhs)` as well as having default values on the build method. This CL does not add a default build method (i.e., create<DimOp>(...) would fail). PiperOrigin-RevId: 207268882
-
James Molloy authored
These were non-indented, which I thought was deliberate until Chris corrected me in cl/207115253 :) PiperOrigin-RevId: 207246887
-
James Molloy authored
PiperOrigin-RevId: 207235956
-
Uday Bondhugula authored
Comments included are self-explanatory. PiperOrigin-RevId: 207198873
-
Chris Lattner authored
method to SSAValue. PiperOrigin-RevId: 207193088
-
Chris Lattner authored
parser and printer. Fix the spelling of 'delimeter' PiperOrigin-RevId: 207189892
-
James Molloy authored
No longer prints a trailing ':'. PiperOrigin-RevId: 207103812
-
Uday Bondhugula authored
MLFunctions. - MLStmt cloning and IV replacement - While at this, fix the innermostLoopGatherer to actually gather all the innermost loops (it was stopping its walk at the first innermost loop it found) - Improve comments for MLFunction statement classes, fix inheritance order. - Fixed StmtBlock destructor. PiperOrigin-RevId: 207049173
-
Uday Bondhugula authored
- simplify operations with identity elements (multiply by 1, add with 0). - simplify successive add/mul: fold constants, propagate constants to the right. - simplify floordiv and ceildiv when divisors are constants, and the LHS is a multiply expression with RHS constant. - fix an affine expression printing bug on paren emission. - while on this, fix affine-map test cases file (memref's using layout maps that were duplicates of existing ones should be emitted pointing to the unique'd one). PiperOrigin-RevId: 207046738
-
James Molloy authored
PiperOrigin-RevId: 206977161
-
James Molloy authored
This CL adds: * One graphdef extracted from the TF test suite. More will come. * Scaffolding for the "graphdef2mlir" tool. * Importing of simple graphs. Type inference is not yet working, and attributes do not work either. * A fix for CFGFunction::~CFGFunction to not die if the function was destroyed without a terminator (for example if we exit early due to an error). PiperOrigin-RevId: 206965992
-
Chris Lattner authored
generalize the asmprinters handling of pretty names to allow arbitrary sugar to be dumped on various constructs. Give CFG function arguments nice "arg0" names like MLFunctions get, and give constant integers pretty names like %c37 for a constant 377 PiperOrigin-RevId: 206953080
-
Chris Lattner authored
handlers and to feed them with errors and warnings produced by the compiler. Enhance Operation to be able to get its own MLIRContext on demand, simplifying some clients. Change the verifier to emit certain errors with the diagnostic handler. This is steps towards reworking the verifier and diagnostic propagation but is itself not particularly useful. More to come. PiperOrigin-RevId: 206948643
-
Tatiana Shpeisman authored
Clean up and extend MLFuncBuilder to allow creating statements in the middle of a statement block. Rename Statement::getFunction() and StmtBlock()::getFunction() to findFunction() to make it clear that this is not a constant time getter. Fix b/112039912 - we were recording 'i' instead of '%i' for loop induction variables causing "use of undefined SSA value" error. PiperOrigin-RevId: 206884644
-
Chris Lattner authored
Two problems: 1) we didn't visit the types in ops correctly, and 2) the general "T" version of the OpAsmPrinter inserter would match things like MemRefType& and print it directly. PiperOrigin-RevId: 206863642
-
Jacques Pienaar authored
This is doing it in a suboptimal manner by recombining [integer period literal] into a string literal and parsing that via to_float. PiperOrigin-RevId: 206855106
-
Chris Lattner authored
This is still (intentionally) generating redundant parens for nested tightly binding expressions, but I think that is reasonable for readability sake. This also print x-y instead of x-(y*1) PiperOrigin-RevId: 206847212
-
Jacques Pienaar authored
PiperOrigin-RevId: 206840659
-
MLIR Team authored
PiperOrigin-RevId: 206834416
-
Uday Bondhugula authored
createOperation needs to insert the operation at 'insertPoint', which can be anywhere (not necessarily at the end of 'statements'). PiperOrigin-RevId: 206827159
-
MLIR Team authored
PiperOrigin-RevId: 206824609
-
Tatiana Shpeisman authored
PiperOrigin-RevId: 206759180
-
Tatiana Shpeisman authored
Implement induction variables. Pretty print induction variable operands as %i<ssa value number>. Add support for future pretty printing of ML function arguments as %arg<ssa value number>. Induction variables are implemented by inheriting ForStmt from MLValue. ForStmt provides APIs that make this design decision invisible to the ForStmt users. This CL in combination with cl/206253643 resolves http://b/111769060. PiperOrigin-RevId: 206655937
-
MLIR Team authored
PiperOrigin-RevId: 206652744
-
MLIR Team authored
Adds field to MemRefType to query number of dynamic dimensions. PiperOrigin-RevId: 206633162
-
Jacques Pienaar authored
* TensorFlow Control Flow supports variadic number of control inputs, add variant of NOperands to support at least N operands; * Update example: - All ops will produce control output; - Use tf$name for mapping back to TensorFlow (a op can have a name as well as an attribute _name, using tf$name disambiguates that); PiperOrigin-RevId: 206621280
-
Uday Bondhugula authored
PiperOrigin-RevId: 206609084
-
Chris Lattner authored
- Generalize TwoOperands and TwoResults to NOperands and NResults, which can be used for any fixed N. - Rename OpImpl namespace to OpTrait, OpImpl::Base to OpBase, and TraitImpl to TraitBase to better reflect what these are. PiperOrigin-RevId: 206588634
-
Jacques Pienaar authored
PiperOrigin-RevId: 206587987
-
Uday Bondhugula authored
PiperOrigin-RevId: 206522239
-
Chris Lattner authored
and control edges. Wire the TensorFlow tests into the harness properly. Fix a bug in the CFGBuilder (not inserting at the insertion point) and flesh it out a bit more. PiperOrigin-RevId: 206511270
-
Chris Lattner authored
code. Change printing of affine map's to not print a space between the dim and symbol list. PiperOrigin-RevId: 206505419
-
Chris Lattner authored
- Sketch out a TensorFlow/IR directory that will hold op definitions and common TF support logic. We will eventually have TensorFlow/TF2HLO, TensorFlow/Grappler, TensorFlow/TFLite, etc. - Add sketches of a Switch/Merge op definition, including some missing stuff like the TwoResults trait. Add a skeleton of a pass to raise this form. - Beef up the Pass/FunctionPass definitions slightly, moving the common code out of LoopUnroll.cpp into a new IR/Pass.cpp file. - Switch ConvertToCFG.cpp to be a ModulePass. - Allow _ to start bare identifiers, since this is important for TF attributes. PiperOrigin-RevId: 206502517
-
Chris Lattner authored
VariadicOperands, tidy up some code in the asmprinter, fill out more verification logic in for LoadOp. PiperOrigin-RevId: 206443020
-
Chris Lattner authored
and OtherType. Other type is now the thing that holds AffineInt, Control, eventually Resource, Variant, String, etc. FloatType holds the floating point types, and allows convenient query of isa<FloatType>(). This fixes issues where we allowed control to be the element type of tensor, memref, vector. At the same time, ban AffineInt from being an element of a vector/memref/tensor as well since we don't need it. I updated the spec to match this as well. PiperOrigin-RevId: 206361942
-
Chris Lattner authored
out predecessor information in the asmprinter. PiperOrigin-RevId: 206343174
-
Jacques Pienaar authored
* Add tf_control as primitive type; * Allow $ in bare-id to allow attributes with $ (to make it trivially to mangle a TF attribute); PiperOrigin-RevId: 206342642
-
Uday Bondhugula authored
- Update InnermostLoopGatherer to use a post order traversal (linear time/single traversal). - Drop getNumNestedLoops(). - Update isInnermost() to use the StmtWalker. When using return values in conjunction with walkers, the StmtWalker CRTP pattern doesn't appear to be of any use. It just requires overriding nearly all of the methods, which is what InnermostLoopGatherer currently does. Please see FIXME/ENLIGHTENME comments. TODO: figure this out from this CL discussion. Note - Comments on visitor/walker base class are out of date; will update when this CL is finalized. PiperOrigin-RevId: 206340901
-
Tatiana Shpeisman authored
Implement MLValue, statement operands, operation statement operands and values. ML functions now have full support for expressing operations. Induction variables, function arguments and return values are still todo. PiperOrigin-RevId: 206253643
-
Chris Lattner authored
BasicBlockOperand to be more consistent with InstOperand. Rename getDestinations() to getBasicBlockOperands() to reduce confusion on their role. PiperOrigin-RevId: 206192327
-