Skip to content

Conversation

@ShangkunLi
Copy link
Collaborator

In this pr:

  1. Introduce two kinds of return ops in neura dataflow ir:

    • neura.return_void: its operand means the trigger values
    • neura.return_value: its operand means the returned values
      These two kinds of return ops are only enabled in dataflow ir. In conventional neural CDFG ir, we still use the neura.return.
  2. We create a canonicalize-return pass to mark the type (return_type = void/value) of neura.return. And

  3. We introduce some logic in the transform-ctrl-to-data-flow pass to transform the neura.return to neura.return_value/return_void

  4. A neura.yield is added at each flattened block's end to act like a terminator for the block. This is just to obey the rules in MLIR block https://mlir.llvm.org/docs/LangRef/#blocks.

TODO: Enable the interpreter for these two introduced ops. Since this pr is too large, I will make a separate pr for that.

@ShangkunLi ShangkunLi merged commit 7dacb38 into coredac:main Dec 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants