This is being integrated from an experimental side repository piece by piece over the course of several patches and will ultimately include full build support, documentation and e2e tests.
--
PiperOrigin-RevId: 248259895
This CL uses a pattern proposed by aminim@ to add a base Linalg op that further dispatches to the proper op implementation.
This CL adds a LinalgOp which implements isclassof for only a subset of the linalg ops: the ops that behave like a library call for the purpose of transformations like tiling.
This uses a static dispatch mechanism based on the LinalgLibraryOps.td ops declarations to avoid switch or visitor patterns. This may later be replaced by Tablegen'd dispatch when it is available.
As a consequence, the list of library like operations in Linalg may now grow without having to modify any of the dispatch or transformation support.
More details in the concept-based dispatch, as explained by aminim@
```
This is inspired by Sean Parent's: https://sean-parent.stlab.cc/papers-and-presentations/#value-semantics-and-concept-based-polymorphism
A key difference is that the set of classes erased is statically known, which avoids to use dynamic memory allocation.
We use a zero-sized templated class to emit the virtual table and generate a singleton object for each instantiation of this class. We pay the cost of initialization once on construction (find which class to dispatch to) and then a virtual dispatch on every call.
```
--
PiperOrigin-RevId: 248258921
This CL gives a pattern-matching-y look and feel to AffineExpr.
For now this uses a shared_ptr instead of unique'ing into a bumpPtrAllocator.
SDBM gives a simple use case with more idiomatic syntax for matchers.
--
PiperOrigin-RevId: 248188075
Adding the additional layer of directory was discussed offline and matches the Target/ tree. The names match the defacto convention we seem to be following where the C++ namespace is ^(.+)Ops/$ matched against the directory name.
This is in preparation for patching the Quantizer into this tree, which would have been confusing without moving the Quantization dialect to its more proper home. It is left to others to move other dialects if desired.
Tested:
ninja check-mlir
--
PiperOrigin-RevId: 248171982
Example:
/tmp/file_C.py:21:5: error: 'foo.bar' op attribute 'something'
raise app.UsageError('Too many command-line arguments.')
^
/tmp/file_D.py:20:3: note: called from
if len(argv) > 1:
^
/tmp/file_E.py:19:1: note: called from
def main(argv):
^
/tmp/file_F.py:24:3: note: called from
app.run(main)
^
--
PiperOrigin-RevId: 248151212
Example:
/tmp/file_C.py:17:1: error: 'foo.bar' op attribute 'something' ...
app.run(main)
^
/tmp/file_D.py:14:1: note: called from
raise app.UsageError('Too many command-line arguments.')
^
/tmp/file_E.py:12:1: note: called from
def main(argv):
^
/tmp/file_F.py:13:1: note: called from
if len(argv) > 1:
^
--
PiperOrigin-RevId: 248074804
A linalg.dim operation is used to extract size information from !linalg.view objects passed
through function call boundaries.
--
PiperOrigin-RevId: 248017488
This CL turns the previous "Op Definition" doc into a manual for table-driven
op definition specification by fleshing out more details of existing mechanisms.
--
PiperOrigin-RevId: 248013274
This means that we can now do something like:
ctx->getRegisteredDialect<LLVMDialect>();
as opposed to:
static_cast<LLVMDialect *>(ctx->getRegisteredDialect("llvm");
--
PiperOrigin-RevId: 247989896
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
Restructure the Regions section in LangRef to avoid having a wall of text and
reflect a recent evolution of the design. Unspecify region types, that are put
on hold until use cases arise.
Update the Rationale doc with a list of design decisions related to regions.
Separately list the design alternatives that were considered and discarded due
to the lack of existing use cases.
--
PiperOrigin-RevId: 247943144
generates remarks for testing, it isn't itself a transformation.
While there, upgrade its diagnostic emission to use the streaming interface.
Prune some unnecessary #includes.
--
PiperOrigin-RevId: 247768062
OSS build was broken (missing CMakeLists.txt changes and compilation failures on Ubuntu)
Automated rollback of changelist 247564213.
PiperOrigin-RevId: 247713812