Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLIR] one-shot-bufferize: Add bufferize-bodiless-function-results option #205

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

mgehre-amd
Copy link
Collaborator

When bufferizing a bodiless function

func.func private @foo() -> tensor<?xf32>

we currently fail with cannot bufferize bodiless function that returns a tensor.

This PR adds the option bufferize-bodiless-function-results (off by default), to allow bufferizing this into

func.func private @foo() -> memref<?xf32, strided<[?], offset: ?>>

…tion

When bufferizing a bodiless function
```
func.func private @foo() -> tensor<?xf32>
```
we currently fail with `cannot bufferize bodiless function that returns a tensor`.

This PR adds the option `bufferize-bodiless-function-results` (off by default),
to allow bufferizing this into
```
func.func private @foo() -> memref<?xf32, strided<[?], offset: ?>>
```
Copy link

@TinaAMD TinaAMD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mgehre-amd mgehre-amd merged commit 626866d into release_rai_1_2 Jun 21, 2024
4 checks passed
@mgehre-amd mgehre-amd deleted the matthias.bufferize_external_func branch June 21, 2024 11:48
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.

3 participants