Skip to content

Support dynamic shape when lowering operation to vector #300

Open
@BRUCE11111

Description

@BRUCE11111

e.g.:

    %19 = affine.apply affine_map<(d0) -> ((d0 floordiv 64) * 64)>(%arg3)
    %20 = affine.min affine_map<(d0) -> (((d0 + 31) floordiv 64) * 64 - (d0 floordiv 64) * 64 + 64, (d0 floordiv 64) * -64 + 224)>(%arg3)
    %extracted_slice = tensor.extract_slice %arg0[%19, 0] [%20, 13] [1, 1] : tensor<224x13xbf16> to tensor<?x13xbf16>
    %extracted_slice_2 = tensor.extract_slice %1[%15, 0, 0, 0] [%17, 1, 64, 14] [1, 1, 1, 1] : tensor<4x1x64x14xbf16> to tensor<?x1x64x14xbf16>
    %pack = tensor.pack %extracted_slice padding_value(%cst : bf16) outer_dims_perm = [0, 1] inner_dims_pos = [0, 1] inner_tiles = [64, 14] into %extracted_slice_2 : tensor<?x13xbf16> -> tensor<?x1x64x14xbf16>
    %21 = tensor.empty(%18) : tensor<?x14xbf16>
    %unpack = tensor.unpack %pack outer_dims_perm = [0, 1] inner_dims_pos = [0, 1] inner_tiles = [64, 14] into %21 : tensor<?x1x64x14xbf16> -> tensor<?x14xbf16>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions