Skip to content

Commit

Permalink
[VectorExt] Fix to_layout op (iree-org#18621)
Browse files Browse the repository at this point in the history
The layout attr directly before `: vector<...>` leads to ambiguous parsing when attributes are printed inline. This PR wraps the attr in parens, fixes tests, and adds a test to verify the inline layout attr can be parsed.

Closes iree-org#18612
  • Loading branch information
IanWood1 authored Sep 27, 2024
1 parent 2e382a7 commit 66bf9de
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
>

func.func @contract_to_mfma_32x32x8_mm(%a : vector<32x8xf16>, %b : vector<8x32xf16>, %c : vector<32x32xf32>) -> vector<32x32xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<32x8xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<8x32xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<32x32xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<32x8xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<8x32xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<32x32xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -54,7 +54,7 @@ func.func @contract_to_mfma_32x32x8_mm(%a : vector<32x8xf16>, %b : vector<8x32xf
iree.amdgpu.mma = #iree_gpu.mma_layout<MFMA_F32_32x32x8_F16>
} %A, %B, %C : vector<32x8xf16>, vector<8x32xf16> into vector<32x32xf32>

%O = iree_vector_ext.to_layout %output to #layout_c : vector<32x32xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_c) : vector<32x32xf32>
return %O : vector<32x32xf32>
}

Expand Down Expand Up @@ -120,9 +120,9 @@ builtin.module attributes { transform.with_named_sequence } {
// C: shape = 16x16, layout = layoutB

func.func @contract_to_mfma_16x16x16_mm(%a : vector<16x16xf16>, %b : vector<16x16xf16>, %c : vector<16x16xf32>) -> vector<16x16xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<16x16xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<16x16xf16>
%C = iree_vector_ext.to_layout %c to #layout_b : vector<16x16xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<16x16xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<16x16xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_b) : vector<16x16xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -131,7 +131,7 @@ func.func @contract_to_mfma_16x16x16_mm(%a : vector<16x16xf16>, %b : vector<16x1
iree.amdgpu.mma = #iree_gpu.mma_layout<MFMA_F32_16x16x16_F16>
} %A, %B, %C : vector<16x16xf16>, vector<16x16xf16> into vector<16x16xf32>

%O = iree_vector_ext.to_layout %output to #layout_b : vector<16x16xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_b) : vector<16x16xf32>
return %O : vector<16x16xf32>
}

Expand Down Expand Up @@ -208,9 +208,9 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @contract_to_mfma_32x32x8_mm_mnbatch(%a : vector<64x8xf16>, %b : vector<8x32xf16>, %c : vector<64x32xf32>) -> vector<64x32xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<64x8xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<8x32xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<64x32xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<64x8xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<8x32xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<64x32xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -219,7 +219,7 @@ func.func @contract_to_mfma_32x32x8_mm_mnbatch(%a : vector<64x8xf16>, %b : vecto
iree.amdgpu.mma = #iree_gpu.mma_layout<MFMA_F32_32x32x8_F16>
} %A, %B, %C : vector<64x8xf16>, vector<8x32xf16> into vector<64x32xf32>

%O = iree_vector_ext.to_layout %output to #layout_c : vector<64x32xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_c) : vector<64x32xf32>
return %O : vector<64x32xf32>
}

Expand Down Expand Up @@ -297,9 +297,9 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @contract_to_mfma_32x32x8_mm_kbatch(%a : vector<32x16xf16>, %b : vector<16x32xf16>, %c : vector<32x32xf32>) -> vector<32x32xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<32x16xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<16x32xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<32x32xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<32x16xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<16x32xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<32x32xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -308,7 +308,7 @@ func.func @contract_to_mfma_32x32x8_mm_kbatch(%a : vector<32x16xf16>, %b : vecto
iree.amdgpu.mma = #iree_gpu.mma_layout<MFMA_F32_32x32x8_F16>
} %A, %B, %C : vector<32x16xf16>, vector<16x32xf16> into vector<32x32xf32>

%O = iree_vector_ext.to_layout %output to #layout_c : vector<32x32xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_c) : vector<32x32xf32>
return %O : vector<32x32xf32>
}

Expand Down Expand Up @@ -380,9 +380,9 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @contract_to_mfma_32x32x8_mm_mnbatch_order(%a : vector<64x8xf16>, %b : vector<8x96xf16>, %c : vector<64x96xf32>) -> vector<64x96xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<64x8xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<8x96xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<64x96xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<64x8xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<8x96xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<64x96xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -391,7 +391,7 @@ func.func @contract_to_mfma_32x32x8_mm_mnbatch_order(%a : vector<64x8xf16>, %b :
iree.amdgpu.mma = #iree_gpu.mma_layout<MFMA_F32_32x32x8_F16>
} %A, %B, %C : vector<64x8xf16>, vector<8x96xf16> into vector<64x96xf32>

%O = iree_vector_ext.to_layout %output to #layout_c : vector<64x96xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_c) : vector<64x96xf32>
return %O : vector<64x96xf32>
}

Expand Down Expand Up @@ -471,9 +471,9 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @contract_to_mfma_32x32x8_mmt(%a : vector<32x8xf16>, %b : vector<64x8xf16>, %c : vector<32x64xf32>) -> vector<32x64xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<32x8xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<64x8xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<32x64xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<32x8xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<64x8xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<32x64xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -482,7 +482,7 @@ func.func @contract_to_mfma_32x32x8_mmt(%a : vector<32x8xf16>, %b : vector<64x8x
iree.amdgpu.mma = #iree_gpu.mma_layout<MFMA_F32_32x32x8_F16>
} %A, %B, %C : vector<32x8xf16>, vector<64x8xf16> into vector<32x64xf32>

%O = iree_vector_ext.to_layout %output to #layout_c : vector<32x64xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_c) : vector<32x64xf32>
return %O : vector<32x64xf32>
}

Expand Down Expand Up @@ -550,9 +550,9 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @contract_to_wmma_16x16x16_mm(%a : vector<16x16xf16>, %b : vector<16x16xf16>, %c : vector<16x16xf32>) -> vector<16x16xf32> {
%A = iree_vector_ext.to_layout %a to #layout_a : vector<16x16xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<16x16xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<16x16xf32>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<16x16xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<16x16xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<16x16xf32>

%output = vector.contract {
indexing_maps = [#map1, #map2, #map3],
Expand All @@ -561,7 +561,7 @@ func.func @contract_to_wmma_16x16x16_mm(%a : vector<16x16xf16>, %b : vector<16x1
iree.amdgpu.mma = #iree_gpu.mma_layout<WMMA_F32_16x16x16_F16>
} %A, %B, %C : vector<16x16xf16>, vector<16x16xf16> into vector<16x16xf32>

%O = iree_vector_ext.to_layout %output to #layout_c : vector<16x16xf32>
%O = iree_vector_ext.to_layout %output to layout(#layout_c) : vector<16x16xf32>
return %O : vector<16x16xf32>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func.func @distribute_transfer_read_col_major(%arg0: memref<32x32xf16>) -> vecto
%cst = arith.constant 0.0 : f16
%root = vector.transfer_read %arg0[%c0, %c0], %cst {in_bounds = [true, true]}
: memref<32x32xf16>, vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout_col_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_col_major) : vector<16x16xf16>
func.return %rootl : vector<16x16xf16>
}

Expand Down Expand Up @@ -66,7 +66,7 @@ func.func @distribute_transfer_read_row_major_with_nontrivial_index(%a: index, %
{in_bounds = [true, true],
permutation_map = affine_map<(d0, d1, d2, d3) -> (d2, d3)>}
: memref<32x32x32x32xf16>, vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout_row_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_row_major) : vector<16x16xf16>
func.return %rootl : vector<16x16xf16>
}

Expand Down Expand Up @@ -109,7 +109,7 @@ func.func @distribute_transfer_read_col_major_with_broadcast(%a: index, %b: inde
{in_bounds = [true, true],
permutation_map = affine_map<(d0, d1, d2, d3) -> (0, 0)>}
: memref<32x32x32x32xf16>, vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout_col_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_col_major) : vector<16x16xf16>
func.return %rootl : vector<16x16xf16>
}

Expand Down Expand Up @@ -155,7 +155,7 @@ func.func @distribute_transfer_read_row_major_transpose(%a: index, %b: index, %a
{in_bounds = [true, true],
permutation_map = affine_map<(d0, d1, d2, d3) -> (d3, d2)>}
: memref<32x32x32x32xf16>, vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout_row_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_row_major) : vector<16x16xf16>
func.return %rootl : vector<16x16xf16>
}

Expand Down Expand Up @@ -202,7 +202,7 @@ func.func @distribute_transfer_read_col_major_transpose(%a: index, %b: index, %a
{in_bounds = [true, true],
permutation_map = affine_map<(d0, d1, d2, d3) -> (d3, d2)>}
: memref<32x32x32x32xf16>, vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout_col_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_col_major) : vector<16x16xf16>
func.return %rootl : vector<16x16xf16>
}

Expand Down Expand Up @@ -237,7 +237,7 @@ func.func @distribute_transfer_read_row_major_with_permutations(%a: index, %b: i
{in_bounds = [true, true, true, true],
permutation_map = affine_map<(d0, d1, d2, d3) -> (d0, d3, 0, d1)>}
: memref<32x32x32x32xf16>, vector<21x15x8x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout : vector<21x15x8x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout) : vector<21x15x8x16xf16>
func.return %rootl : vector<21x15x8x16xf16>
}

Expand Down Expand Up @@ -276,7 +276,7 @@ func.func @distribute_transfer_read_broadcast(%arg0: memref<32x32xf16>) -> vecto
%cst = arith.constant 0.0 : f16
%root = vector.transfer_read %arg0[%c0, %c0], %cst
{in_bounds = [true]} : memref<32x32xf16>, vector<16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout : vector<16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout) : vector<16xf16>
func.return %rootl : vector<16xf16>
}

Expand Down Expand Up @@ -313,7 +313,7 @@ func.func @distribute_transfer_read_broadcast2(%arg0: memref<32x128xf16>) -> vec
%cst = arith.constant 0.0 : f16
%root = vector.transfer_read %arg0[%c0, %c0], %cst
{in_bounds = [true]} : memref<32x128xf16>, vector<128xf16>
%rootl = iree_vector_ext.to_layout %root to #layout : vector<128xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout) : vector<128xf16>
func.return %rootl : vector<128xf16>
}

Expand Down Expand Up @@ -348,7 +348,7 @@ builtin.module attributes { transform.with_named_sequence } {
// CHECK-LABEL: @distribute_transfer_write_row_major
func.func @distribute_transfer_write_row_major(%root: vector<16x16xf16>, %alloc: memref<64x64xf16>) {
%c0 = arith.constant 0 : index
%rootl = iree_vector_ext.to_layout %root to #layout_row_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_row_major) : vector<16x16xf16>
vector.transfer_write %rootl, %alloc[%c0, %c0]
{in_bounds = [true, true]}
: vector<16x16xf16>, memref<64x64xf16>
Expand Down Expand Up @@ -395,7 +395,7 @@ builtin.module attributes { transform.with_named_sequence } {
// CHECK-LABEL: @distribute_transfer_write_col_major
func.func @distribute_transfer_write_col_major(%root: vector<16x16xf16>, %alloc: memref<64x64xf16>) {
%c0 = arith.constant 0 : index
%rootl = iree_vector_ext.to_layout %root to #layout_col_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_col_major) : vector<16x16xf16>
vector.transfer_write %rootl, %alloc[%c0, %c0]
{in_bounds = [true, true]}
: vector<16x16xf16>, memref<64x64xf16>
Expand Down Expand Up @@ -439,7 +439,7 @@ builtin.module attributes { transform.with_named_sequence } {

func.func @distribute_transfer_write_row_major_with_nontrivial_index(%root: vector<16x16xf16>, %a: index, %b: index, %alloc: memref<32x32x32x32xf16>) {
%c0 = arith.constant 0 : index
%rootl = iree_vector_ext.to_layout %root to #layout_row_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_row_major) : vector<16x16xf16>
vector.transfer_write %rootl, %alloc[%c0, %c0, %a, %b]
{in_bounds = [true, true],
permutation_map = affine_map<(d0, d1, d2, d3) -> (d3, d2)>}
Expand Down Expand Up @@ -494,7 +494,7 @@ func.func @distribute_transfer_read_write(%a: index, %b: index,
permutation_map = affine_map<(d0, d1, d2, d3) -> (d2, d3)>}
: memref<32x32x32x32xf16>, vector<16x16xf16>

%rootl = iree_vector_ext.to_layout %root to #layout_row_major : vector<16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout_row_major) : vector<16x16xf16>

vector.transfer_write %rootl, %arg1[%c0, %c0, %a, %b]
{in_bounds = [true, true],
Expand Down Expand Up @@ -608,9 +608,9 @@ func.func @mfma_64x128x8_read(%mem: memref<128x8xf16>,
{in_bounds = [true, true]}
: memref<128x64xf16>, vector<128x64xf16>

%A = iree_vector_ext.to_layout %a to #layout_a : vector<128x8xf16>
%B = iree_vector_ext.to_layout %b to #layout_b : vector<8x64xf16>
%C = iree_vector_ext.to_layout %c to #layout_c : vector<128x64xf16>
%A = iree_vector_ext.to_layout %a to layout(#layout_a) : vector<128x8xf16>
%B = iree_vector_ext.to_layout %b to layout(#layout_b) : vector<8x64xf16>
%C = iree_vector_ext.to_layout %c to layout(#layout_c) : vector<128x64xf16>

return %A, %B, %C : vector<128x8xf16>, vector<8x64xf16>, vector<128x64xf16>
}
Expand Down Expand Up @@ -645,7 +645,7 @@ func.func @transposed_read_64x8(%mem: memref<8x64xf16>)
%read = vector.transfer_read %mem[%c0, %c0], %cst
{in_bounds = [true, true], permutation_map = affine_map<(d0, d1) -> (d1, d0)>}
: memref<8x64xf16>, vector<64x8xf16>
%readl = iree_vector_ext.to_layout %read to #layout : vector<64x8xf16>
%readl = iree_vector_ext.to_layout %read to layout(#layout) : vector<64x8xf16>

return %readl : vector<64x8xf16>
}
Expand Down Expand Up @@ -683,7 +683,7 @@ builtin.module attributes { transform.with_named_sequence } {
func.func @broadcast(%src: vector<128xf16>) -> (vector<64x128xf16>) {
%bcast = vector.broadcast %src
: vector<128xf16> to vector<64x128xf16>
%bcastl = iree_vector_ext.to_layout %bcast to #layout : vector<64x128xf16>
%bcastl = iree_vector_ext.to_layout %bcast to layout(#layout) : vector<64x128xf16>
return %bcastl : vector<64x128xf16>
}

Expand Down Expand Up @@ -727,7 +727,7 @@ builtin.module attributes { transform.with_named_sequence } {
func.func @broadcast(%src: vector<64xf16>) -> (vector<32x256x64xf16>) {
%bcast = vector.broadcast %src
: vector<64xf16> to vector<32x256x64xf16>
%bcastl = iree_vector_ext.to_layout %bcast to #layout : vector<32x256x64xf16>
%bcastl = iree_vector_ext.to_layout %bcast to layout(#layout) : vector<32x256x64xf16>
return %bcastl : vector<32x256x64xf16>
}

Expand Down Expand Up @@ -764,7 +764,7 @@ builtin.module attributes { transform.with_named_sequence } {

func.func @scalar_broadcast(%src: f16) -> (vector<32x256x64xf16>) {
%bcast = vector.broadcast %src : f16 to vector<32x256x64xf16>
%bcastl = iree_vector_ext.to_layout %bcast to #layout : vector<32x256x64xf16>
%bcastl = iree_vector_ext.to_layout %bcast to layout(#layout) : vector<32x256x64xf16>
return %bcastl : vector<32x256x64xf16>
}

Expand Down Expand Up @@ -796,7 +796,7 @@ builtin.module attributes { transform.with_named_sequence } {
func.func @transpose(%src: vector<256x64xf16>) -> (vector<64x256xf16>) {
%transp = vector.transpose %src, [1, 0]
: vector<256x64xf16> to vector<64x256xf16>
%transpl = iree_vector_ext.to_layout %transp to #layout : vector<64x256xf16>
%transpl = iree_vector_ext.to_layout %transp to layout(#layout) : vector<64x256xf16>
%sqrt = math.sqrt %transpl : vector<64x256xf16>
return %sqrt : vector<64x256xf16>
}
Expand Down Expand Up @@ -828,7 +828,7 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @transpose(%src: vector<64x256xf16>) -> (vector<256x64xf16>) {
%srcl = iree_vector_ext.to_layout %src to #layout : vector<64x256xf16>
%srcl = iree_vector_ext.to_layout %src to layout(#layout) : vector<64x256xf16>
%transp = vector.transpose %srcl, [1, 0]
: vector<64x256xf16> to vector<256x64xf16>
%sqrt = math.sqrt %transp : vector<256x64xf16>
Expand Down Expand Up @@ -879,7 +879,7 @@ func.func @transpose_3d(%arr: memref<32x32x32xf16>) -> () {
%root = vector.transfer_read %arr[%c0, %c0, %c0], %cst_0 {
in_bounds = [true, true, true]
} : memref<32x32x32xf16>, vector<32x16x16xf16>
%rootl = iree_vector_ext.to_layout %root to #layout : vector<32x16x16xf16>
%rootl = iree_vector_ext.to_layout %root to layout(#layout) : vector<32x16x16xf16>
%t = vector.transpose %rootl, [1, 2, 0] : vector<32x16x16xf16> to vector<16x16x32xf16>
vector.transfer_write %t, %arr[%c0, %c0, %c0] {in_bounds = [true, true, true]} : vector<16x16x32xf16>, memref<32x32x32xf16>
func.return
Expand Down Expand Up @@ -949,7 +949,7 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @mfma_16x16x16_out_reduced_dim1(%arg0: vector<32x32xf32>, %arg1: vector<32xf32>) -> vector<32xf32> {
%arg0l = iree_vector_ext.to_layout %arg0 to #nested : vector<32x32xf32>
%arg0l = iree_vector_ext.to_layout %arg0 to layout(#nested) : vector<32x32xf32>
%0 = vector.multi_reduction <maximumf>, %arg0l, %arg1 [1] : vector<32x32xf32> to vector<32xf32>
return %0 : vector<32xf32>
}
Expand Down Expand Up @@ -992,7 +992,7 @@ builtin.module attributes { transform.with_named_sequence } {
>

func.func @mfma_32x32x8_out_reduced_dim1(%arg0: vector<32x32xf32>, %arg1: vector<32xf32>) -> vector<32xf32> {
%arg0l = iree_vector_ext.to_layout %arg0 to #nested : vector<32x32xf32>
%arg0l = iree_vector_ext.to_layout %arg0 to layout(#nested) : vector<32x32xf32>
%0 = vector.multi_reduction <maximumf>, %arg0l, %arg1 [1] : vector<32x32xf32> to vector<32xf32>
return %0 : vector<32xf32>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>

func.func @test(%vector: vector<16x16xf16>) -> vector<16x16xf16> {
%out = iree_vector_ext.to_layout %vector to #layout {shared_memory_conversion} : vector<16x16xf16>
%out = iree_vector_ext.to_layout %vector to layout(#layout) {shared_memory_conversion} : vector<16x16xf16>
return %out : vector<16x16xf16>
}

Expand Down
Loading

0 comments on commit 66bf9de

Please sign in to comment.