Skip to content

Commit

Permalink
Add insert-cores lit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek-Varma committed Feb 6, 2025
1 parent c53052c commit b3a365d
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,28 @@ module {
return
}
}

// -----

// CHECK-LABEL: @insert_trunci_within_core
// CHECK: scf.forall
// CHECK: amdaie.tile
// CHECK: amdaie.core
// CHECK: vector.transfer_read
// CHECK: arith.trunci
// CHECK: vector.transfer_write
// CHECK: amdaie.end
module {
func.func @insert_trunci_within_core(%arg0: memref<10x10xi32, 2 : i32>, %arg1: memref<10x10xi8, 2 : i32>) {
%cst = arith.constant 0 : i32
%c1 = arith.constant 1 : index
%c3 = arith.constant 3 : index
%c0 = arith.constant 0 : index
scf.forall (%arg3, %arg4) in (2, 2) {
%read = vector.transfer_read %arg0[%c0, %c1], %cst {in_bounds = [true, true]} : memref<10x10xi32, 2 : i32>, vector<1x1xi32>
%trunci = arith.trunci %read : vector<1x1xi32> to vector<1x1xi8>
vector.transfer_write %trunci, %arg1[%c0, %c1] {in_bounds = [true, true]} : vector<1x1xi8>, memref<10x10xi8, 2 : i32>
} {mapping = [#gpu.thread<y>, #gpu.thread<x>]}
return
}
}

0 comments on commit b3a365d

Please sign in to comment.