| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
PiperOrigin-RevId: 282810649
|
| |
|
|
|
|
| |
This chapter adds a new composite type to Toy, and shows the process of adding a new type to the IR, adding and updating operations to use it, and constant folding operations producing it.
PiperOrigin-RevId: 279107885
|
| |
|
|
|
|
| |
This change rewrites Ch-4.md to introduced interfaces in a detailed step-by-step manner, adds examples, and fixes some errors.
PiperOrigin-RevId: 275887017
|
| |
|
|
|
|
| |
MulOp now represents an element-wise multiplication instead of a matrix multiplication.
PiperOrigin-RevId: 275886774
|
| |
|
|
| |
PiperOrigin-RevId: 275745931
|
| |
|
|
|
|
| |
This chapters introduces the notion of a full conversion, and adds support for lowering down to the LLVM dialect, LLVM IR, and thus code generation.
PiperOrigin-RevId: 275337786
|
| |
|
|
|
|
| |
The transpose in the example had the same result type as its input, which is incorrect.
PiperOrigin-RevId: 275186568
|
| |
|
|
|
|
| |
This chapter adds a partial lowering of toy operations, all but PrintOp, to a combination of the Affine and Std dialects. This chapter focuses on introducing the conversion framework, the benefits of partial lowering, and how easily dialects may co-exist in the IR.
PiperOrigin-RevId: 275150649
|
| |
|
|
|
|
| |
The GenericCallOp needed to have the CallOpInterface to be picked up by the inliner. This also adds a CastOp to perform shape casts that are generated during inlining. The casts generated by the inliner will be folded away after shape inference.
PiperOrigin-RevId: 275150438
|
| |
|
|
|
|
|
|
|
|
| |
This Chapter now introduces and makes use of the Interface concept
in MLIR to demonstrate ShapeInference.
END_PUBLIC
Closes tensorflow/mlir#191
PiperOrigin-RevId: 275085151
|
| |
|
|
| |
PiperOrigin-RevId: 275084969
|
| |
|
|
|
|
|
|
|
| |
This is using Table-driven Declarative Rewrite Rules (DRR), the previous
version of the tutorial only showed the C++ patterns.
Closes tensorflow/mlir#187
PiperOrigin-RevId: 274852321
|
| |
|
|
|
|
| |
This effectively rewrites Ch.2 to introduce dialects, operations, and registration instead of deferring to Ch.3. This allows for introducing the best practices up front(using ODS, registering operations, etc.), and limits the opaque API to the chapter document instead of the code.
PiperOrigin-RevId: 274724289
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally, the lowering of `alloc` operations has been computing the number of
bytes to allocate when lowering based on the properties of MLIR type. This does
not take into account type legalization that happens when compiling LLVM IR
down to target assembly. This legalization can widen the type, potentially
leading to out-of-bounds accesses to `alloc`ed data due to mismatches between
address computation that takes the widening into account and allocation that
does not. Use the LLVM IR's equivalent of `sizeof` to compute the number of
bytes to be allocated:
%0 = getelementptr %type* null, %indexType 0
%1 = ptrtoint %type* %0 to %indexType
adapted from
http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt
PiperOrigin-RevId: 274159900
|
| |
|
|
|
|
|
|
| |
The code and documentation for this chapter of the tutorial have been updated to follow the new flow. The toy 'array' type has been replaced by usages of the MLIR tensor type. The code has also been cleaned up and modernized.
Closes tensorflow/mlir#101
PiperOrigin-RevId: 265744086
|
| |
|
|
|
|
|
|
|
|
|
| |
The current syntax separates the name and value with ':', but ':' is already overloaded by several other things(e.g. trailing types). This makes the syntax difficult to parse in some situtations:
Old:
"foo: 10 : i32"
New:
"foo = 10 : i32"
PiperOrigin-RevId: 255097928
|
| |
|
|
|
|
|
|
|
| |
This is the standard syntax for types on operations, and is also already used by IntegerAttr and FloatAttr.
Example:
dense<5> : tensor<i32>
dense<[3]> : tensor<1xi32>
PiperOrigin-RevId: 255069157
|
| |
|
|
|
|
|
|
|
| |
value. The syntax for this is the same as 0-D tensors:
dense<tensor<100x100x100xi32>, 10>
dense<tensor<1x1x1xi64>, -5>
PiperOrigin-RevId: 252907880
|
| |
|
|
|
|
|
|
| |
specific file path format that breaks on MSVC.
--
PiperOrigin-RevId: 250549223
|
| |
|
|
|
|
| |
--
PiperOrigin-RevId: 242606796
|
| |
|
|
|
|
|
|
|
|
|
|
| |
making the IR dumps much nicer.
This is part 2/3 of the path to making dialect types more nice. Part 3/3 will
slightly generalize the set of characters allowed in pretty types and make it
more principled.
--
PiperOrigin-RevId: 242249955
|
| |
|
|
|
|
|
|
| |
FunctionAttr::dropFunctionReference.
--
PiperOrigin-RevId: 242050934
|
| |
|
|
|
|
|
|
| |
specialization, and basic combines
--
PiperOrigin-RevId: 242050514
|
| |
|
|
|
|
|
|
|
| |
Mainly a missing dependency caused the tests to pass if one already built
the repo, but not from a clean (or incremental) build.
--
PiperOrigin-RevId: 241852313
|
| |
|
|
|
|
| |
--
PiperOrigin-RevId: 241849162
|
| |
|
|
|
|
|
|
|
| |
This introduces a basic MLIRGen through straight AST traversal,
without dialect registration at this point.
--
PiperOrigin-RevId: 241588354
|
|
|
--
PiperOrigin-RevId: 241549247
|