Skip to content

[FSM][CalyxToFSM] Should fsm.machine be IsolatedFromAbove? #10045

@TaoBi22

Description

@TaoBi22

Based on our docs, fsm.machine ops seem to be akin to instances, in that they define a structure that other ops can then instantiate. Based on this, it seems sensible to have the op be IsolatedFromAbove as other modulelike ops are, so the instances aren't implicitly sharing inputs - without this we hit some weird corner cases in our FSM work e.g., where canonicalization lifts ops out of the fsm.machine op.

I took a look at changing this over, but it seems like the blocker is CalyxToFSM, which relies on an fsm.machine op using values defined outside it. @mortbopet it looks like you wrote that pass - do you think it would be possible to avoid this deisolation? I guess maybe the most sensible ways would either be using an instance op (not sure if that works conceptually with the pass though) or somehow otherwise using the inputs of the FSM machine op to explicitly specify the values to be used (although maybe we'd end up just reinventing the InstanceOp to select the SSA values to be passed to those inputs)? Happy to sort this if either of those sound sensible!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions