Skip to content

Allow linalg elementwise ops to accept mixed static/dynamic dimensions #99

@Balint-R

Description

@Balint-R

We should modify elemwise unary and binary to use assert_shapes_compatible instead of exactly checking whether the shapes are equal. This would allow us to output the following MLIR:

module {
  func.func public @f(%arg0: memref<?x6xi32>, %arg1: memref<?x?xi32>, %arg2: memref<7x?xi32>){
    linalg.add ins(%arg0, %arg1 : memref<?x6xi32>, memref<?x?xi32>) outs(%arg2 : memref<7x?xi32>)
    return
  }
}

Also modify some of the existing tests to check for this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsmallNot much effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions