Hello everyone. Suffice it to say that I am very new to the MLIR project and I must apologise in advance if the topic of the question was described in one of the tutorials/examples, yet no matter how I looked I still could not wrap my head around it.
Right now I am trying to design (at least partially) a dataflow engine dialect, where one of the main abstractions is a Stream
, and each stream refers to one of the primitive/complex types for the data it has to encompass - int
, uint
and so on.
If I am to implement the idea the way I see it, both Stream
and, let’s say, int
are types I need to implement in the dialect, and if I wanted to “declare a dataflow stream named x
of 32-bit unsigned type”, I would write something like this:
%x = dfcir.input<!dfcir.uint(32)>("x");
, where %x
would have the type Stream<uint(32)>
, for example.
As far as I understand the concepts behind TableGen ODS, the def
-records are “complete” in terms of template specializing, so in order to implement the example above I would have to use a string denoting a type as a parameter/attribute rather than a type by itself.
I am very sure MLIR as it is allows to model such concepts, but I couldn’t find a sufficient example. Thank you very much in advance.