| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
PiperOrigin-RevId: 277354482
|
|
|
|
|
|
|
|
|
|
|
| |
When we removed a pattern, we removed it from worklist but not from
worklistMap. Then, when we tried to add a new pattern on the same Operation
again, the pattern wasn't added since it already existed in the
worklistMap (but not in the worklist).
Closes tensorflow/mlir#211
PiperOrigin-RevId: 277319669
|
|
|
|
|
|
|
| |
This removes a bunch of special tailored DFS code in favor of the common
LLVM utility. Besides, we avoid recursion with system stack given that
llvm::depth_first_ext is iterator based and maintains its own stack.
PiperOrigin-RevId: 277272961
|
|
|
|
|
|
|
|
| |
The SelectOp always has the same result type as its true/false
value. Add a builder method that uses the operand type to get the
result type.
PiperOrigin-RevId: 277217978
|
|
|
|
|
|
|
|
|
|
| |
This CL adds another control flow instruction in SPIR-V: OpPhi.
It is modelled as block arguments to be idiomatic with MLIR.
See the rationale.md doc for "Block Arguments vs PHI nodes".
Serialization and deserialization is updated to convert between
block arguments and SPIR-V OpPhi instructions.
PiperOrigin-RevId: 277161545
|
|
|
|
|
|
|
|
|
| |
For ops that recursively re-enter the parser to parse an operation (such as
ops with a "wraps" pretty form), this ensures that the wrapped op will parse
its location, which can then be used for the locations of the wrapping op
and any other implicit ops.
PiperOrigin-RevId: 277152636
|
|
|
|
|
|
|
|
| |
OperationFolder - NFC
This will be used to specify declarative Linalg transformations in a followup CL. In particular, the PatternRewrite mechanism does not allow folding and has its own way of tracking erasure.
PiperOrigin-RevId: 277149158
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, it may be desirable to mark entire regions of operations as legal. This provides an additional granularity of context to the concept of "legal". The `ConversionTarget` supports marking operations, that were previously added as `Legal` or `Dynamic`, as `recursively` legal. Recursive legality means that if an operation instance is legal, either statically or dynamically, all of the operations nested within are also considered legal. An operation can be marked via `markOpRecursivelyLegal<>`:
```c++
ConversionTarget &target = ...;
/// The operation must first be marked as `Legal` or `Dynamic`.
target.addLegalOp<MyOp>(...);
target.addDynamicallyLegalOp<MySecondOp>(...);
/// Mark the operation as always recursively legal.
target.markOpRecursivelyLegal<MyOp>();
/// Mark optionally with a callback to allow selective marking.
target.markOpRecursivelyLegal<MyOp, MySecondOp>([](Operation *op) { ... });
/// Mark optionally with a callback to allow selective marking.
target.markOpRecursivelyLegal<MyOp>([](MyOp op) { ... });
```
PiperOrigin-RevId: 277086382
|
|
|
|
| |
PiperOrigin-RevId: 277037138
|
|
|
|
| |
PiperOrigin-RevId: 277033167
|
|
|
|
| |
PiperOrigin-RevId: 276859463
|
|
|
|
| |
PiperOrigin-RevId: 276714649
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows for parsing things like:
%name_1, %name_2:5, %name_3:2 = "my.op" ...
This is useful for operations that have groups of variadic result values. The
total number of results is expected to match the number of results defined by
the operation.
PiperOrigin-RevId: 276703280
|
|
|
|
|
|
|
|
|
|
| |
Combine chained `spirv::AccessChainOp` operations into one
`spirv::AccessChainOp` operation.
Closes tensorflow/mlir#198
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/198 from denis0x0D:sandbox/canon_access_chain 0cb87955a85511071143d62637ff939d0dabc2bd
PiperOrigin-RevId: 276609345
|
|
|
|
|
|
| |
This allows for them to be used on other non-function, or even other function-like, operations. The algorithms are already generic, so this is simply changing the derived pass type. The majority of this change is just ensuring that the nesting of these passes remains the same, as the pass manager won't auto-nest them anymore.
PiperOrigin-RevId: 276573038
|
|
|
|
|
|
| |
This requires reconstructing the attribute dictionary of each operation containing a use.
PiperOrigin-RevId: 276520544
|
|
|
|
|
|
|
|
| |
MLIRIR includes generated header for interfaces, including these headers require
an extra dependency to ensure these headers are generated before we attempt to
build MLIREDSCInterface.
PiperOrigin-RevId: 276518255
|
|
|
|
| |
PiperOrigin-RevId: 276440911
|
|
|
|
|
|
| |
This addresses post-submit comments on 00d2a37e32
PiperOrigin-RevId: 276419770
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies defining expected-* directives when there are multiple that apply to the next or previous line. @below applies the directive to the next non-designator line, i.e. the next line that does not contain an expected-* designator. @above applies to the previous non designator line.
Examples:
// Expect an error on the next line that does not contain a designator.
// expected-remark@below {{remark on function below}}
// expected-remark@below {{another remark on function below}}
func @bar(%a : f32)
// Expect an error on the previous line that does not contain a designator.
func @baz(%a : f32)
// expected-remark@above {{remark on function above}}
// expected-remark@above {{another remark on function above}}
PiperOrigin-RevId: 276369085
|
|
|
|
|
|
|
| |
The variable in question is only used in an assertion,
leading to a warning in opt builds.
PiperOrigin-RevId: 276352259
|
|
|
|
|
|
| |
This was used for shape inference in the previous tutorial flow.
PiperOrigin-RevId: 276351916
|
|
|
|
|
|
|
|
|
|
| |
The ExecutionEngine was updated recently to only take the LLVM dialect as
input. Memrefs are no longer expected in the signature of the entry point
function by the executor so there is no need to allocate and free them. The
code in MemRefUtils is therefore dead and furthermore out of sync with the
recent evolution of memref type to support strides. Drop it.
PiperOrigin-RevId: 276272302
|
|
|
|
| |
PiperOrigin-RevId: 276117540
|
|
|
|
|
|
|
|
|
| |
fix: nonnegative -> positive
Closes tensorflow/mlir#206
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/206 from bondhugula:bondhugula-patch-1 9a47ca7dfd230180a9df33e9a64b33d02252d30a
PiperOrigin-RevId: 276060885
|
|
|
|
|
|
|
|
|
| |
ExecutionEngine currently supports additional parameters that can be used to
run LLVM transformations during JIT compilation. Expose this to Python
bindings. When the ExecutionEngine functionality is moved to LLVM, the
bindings-specific code can be updated to interact with LLVM.
PiperOrigin-RevId: 276060475
|
|
|
|
| |
PiperOrigin-RevId: 275998781
|
|
|
|
|
|
|
|
| |
mlir::parseAttribute.
This matches the behavior of the public mlir::parseType, and even uses the internal implementation.
PiperOrigin-RevId: 275989777
|
|
|
|
|
|
|
|
| |
Previously DRR assumes attributes to appear after operands. This was the
previous requirements on ODS, but that has changed some time ago. Fix
DRR to also support interleaved operands and attributes.
PiperOrigin-RevId: 275983485
|
|
|
|
|
|
|
|
|
|
|
|
| |
We will use block arguments as the way to model SPIR-V OpPhi in
the SPIR-V dialect.
This CL also adds a few useful helper methods to both ops to
get the block arguments.
Also added tests for branch weight (de)serialization.
PiperOrigin-RevId: 275960797
|
|
|
|
|
|
|
|
|
|
| |
The type constraint had to be relaxed due to the order of lowering passes in
the examples, that since has been fixed. The relaxed version was still used by
the CUDA lowering for launch sizes of `index` type. This is not necessary since
the GPU dialect does not restrict the type of the launch size operands. Use an
LLVM type instead and restore the check in the LLVM_CallOp definition.
PiperOrigin-RevId: 275920109
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Rename GPU op names from gpu_Foo to GPU_FooOp.
PiperOrigin-RevId: 275882232
|
|
|
|
|
|
| |
This matches the behavior of the top level attribute dictionary.
PiperOrigin-RevId: 275879828
|
|
|
|
|
|
| |
This trait provides accessors for the name, symbol use list methods, verification, with more to be added.
PiperOrigin-RevId: 275864554
|
|
|
|
| |
PiperOrigin-RevId: 275745931
|
|
|
|
|
|
| |
The chapter list is out of date, as well as mentions of matrix multiplication(now element-wise multiplication).
PiperOrigin-RevId: 275744911
|
|
|
|
|
|
|
| |
Otherwise, we'll see the following warning when compiling with GCC 8:
warning: this ?for? clause does not guard... [-Wmisleading-indentation]
PiperOrigin-RevId: 275735925
|
|
|
|
|
|
| |
Closes tensorflow/mlir#175
PiperOrigin-RevId: 275726876
|
|
|
|
|
|
| |
Closes tensorflow/mlir#177
PiperOrigin-RevId: 275692653
|
|
|
|
| |
PiperOrigin-RevId: 275659433
|
|
|
|
| |
PiperOrigin-RevId: 275656416
|
|
|
|
|
|
| |
This header is not self-contained otherwise.
PiperOrigin-RevId: 275651582
|
|
|
|
| |
PiperOrigin-RevId: 275650756
|
|
|
|
| |
PiperOrigin-RevId: 275631166
|
|
|
|
|
|
|
|
| |
nvvm.shfl.sync.bfly optionally returns a predicate whether source lane was active. Support for this was added to clang in https://reviews.llvm.org/D68892.
Add an optional 'pred' unit attribute to the instruction to return this predicate. Specify this attribute in the partial warp reduction so we don't need to manually compute the predicate.
PiperOrigin-RevId: 275616564
|
|
|
|
|
|
| |
Refactor the implementation to be much cleaner by adding a `make_second_range` utility to walk the `second` value of a range of pairs.
PiperOrigin-RevId: 275598985
|
|
|
|
| |
PiperOrigin-RevId: 275588019
|
|
|
|
|
|
| |
We use get*() in deserizer and other places across the codebase.
PiperOrigin-RevId: 275582390
|