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

Lower memref.reinterpret_cast to EmitC #392

Open
wants to merge 1 commit into
base: feature/fused-ops
Choose a base branch
from

Conversation

cferry-AMD
Copy link
Collaborator

No description provided.

@cferry-AMD cferry-AMD changed the title Lower reinterpret_cast to EmitC Lower memref.reinterpret_cast to EmitC Oct 31, 2024
// CHECK-LABEL: memref_reinterpret_cast
func.func @memref_reinterpret_cast(%arg: memref<2x5xi32>) -> memref<10xi32> {
// CHECK: emitc.cast %{{[^ ]*}} : !emitc.array<2x5xi32> to !emitc.array<10xi32> ref
%0 = memref.reinterpret_cast %arg to offset: [0], sizes: [10], strides: [1] : memref<2x5xi32> to memref<10xi32>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rather fold this reinterpret_cast into an equvialent collapse_shape. then lowering it. For this PR, can you come up with an example reinterpret_cast that isn't a collapse/expand shape?

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