CIRCT

Circuit IR Compilers and Tools

'ssp' Dialect

Static scheduling problem instances and solutions. A dialect to abstractly represent instances and solutions of static scheduling problems, intended as an import/export format for testing, benchmarking, and rapid prototyping of problem definitions and algorithm implementations. See the rationale for more information.

Operation definition

ssp.graph (::circt::ssp::DependenceGraphOp)

Container for (scheduling) operations.

Syntax:

operation ::= `ssp.graph` $body attr-dict

The dependence graph is spanned by OperationOps (vertices) and a combination of MLIR value uses and symbol references (edges).

Traits: HasOnlyGraphRegion, HasParent, NoRegionArguments, NoTerminator, SingleBlock, SymbolTable

Interfaces: OpAsmOpInterface, RegionKindInterface

ssp.instance (::circt::ssp::InstanceOp)

Instance of a static scheduling problem.

Syntax:

operation ::= `ssp.instance` $instanceName `of` $problemName custom<Properties>($properties) $body attr-dict

This operation represents an instance of a static scheduling problem, comprised of an operator library (OperatorLibraryOp, a container for OperatorTypeOps) and the dependence graph (DependenceGraphOp, a container for OperationOps). The instance and its components (operations, operator types and dependences) can carry properties, i.e. special MLIR attributes inheriting from the TableGen classes in PropertyBase.td. The ssp dialect provides attribute definitions (and short-form pretty-printing) for CIRCT’s built-in scheduling problems.

Example

ssp.instance "canis14_fig2" of "ModuloProblem" [II<3>] {
  library {
    operator_type @MemPort [latency<1>, limit<1>]
    operator_type @Add [latency<1>]
  }
  graph {
    %0 = operation<@MemPort> @load_A(@store_A [dist<1>]) [t<2>]
    %1 = operation<@MemPort> @load_B() [t<0>]
    %2 = operation<@Add> @add(%0, %1) [t<3>]
    operation<@MemPort> @store_A(%2) [t<4>]
  }
}

Traits: IsolatedFromAbove, NoRegionArguments, NoTerminator, SingleBlock

Interfaces: OpAsmOpInterface

Attributes:

AttributeMLIR TypeDescription
instanceName::mlir::StringAttrstring attribute
problemName::mlir::StringAttrstring attribute
properties::mlir::ArrayAttrarray attribute

ssp.operation (::circt::ssp::OperationOp)

Vertex and incoming edges in the dependence graph.

This MLIR operation represents an operation (in the terminology of CIRCT’s scheduling infra) in a scheduling problem, or in other words, a vertex in the surrounding instance’s dependence graph. In addition, it also encodes the operation’s incoming dependences. In order to faithfully reproduce the internal modeling in the scheduling infrastructure, these dependence edges are either encoded as MLIR operands (def-use dependences) or symbol references (auxiliary dependences). To that end, OperationOps can optionally be named, and accept/produce an arbitrary number of operands/results. The operation and the incoming dependences can carry properties.

The linkedOperatorType property in the root Problem class is central to the problem models, because it links operations to their properties in the target IR. Therefore, the referenced operator type symbol is parsed/printed right after the operation keyword in the custom assembly syntax.

Examples

// unnamed, only def-use dependences
%2 = operation<@Add>(%0, %1)

// unnamed, multiple results
%5:2 = operation<@Div>(%3, %4) // multiple results

// named, mix of def-use and auxiliary dependences
operation<@MemPort> @store_A(%2, @store_B, @load_A)

// dependence properties
operation<@Barrier>(%2 [dist<1>], %5#1, @store_A [dist<3>])

Traits: HasParent

Interfaces: Symbol, SymbolUserOpInterface

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
dependences::mlir::ArrayAttrdependence array attribute
properties::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
operandsnone type

Results:

ResultDescription
resultsnone type

ssp.library (::circt::ssp::OperatorLibraryOp)

Container for operator types.

Syntax:

operation ::= `ssp.library` $body attr-dict

The operator library abstracts the characteristics of the target architecture/IR (onto which the source graph is scheduled), represented by the individual OperatorTypeOps.

Traits: HasParent, NoRegionArguments, NoTerminator, SingleBlock, SymbolTable

Interfaces: OpAsmOpInterface

ssp.operator_type (::circt::ssp::OperatorTypeOp)

Element of the target architecture/IR.

Syntax:

operation ::= `ssp.operator_type` $sym_name custom<Properties>($properties) attr-dict

This operation represents an operator type, which can be augmented with a set of problem-specific properties, and is identified through a unique name.

Example

operator_type @MemPort [latency<1>, limit<1>]

Traits: HasParent

Interfaces: Symbol

Attributes:

AttributeMLIR TypeDescription
sym_name::mlir::StringAttrstring attribute
properties::mlir::ArrayAttrarray attribute

Attribute definition

DependenceAttr

Internal representation of dependence edges.

Syntax:

!ssp.dependence<
  unsigned,   # operandIdx
  ::mlir::FlatSymbolRefAttr,   # sourceRef
  ::mlir::ArrayAttr   # properties
>

An attribute to uniformly model def-use and auxiliary dependences as well as to attach properties to them. This attribute is an implementation detail of the ssp.OperationOp and as such is supposed to be hidden by the custom parser/printer.

Parameters:

ParameterC++ typeDescription
operandIdxunsigned
sourceRef::mlir::FlatSymbolRefAttr
properties::mlir::ArrayAttr

DistanceAttr

Models the Distance property in ::circt::scheduling::CyclicProblem.

Syntax:

!ssp.dist<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

InitiationIntervalAttr

Models the InitiationInterval property in ::circt::scheduling::CyclicProblem.

Syntax:

!ssp.II<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

LatencyAttr

Models the Latency property in ::circt::scheduling::Problem.

Syntax:

!ssp.latency<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

LimitAttr

Models the Limit property in ::circt::scheduling::SharedOperatorsProblem.

Syntax:

!ssp.limit<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

LinkedOperatorTypeAttr

Models the LinkedOperatorType property in ::circt::scheduling::Problem.

Syntax:

!ssp.opr<
  ::mlir::FlatSymbolRefAttr   # value
>

Parameters:

ParameterC++ typeDescription
value::mlir::FlatSymbolRefAttr

StartTimeAttr

Models the StartTime property in ::circt::scheduling::Problem.

Syntax:

!ssp.t<
  unsigned   # value
>

Parameters:

ParameterC++ typeDescription
valueunsigned

'ssp' Dialect Docs