| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows dialect-specific attributes to be attached to func results. (or more specifically, FunctionLike ops).
For example:
```
func @f() -> (i32 {my_dialect.some_attr = 3})
```
This attaches my_dialect.some_attr with value 3 to the first result of func @f.
Another more complex example:
```
func @g() -> (i32, f32 {my_dialect.some_attr = "foo", other_dialect.some_other_attr = [1,2,3]}, i1)
```
Here, the second result has two attributes attached.
PiperOrigin-RevId: 275564165
|
|
|
|
|
|
| |
This allows mixing linalg operations with vector transfer operations (with additional modifications to affine ops) and is a step towards solving tensorflow/mlir#189.
PiperOrigin-RevId: 275543361
|
|
|
|
|
|
|
|
|
|
| |
A VectorTypeCastOp can only be used to lower between statically sized contiguous memrefs of scalar and matching vector type. The sizes and strides are thus fully static and easy to determine.
A relevant test is added.
This is a step towards solving tensorflow/mlir#189.
PiperOrigin-RevId: 275538981
|
|
|
|
| |
PiperOrigin-RevId: 275499524
|
|
|
|
| |
PiperOrigin-RevId: 275475229
|
|
|
|
| |
PiperOrigin-RevId: 275461067
|
|
|
|
|
|
|
| |
This unbreaks the `cmake -G Ninja ../llvm -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="host"`
in my local OSS build
PiperOrigin-RevId: 275452330
|
|
|
|
|
|
| |
constraints.
PiperOrigin-RevId: 275448372
|
|
|
|
| |
PiperOrigin-RevId: 275435593
|
|
|
|
|
|
|
|
| |
Adding gen table for rewrite patterns from GPU to NVVM dialect.
Copy missing op documentation from GPUOps.td to GPU.md.
PiperOrigin-RevId: 275419588
|
|
|
|
|
|
| |
These don't add any value, and some are even more restrictive than the respective static 'get' method.
PiperOrigin-RevId: 275391240
|
|
|
|
| |
PiperOrigin-RevId: 275370861
|
|
|
|
|
|
| |
Analogous to OpRewritePattern, this makes writing conversion patterns more convenient.
PiperOrigin-RevId: 275349854
|
|
|
|
|
|
|
| |
This CL adds support for loop.for operations in EDSC and adds a test.
This will be used in a followup commit to implement lowering of vector_transfer ops so that it works more generally and is not subject to affine constraints.
PiperOrigin-RevId: 275349796
|
|
|
|
|
|
| |
This part of the tutorial is now covered by a new flow in Toy. This also removes a point of confusion as there is also a proper Linalg dialect.
PiperOrigin-RevId: 275338933
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This CL creates a new Linalg promotion pass that operates on SubViewOp and decouples it from Linalg tiling. This is mostly moving code around.
PiperOrigin-RevId: 275329213
|
|
|
|
|
|
|
|
|
|
|
| |
Add a canonicalization pattern for spv.selection operation.
Convert spv.selection operation to spv.Select based on
simple pattern.
Closes tensorflow/mlir#183
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/183 from denis0x0D:sandbox/canon_select 43d04d923272dd60b9da39f70bdbc51a5168db62
PiperOrigin-RevId: 275312748
|
|
|
|
|
|
|
|
|
| |
'_' is used frequently enough as the separator of words in symbols.
We should allow it in dialect symbols when considering pretty printing.
Also updated LangRef.md regarding pretty form.
PiperOrigin-RevId: 275312494
|
|
|
|
| |
PiperOrigin-RevId: 275310747
|
|
|
|
|
|
|
|
|
|
|
|
| |
This pattern is error prone and unfortunately none of the sanitizer is catching
it at the moment.
Fixes tensorflow/mlir#192
Closes tensorflow/mlir#193
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/193 from joker-eph:fix_array_ref 8092252e64c426c6a8a790b7638f847bea4818b1
PiperOrigin-RevId: 275280201
|
|
|
|
|
|
|
|
|
|
| |
Previously when we bind a symbol to an op in DRR, it means to capture
the op's result(s) and later references will be expanded to result(s).
This means for ops without result, we are replacing the symbol with
nothing. This CL treats non-result op capturing and referencing as a
special case to mean the op itself.
PiperOrigin-RevId: 275269702
|
|
|
|
|
|
|
|
|
| |
NativeCodeCall is handled differently than normal op creation in RewriterGen
(because its flexibility). It will only be materialized to output stream if
it is used. But when using it for auxiliary patterns, we still want the side
effect even if it is not replacing matched root op's results.
PiperOrigin-RevId: 275265467
|
|
|
|
|
|
|
|
|
| |
It's usually hard to understand what went wrong if mlir-tblgen
crashes on some input. This CL adds a few useful LLVM_DEBUG
statements so that we can use mlir-tblegn -debug to figure
out the culprit for a crash.
PiperOrigin-RevId: 275253532
|
|
|
|
|
|
| |
The transpose in the example had the same result type as its input, which is incorrect.
PiperOrigin-RevId: 275186568
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We just need to implement a few interface hooks to DialectInlinerInterface
and CallOpInterface to gain the benefits of an inliner. :)
Right now only supports some trivial cases:
* Inlining single block with spv.Return/spv.ReturnValue
* Inlining multi block with spv.Return
* Inlining spv.selection/spv.loop without return ops
More advanced cases will require block argument and Phi support.
PiperOrigin-RevId: 275151132
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 275147795
|
|
|
|
|
|
|
|
| |
Create a ComplexType for table gen references. Include an AnyComplex type
to check whether the resulting tensor can be complex. Expand tensors to
allow complex types.
PiperOrigin-RevId: 275144804
|
|
|
|
|
|
| |
This change performs general cleanups of the implementation of ch.4 and fixes some bugs. For example, the operations currently don't inherit from the shape inference interface.
PiperOrigin-RevId: 275089914
|
|
|
|
|
|
|
|
|
|
| |
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 was missed when the type was renamed.
PiperOrigin-RevId: 275082588
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes the spv.module generated by the GPU to SPIR-V conversion SPIR-V
spec compliant (validated using spirv-val from Vulkan tools).
1) Separate out the VulkanLayoutUtils from
DecorateSPIRVCompositeTypeLayoutPass to make it reusable within the
Type converter in SPIR-V lowering infrastructure. This is used to
compute the layout of the !spv.struct used in global variable type
description.
2) Set the capabilities of the spv.module to Shader (needed for use of
Logical Memory Model, and the extensions to
SPV_KHR_storage_buffer_storage_class for use of Storage Buffer)
PiperOrigin-RevId: 275081486
|
|
|
|
|
|
|
|
|
|
| |
In addition to specifying the type of accumulation through the 'op' attribute, the accumulation can now also be specified as arbitrary code region.
Adds a gpu.yield op to specify the result of the accumulation.
Also support more types (integers) and accumulations (mul).
PiperOrigin-RevId: 275065447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current SignatureConversion framework (part of DialectConversion)
allows remapping input arguments to a function from 1->0, 1->1 or
1->many arguments during conversion. Another case is where the
argument itself is dropped, but it's use are remapped to another
Value*.
An example of this is: The Vulkan/SPIR-V spec requires entry functions
to be of type void(void). The GPU -> SPIR-V conversion implemented
this without having the DialectConversion framework track the
remapping that lead to some undefined behavior. The changes here
addresses that.
PiperOrigin-RevId: 275059656
|
|
|
|
|
|
| |
This hook is useful when an operation is known to be dead, and no replacement values make sense.
PiperOrigin-RevId: 275052756
|
|
|
|
|
|
|
| |
b843cc5d5a introduced a new op LICM transformation and a LoopLike interface,
but missed the CMake aspects of it. This should fix the build.
PiperOrigin-RevId: 275038533
|
|
|
|
| |
PiperOrigin-RevId: 275025323
|
|
|
|
| |
PiperOrigin-RevId: 275004258
|
|
|
|
|
|
| |
These traits are added in chapter 3 when we begin discussion optimization on the toy operations.
PiperOrigin-RevId: 274974010
|
|
|
|
|
|
| |
This change refactors the toyc driver to be much cleaner and easier to extend. It also cleans up a few comments in the combiner.
PiperOrigin-RevId: 274973808
|
|
|
|
| |
PiperOrigin-RevId: 274935374
|
|
|
|
| |
PiperOrigin-RevId: 274905193
|
|
|
|
| |
PiperOrigin-RevId: 274902838
|
|
|
|
|
|
| |
This fixes an issue with make where it fails to properly handle the dependency ordering.
PiperOrigin-RevId: 274897702
|
|
|
|
| |
PiperOrigin-RevId: 274894550
|
|
|
|
|
|
|
|
| |
The SpecId decoration is the handle for providing external specialization.
Similar to descriptor set and binding on global variables, we directly
bake it into assembly parsing and printing.
PiperOrigin-RevId: 274893879
|
|
|
|
| |
PiperOrigin-RevId: 274892763
|