Skip to content

'dialects.dataflow' Submodule

Introduction

from streamtensor.dialects import dataflow

TaskGraph(arg0)

__getitem__(arg0)

getitem(self: _dataflow_dialect.TaskGraph, arg0: MlirOperation) -> Optional[_dataflow_dialect.TaskGraphNode]

__iter__()

iter(self: _dataflow_dialect.TaskGraph) -> _dataflow_dialect.TaskGraph

__next__()

next(self: _dataflow_dialect.TaskGraph) -> _dataflow_dialect.TaskGraphNode

TaskGraphEdge(*args, **kwargs)

TaskGraphNode(*args, **kwargs)

children()

children(self: _dataflow_dialect.TaskGraphNode) -> _dataflow_dialect.TaskGraphNodeChildrenIterator

in_edges()

in_edges(self: _dataflow_dialect.TaskGraphNode) -> _dataflow_dialect.TaskGraphNodeInEdgesIterator

out_edges()

out_edges(self: _dataflow_dialect.TaskGraphNode) -> _dataflow_dialect.TaskGraphNodeOutEdgesIterator

TaskGraphNodeChildrenIterator(*args, **kwargs)

__iter__()

iter(self: _dataflow_dialect.TaskGraphNodeChildrenIterator) -> _dataflow_dialect.TaskGraphNodeChildrenIterator

__next__()

next(self: _dataflow_dialect.TaskGraphNodeChildrenIterator) -> PyTaskGraphNode

TaskGraphNodeInEdgesIterator(*args, **kwargs)

__iter__()

iter(self: _dataflow_dialect.TaskGraphNodeInEdgesIterator) -> _dataflow_dialect.TaskGraphNodeInEdgesIterator

__next__()

next(self: _dataflow_dialect.TaskGraphNodeInEdgesIterator) -> _dataflow_dialect.TaskGraphEdge

TaskGraphNodeOutEdgesIterator(*args, **kwargs)

__iter__()

iter(self: _dataflow_dialect.TaskGraphNodeOutEdgesIterator) -> _dataflow_dialect.TaskGraphNodeOutEdgesIterator

__next__()

next(self: _dataflow_dialect.TaskGraphNodeOutEdgesIterator) -> _dataflow_dialect.TaskGraphEdge

get_children(task_op)

get_children(task_op: MlirOperation) -> List[MlirOperation]

Gets the children of the task.

Parameters:

Name Type Description Default
task_op MlirOperation

The dataflow.task op.

required

Returns:

Type Description
list[MlirOperation]

A list of MlirOperation representing the children of the task.

get_iter_trip_counts(task_op)

get_iter_trip_counts(task_op: MlirOperation) -> List[int]

Gets the iteration loop trip counts of the task.

Parameters:

Name Type Description Default
task_op MlirOperation

The dataflow.task op.

required

Returns:

Type Description
list[int]

A list of int representing the iteration loop trip counts of the task.

get_live_ins(task_op)

get_live_ins(task_op: MlirOperation) -> List[MlirValue]

Gets the live-in values of the task.

Parameters:

Name Type Description Default
task_op MlirOperation

The dataflow.task op.

required

Returns:

Type Description
list[MlirValue]

A list of MlirValue representing the live-in values of the task.

get_parent_task_or_func(op)

get_parent_task_or_func(op: MlirOperation) -> Optional[MlirOperation]

Gets the parent task or function operation.

Parameters:

Name Type Description Default
op MlirOperation

The MlirOperation for which to find the parent task or function.

required

Returns:

Type Description
MlirOperation | None

The parent MlirOperation of the given op.

get_reduced_shape_and_vec_shape(source_itensor_type, result_itensor_type)

get_reduced_shape_and_vec_shape(source_itensor_type: MlirType, result_itensor_type: MlirType) -> Tuple[List[int], List[int]]

Gets the reduced shape and vectorized shape of the tensor reduction.

Parameters:

Name Type Description Default
source_itensor_type MlirType

The ITensorType of the producer.

required
result_itensor_type MlirType

The ITensorType of the consumer.

required

Returns:

Type Description
tuple[list[int], list[int]]

A pair of lists of int representing the reduced shape and vectorized shape.

get_tied_yielded_itensor(kernel_result)

get_tied_yielded_itensor(kernel_result: MlirValue) -> MlirValue

Gets the tied yielded ITensor of the kernel result.

Parameters:

Name Type Description Default
kernel_result MlirValue

The MlirValue of the dataflow.kernel result.

required

Returns:

Type Description
MlirValue

The MlirValue of the tied yielded ITensor of the kernel result.

is_leaf_task(task_op)

is_leaf_task(task_op: MlirOperation) -> bool

Checks if the task is a leaf task.

Parameters:

Name Type Description Default
task_op MlirOperation

The dataflow.task op.

required

Returns:

Type Description
bool

True if the task is a leaf task, False otherwise.