Types and operations for the ADF dialect This is an MLIR dialect designed to capture the Xilinx Adaptive Data Flow (ADF) Graph semantics. This dialect is intended to be converible to/from the C++ graph syntax, but to represent the graph abstractly, rather than at the C++ syntactic level.
[TOC]
ADF.graph
(::xilinx::ADF::GraphOp)An ADF graph operation
Syntax:
operation ::= `ADF.graph` `(` $name `)` regions attr-dict
An operation that represents an ADF graph. This operation determines the name of the graph and contains a single region containing ADF dialect operations. For example,
ADF.graph("name") {
your_graph_operations
}
Traits: AlwaysSpeculatableImplTrait
, NoTerminator
, SingleBlock
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attribute | MLIR Type | Description |
---|---|---|
name | ::mlir::StringAttr | string attribute |
ADF.inout_port
(::xilinx::ADF::GraphInOutOp)Graph input/output port operation
Syntax:
operation ::= `ADF.inout_port` `(` $name `)` $inp attr-dict `:` `(`type($inp) `)` `->` type(results)
An operation representing a dual input/output of an ADF graph. This is usually used to represent inout parameter val=ues
%2 = ADF.inout_port("name") %3 : (!ADF.interface<!ADF.int32>) -> !ADF.interface<!ADF.int32>
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attribute | MLIR Type | Description |
---|---|---|
name | ::mlir::StringAttr | string attribute |
Operand | Description |
---|---|
inp |
Result | Description |
---|---|
«unnamed» |
ADF.input_port
(::xilinx::ADF::GraphInputOp)Graph input port operation
Syntax:
operation ::= `ADF.input_port` `(` $name `)` $value attr-dict `->` type($output)
An operation representing a primary input of an ADF graph. It takes an array attribute as the input argument. The constant values of the array attribute defines the interface of whole ADF graph. The first index is a bool integer and 1:i1 means the ADF graph is based on stream data access mechanism; 0:i1 means it’s an adf window data access. If it’s the stream mechanism, then the second index should set to -1, otherwise, the second index should set to the window size. e.g. 128 byte.
The input_port will return an output with “interface” type to propagate the interface values defined by the argument array attributes.
%0 = ADF.input_port("name") [1:i1, -1:i32] -> !ADF.interface<!ADF.int32> // for ADF stream access mechanism
or
%1 = ADF.input_port("name") [0:i1, 128:i32] -> !ADF.interface<!ADF.int32> // for ADF window access mechanism
Traits: AlwaysSpeculatableImplTrait
, ConstantLike
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attribute | MLIR Type | Description |
---|---|---|
value | ::mlir::ArrayAttr | array attribute |
name | ::mlir::StringAttr | string attribute |
Result | Description |
---|---|
output |
ADF.kernel
(::xilinx::ADF::KernelOp)Call and instantiate a kernel node with proper connections
Syntax:
operation ::= `ADF.kernel` $callee `(` $kernel_inputs `)` attr-dict `:` functional-type($kernel_inputs, results)
An operation representing a primitive node in the graph. This operation refers to a function implementing the kernel. It takes “window” types for both its variadic inputs and the op_return to propagate the window size through entire ADF graph.
%3 = ADF.kernel @kfunc2(%1, %2) :
(!ADF.interface<!ADF.int32>, !ADF.interface<!ADF.int32>) -> !ADF.interface<!ADF.int32>
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attribute | MLIR Type | Description |
---|---|---|
callee | ::mlir::FlatSymbolRefAttr | flat symbol reference attribute |
Operand | Description |
---|---|
kernel_inputs |
variadic of |
Result | Description |
---|---|
«unnamed» |
ADF.output_port
(::xilinx::ADF::GraphOutputOp)Graph output port operation
Syntax:
operation ::= `ADF.output_port` `(` $name `)` $inp attr-dict `:` `(`type($inp) `)` `->` type(results)
An operation representing a primary input of an ADF graph. The operation takes an argument with “window” type and also returns an “window” type output for final type checking.
%2 = ADF.output_port("name") %3 : (!ADF.interface<!ADF.int32>) -> !ADF.interface<!ADF.int32>
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attribute | MLIR Type | Description |
---|---|---|
name | ::mlir::StringAttr | string attribute |
Operand | Description |
---|---|
inp |
Result | Description |
---|---|
«unnamed» |
Syntax:
!ADF.interface<
mlir::Type # type
>
Parameter | C++ type | Description |
---|---|---|
type | mlir::Type |
Syntax:
!ADF.parameter<
mlir::Type # type
>
Parameter | C++ type | Description |
---|---|---|
type | mlir::Type |
Syntax:
!ADF.stream<
mlir::Type # type
>
Parameter | C++ type | Description |
---|---|---|
type | mlir::Type |
Syntax:
!ADF.window<
mlir::Type, # type
int, # size
int # overlap
>
Parameter | C++ type | Description |
---|---|---|
type | mlir::Type |
|
size | int |
|
overlap | int |
Syntax: !ADF.acc48
Syntax: !ADF.acc80
Syntax: !ADF.accfloat
Syntax: !ADF.cacc48
Syntax: !ADF.cacc80
Syntax: !ADF.caccfloat
Syntax: !ADF.cfloat
Syntax: !ADF.cint16
Syntax: !ADF.cint32
Syntax: !ADF.float
Syntax: !ADF.int8
Syntax: !ADF.int16
Syntax: !ADF.int32
Syntax: !ADF.int64
Syntax: !ADF.uint8
Syntax: !ADF.uint16
Syntax: !ADF.uint32
Syntax: !ADF.uint64