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

dialects: (bufferization) MaterializeInDestination wrong operands #3489

Closed
francescodaghero opened this issue Nov 20, 2024 · 1 comment · Fixed by #3495
Closed

dialects: (bufferization) MaterializeInDestination wrong operands #3489

francescodaghero opened this issue Nov 20, 2024 · 1 comment · Fixed by #3495
Assignees
Labels
dialects Changes on the dialects

Comments

@francescodaghero
Copy link
Contributor

class MaterializeInDestination(IRDLOperation):
name = "bufferization.materialize_in_destination"
T: ClassVar = VarConstraint("T", AnyTensorTypeConstr | AnyUnrankedTensorTypeConstr)
source = operand_def(T)
dest = operand_def(T)
result = result_def(T)

The MaterializeInDestinationOp in MLIR allows the dest operand to be of any shaped type (e.g. Tensor or MemRef). It does not seem the case for xDSL, as the current implementation forces TensorType for all operands.

@superlopuh superlopuh added the dialects Changes on the dialects label Nov 20, 2024
@alexarice alexarice self-assigned this Nov 20, 2024
@alexarice
Copy link
Collaborator

Working on this now but will take a little time as we currently don't have the functional-type assembly format directive and it seems necessary to be able to get the custom format correct.

EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this issue Dec 6, 2024
…#3495)

Fixes xdslproject#3489 

In order to make `materialize_in_destination` compatible with mlir, it
needs to be able to take a memref type as the destination, and have an
optional result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants