fhelium.compile.passes.fusion
Group compatible pure elementwise operations into visible fusion regions.
FuseOperationsPass
class View source
python
FuseOperationsPass(implementations: Sequence[FusionImplementation], min_ops: int = 2, name: str = 'fuse-operations')1
Select contiguous SSA regions using caller-supplied Backend support.
Implementations own operation, resource and layout admissibility. The pass grows a window while at least one supplied implementation accepts it, then selects the first matching implementation in caller order. An incompatible operation ends the current window without discarding compatible operations on either side. Recorded implementation assignments remain barriers, including assignments on plumbing operations.
Attributes
| Name | Type | Default/value |
|---|---|---|
implementations | Sequence[FusionImplementation] | |
min_ops | int | 2 |
name | str | 'fuse-operations' |
run
method
python
def run(compilation: 'Compilation') -> PassResult: ...1