Skip to content

Error: 'migraphx.mlir.as.underlying.shape' op memory layout dimension 12 is not a multiple of logical dimension 5; this indicates invalid strides #2225

@pfultz2

Description

@pfultz2

Following up on #2195. So this happens with non-packed output buffers like <4x5x24xf16, 288x24x1> which happens when concatting a buffer of 4x5x24 and 4x7x24 together which has a final buffer as <4x12x24xf16, 288x24x1>. So the strides are valid. Here is the mlir module:

module {
  func.func @mlir_dot_sigmoid(%arg0: !migraphx.shaped<4x5x16xf16, 80x16x1>, %arg1: !migraphx.shaped<4x16x24xf16, 384x24x1>) -> !migraphx.shaped<4x5x24xf16, 288x24x1> attributes {arch = "gfx1201", kernel = "mixr", num_cu = 32 : i64} {
    %0 = migraphx.dot %arg0, %arg1 : <4x5x16xf16, 80x16x1>, <4x16x24xf16, 384x24x1> -> <4x5x24xf16, 120x24x1>
    %1 = migraphx.sigmoid %0 : <4x5x24xf16, 120x24x1> -> <4x5x24xf16, 288x24x1>
    return %1 : !migraphx.shaped<4x5x24xf16, 288x24x1>
  }
}

And here is the error:

Invalid MLIR created: Error: 'migraphx.mlir.as.underlying.shape' op memory layout dimension 12 is not a multiple of logical dimension 5; this indicates invalid strides
Note: see current operation: %10 = "migraphx.mlir.as.underlying.shape"(%9) : (tensor<4x5x24xf16>) -> !migraphx.shaped<4x5x24xf16, 288x24x1>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions