| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Removes some boilerplate in ops, add support to refer to C++ class name from parser function specification in ODS.
--
PiperOrigin-RevId: 248140977
|
|
|
|
|
|
|
|
|
| |
This CL extends the execution engine to allow the additional resolution of symbols names
that have been registered explicitly. This allows linking static library symbols that have not been explicitly exported with the -rdynamic linking flag (which is deemed too intrusive).
--
PiperOrigin-RevId: 247969504
|
|
|
|
|
|
|
|
| |
derived operations now that op casting is no longer inside of Operation.
--
PiperOrigin-RevId: 247791672
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 247789235
|
|
|
|
|
|
|
|
| |
replace usages of Operation::dyn_cast with llvm::dyn_cast.
--
PiperOrigin-RevId: 247780086
|
|
|
|
| |
PiperOrigin-RevId: 247778691
|
|
|
|
|
|
|
|
| |
replace usages of Operation::dyn_cast with llvm::dyn_cast.
--
PiperOrigin-RevId: 247778391
|
|
|
|
|
|
|
|
| |
OptionalAttr/DefaultValuedAttr
--
PiperOrigin-RevId: 247693280
|
|
|
|
|
|
|
|
| |
mlir-tblgen) (NFC)
--
PiperOrigin-RevId: 247672280
|
|
|
|
|
|
|
|
| |
Fix a gcc warning.
--
PiperOrigin-RevId: 247669360
|
|
|
|
|
|
|
|
|
|
| |
If the attribute needs to exist for the validity of the op, then no need to use
dyn_cast_or_null as the op would be invalid in the cases where cast fails, so
just use cast.
--
PiperOrigin-RevId: 247617696
|
|
|
|
|
|
|
|
| |
a new llvm::SourceMgr diagnostic handler 'SourceMgrDiagnosticVerifierHandler'. This will allow for other tools to reuse the 'expected-*' functionality.
--
PiperOrigin-RevId: 247514684
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds support for functions in the Linalg dialect to run with mlir-cpu-runner.
For this purpose, this CL adds BufferAllocOp, BufferDeallocOp, LoadOp and StoreOp to the Linalg dialect as well as their lowering to LLVM. To avoid collisions with mlir::LoadOp/StoreOp (which should really become mlir::affine::LoadOp/StoreOp), the mlir::linalg namespace is added.
The execution uses a dummy linalg_dot function that just returns for now. In the future a proper library call will be used.
--
PiperOrigin-RevId: 247476061
|
|
|
|
|
|
|
|
| |
interface with llvm::SourceMgr. This lowers the barrier of entry for tools to get rich diagnostic handling when using llvm::SourceMgr.
--
PiperOrigin-RevId: 247358610
|
|
|
|
|
|
|
|
| |
the custom operation parsers) to use it instead of bool.
--
PiperOrigin-RevId: 246955523
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 246664861
|
|
|
|
|
|
|
|
| |
ensure access to the inherited protected constructor of `Op`. Some compiler versions have different rules for the visibility of inherited constructors.
--
PiperOrigin-RevId: 246661686
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 246614498
|
|
|
|
|
|
|
|
| |
functionality needed to separate notes from remarks. It also provides a starting point to start building out better remark infrastructure.
--
PiperOrigin-RevId: 246175216
|
|
|
|
|
|
|
|
| |
'DiagnosticEngine' and move the diagnostic handler support and final diagnostic emission from the MLIRContext to it.
--
PiperOrigin-RevId: 246163897
|
|
|
|
|
|
|
|
| |
translation functions
--
PiperOrigin-RevId: 245992152
|
|
|
|
|
|
|
|
| |
the generation of intrinsics out of NVVM index ops for now.
--
PiperOrigin-RevId: 245933152
|
|
|
|
|
|
|
|
| |
Simple mechanism to allow specifying arbitrary function declarations. The modelling will not cover all cases so allow a means for users to declare a method function that they will define in their C++ files. The goal is to allow full C++ flexibility as the goal is to cover cases not modelled.
--
PiperOrigin-RevId: 245889819
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 245844236
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 245820077
|
|
|
|
|
|
|
|
|
|
|
| |
This CL implements the previously unsupported parsing for Range, View and Slice operations.
A pass is introduced to lower to the LLVM.
Tests are moved out of C++ land and into mlir/test/Examples.
This allows better fitting within standard developer workflows.
--
PiperOrigin-RevId: 245796600
|
|
|
|
|
|
|
|
|
|
|
| |
specific operations.
Currently, this is limited to operations that give access to the special registers of
NVIDIA gpus that represent block and thread indices.
--
PiperOrigin-RevId: 245378632
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain ops can have multiple variadic operands/results, e.g., `tf.DynamicStitch`.
Even if an op has only one variadic operand/result, it is not necessarily the
very last one, e.g., `tf.RaggedGather`. This CL enhances TableGen subsystem to be
able to represent such cases.
In order to deduce the operand/result value range for each variadic operand,
currently we only support variadic operands/results all of the same size.
So two new traits, `SameVariadicOperandSize` and `SameVariadicResultSize` are
introduced.
--
PiperOrigin-RevId: 245310628
|
|
|
|
|
|
|
|
|
|
| |
An op can have multiple results. Being explicit that we are binding to the
whole op instead of one of the results. A way to bind to a specific result
is yet to come.
--
PiperOrigin-RevId: 244741137
|
|
|
|
|
|
|
|
|
| |
Both cOp and tAttr were used to perform some native C++ code expression.
Unifying them simplifies the concepts and reduces cognitive burden.
--
PiperOrigin-RevId: 244731946
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows accessing those bound source ops in result patterns, which can be
useful for invoking native C++ op creation.
We bind the op entirely here because ops can have multiple results. Design a
approach to bind to a specific result is not the concern of this commit.
--
PiperOrigin-RevId: 244724750
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL starts implementing a Linalg dialect with the objective of supporting
optimizing compilation of loops and library calls for a subset of common linear
algebra operations.
This CL starts by simply adding a linalg.range type and an operation with the
proper roundtripping test.
--
PiperOrigin-RevId: 244189468
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 244162515
|
|
|
|
|
|
|
|
|
|
| |
For ops with the SameValueType trait, we generate a builder without requiring
result type; we get the result type from the operand. However, if the operand
is variadic, we need to index into the first value in the pack.
--
PiperOrigin-RevId: 243866647
|
|
|
|
|
|
|
|
|
| |
TensorFlow ops have the convention to use leading underscore to denote
internal ops.
--
PiperOrigin-RevId: 243627723
|
|
|
|
|
|
|
|
|
|
|
| |
Now, op attribute names don't have '.' in their names so the special handling for it
can be removed. Attributes for functions still have dialect prefix with '.' as separator but TableGen does not deal with functions.
TESTED with existing unit tests
--
PiperOrigin-RevId: 243287462
|
|
|
|
|
|
|
|
|
|
| |
This CL changes various predicates and rewrite rules to use $-placeholders and
`tgfmt` as the driver for substitution. This will make the predicates and rewrite
rules more consistent regarding their arguments and more readable.
--
PiperOrigin-RevId: 243250739
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 242909061
|
|
|
|
|
|
|
|
|
| |
This addresses the compiler wraning of "comparison of unsigned expression
>= 0 is always true [-Wtype-limits]".
--
PiperOrigin-RevId: 242868703
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, attribute constraints are basically unused: we set true for almost
anything. This CL refactors common attribute kinds and sets constraints on
them properly. And fixed verification failures found by this change.
A noticeable one is that certain TF ops' attributes are required to be 64-bit
integer, but the corresponding TFLite ops expect 32-bit integer attributes.
Added bitwidth converters to handle this difference.
--
PiperOrigin-RevId: 241944008
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can bind symbols to op arguments/results in source pattern and op results in
result pattern. Previously resolving these symbols is scattered across
RewriterGen.cpp. This CL aggregated them into a `PatternSymbolResolver` class.
While we are here, this CL also cleans up tests for patterns to make them more
focused. Specifically, one-op-one-result.td is superseded by pattern.td;
pattern-tAttr.td is simplified; pattern-bound-symbol.td is added for the change
in this CL.
--
PiperOrigin-RevId: 241913973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we bundle the existence check and the MLIR attribute kind check
in one call. Further constraints (like element bitwidth) have to be split
into following checks. That is not a nice separation given that we have more
checks for constraints. Instead, this CL changes to generate a local variable
for every attribute, check its existence first, then check the constraints.
Creating a local variable for each attribute also avoids querying it multiple
times using the raw getAttr() API. This is a win for both performance the
readability of the generated code.
This CL also changed the error message to be more greppable by delimiting
the error message from constraints with boilerplate part with colon.
--
PiperOrigin-RevId: 241906132
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes to build with OSS setup).
Tested:
cmake -G Ninja ../llvm/ -DLLVM_BUILD_EXAMPLES=ON
ninja check-mlir
--
PiperOrigin-RevId: 241841296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
replacement
This CL looses the requirement that all result patterns in a rewrite rule must
replace a result of the root op in the source pattern. Now only the last N
result pattern-generated ops are used to replace a N-result source op.
This allows to generate additional ops to aid building up final ops used to
replace the source op.
--
PiperOrigin-RevId: 241783192
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attributes can have default values or be optional. Checking the validity of
attributes in aggregate builder should consider that. And to be accurate,
we should check all required attributes are indeed provided in the list.
This is actually duplicating the work done by verifier. Checking the validity
of attributes should be the responsiblity of verifiers. This CL removes
the assertion for attributes in aggregate builders for the above reason.
(Assertions for operands/results are still kept since they are trivial.)
Also added more tests for aggregate builders.
--
PiperOrigin-RevId: 241746059
|
|
|
|
|
|
|
|
| |
bool. This also changes the return of Operation::emitError/emitOpError to LogicalResult as well.
--
PiperOrigin-RevId: 241588075
|
|
|
|
|
|
|
|
| |
of bool.
--
PiperOrigin-RevId: 241553930
|
|
|
|
|
|
|
|
|
| |
This is making up for some differences in standard library and linker flags.
It also get rid of the requirement to build with RTTI.
--
PiperOrigin-RevId: 241348845
|
|
|
|
|
|
|
|
|
|
| |
This CL adds EnumAttr as a general mechanism for modelling enum attributes. Right now
it is using StringAttr under the hood since MLIR does not have native support for enum
attributes.
--
PiperOrigin-RevId: 241334043
|
|
|
|
|
|
|
|
|
| |
* Add initial version of build files;
* Update README with instructions to download and build MLIR from github;
--
PiperOrigin-RevId: 241102092
|