PennyLaneAI / PennyLaneAI/catalyst

Can we use `--buffer-results-to-out-params`?

Open
#764 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compiler enhancement question
Dominant language
Python
Stars
234
Forks
84
Avg merge
2d 15h
Merged PRs (30d)
66

Description

--buffer-results-to-out-params is a pass in upstream MLIR that will modify functions that return memrefs to functions that receive memrefs parameters to denote the return values. In Catalyst we use this calling convention, but do not use this pass. Could it be possible to use this pass instead of writing custom transformations to achieve the same result?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing Catalyst's existing custom transformations with upstream MLIR's --buffer-results-to-out-params pass and its documented calling convention. Determine whether the pass can replace the current transformations without changing the memref-return convention; done means a validated implementation decision backed by compiler tests.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.