Skip to content

Commit

Permalink
Updated check messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pvasireddy-amd committed Sep 16, 2024
1 parent 22c5533 commit fc6dca2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: aie-opt --verify-diagnostics --aie-assign-buffer-addresses=basic-alloc=0 %s
// RUN: aie-opt --verify-diagnostics --aie-assign-buffer-addresses="alloc-scheme=basic-alloc" %s

module {
aie.device(npu1_2col) {
Expand Down
10 changes: 6 additions & 4 deletions test/assign-buffer-addresses/bank_aware_alloc_simple.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
//===----------------------------------------------------------------------===//

// RUN: aie-opt --aie-assign-buffer-addresses="alloc-scheme=bank-aware" %s | FileCheck %s
// CHECK: {{.*}} aie.buffer({{.*}}) {address = 16384 : i32, mem_bank = 2 : i32, sym_name = "a"} : memref<16xi8>
// CHECK: {{.*}} aie.buffer({{.*}}) {address = 1024 : i32, mem_bank = 0 : i32, sym_name = "b"} : memref<512xi32>
// CHECK: {{.*}} aie.buffer({{.*}}) {address = 8192 : i32, mem_bank = 1 : i32, sym_name = "c"} : memref<16xi16>
// CHECK: {{.*}} aie.buffer({{.*}}) {address = 1024 : i32, mem_bank = 0 : i32, sym_name = "_anonymous0"} : memref<500xi32>
// CHECK: %a = aie.buffer(%tile_3_3) {address = 3104 : i32, mem_bank = 0 : i32, sym_name = "a"} : memref<16xi8>
// CHECK: %b = aie.buffer(%tile_3_3) {address = 1024 : i32, mem_bank = 0 : i32, sym_name = "b"} : memref<512xi32>
// CHECK: %c = aie.buffer(%tile_3_3) {address = 3072 : i32, mem_bank = 0 : i32, sym_name = "c"} : memref<16xi16>
// CHECK: %_anonymous0 = aie.buffer(%tile_4_4) {address = 1024 : i32, mem_bank = 0 : i32, sym_name = "_anonymous0"} : memref<500xi32>



module @test {
aie.device(xcvc1902) {
Expand Down
19 changes: 5 additions & 14 deletions test/assign-buffer-addresses/fallback_routine_error.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,17 @@

// CHECK: %tile12 = aie.tile(1, 2)
// CHECK: ^
// CHECK: note: see current operation: %0 = "aie.tile"() <{col = 1 : i32, row = 2 : i32}> : () -> index
// CHECK: note: Current configuration of buffers in bank(s) : MemoryMap:
// CHECK: (no stack allocated)
// CHECK: bank : 0 0x0-0x1FFF
// CHECK: b : 0x0-0x1FFF (8192 bytes)
// CHECK: a : 0x0-0x1FFF (8192 bytes)
// CHECK: bank : 1 0x2000-0x3FFF
// CHECK: c : 0x2000-0x3FFF (8192 bytes)
// CHECK: b : 0x2000-0x3FFF (8192 bytes)
// CHECK: bank : 2 0x4000-0x5FFF
// CHECK: a : 0x4000-0x4FFF (4096 bytes)
// CHECK: e : 0x5000-0x5FFF (4096 bytes)
// CHECK: c : 0x4000-0x5FFF (8192 bytes)
// CHECK: bank : 3 0x6000-0x7FFF
// CHECK: d : 0x6000-0x6FFF (4096 bytes)
// CHECK: act_3_4_buff_0 : 0x7000-0x73FF (1024 bytes)
// CHECK: act_3_4_buff_1 : 0x7400-0x77FF (1024 bytes)
// CHECK: act_3_4_buff_2 : 0x7800-0x7BFF (1024 bytes)
// CHECK: act_3_4_buff_3 : 0x7C00-0x7FFF (1024 bytes)
// CHECK: e : 0x7000-0x7FFF (4096 bytes)

// CHECK: error: 'aie.tile' op allocated buffers exceeded available memory: Sequential
// CHECK: (no stack allocated)
Expand All @@ -44,16 +39,12 @@
// CHECK: a : 0x4000-0x4FFF (4096 bytes)
// CHECK: d : 0x5000-0x5FFF (4096 bytes)
// CHECK: e : 0x6000-0x6FFF (4096 bytes)
// CHECK: act_3_4_buff_0 : 0x7000-0x73FF (1024 bytes)
// CHECK: act_3_4_buff_1 : 0x7400-0x77FF (1024 bytes)
// CHECK: act_3_4_buff_2 : 0x7800-0x7BFF (1024 bytes)
// CHECK: act_3_4_buff_3 : 0x7C00-0x7FFF (1024 bytes)
// CHECK: f : 0x8000-0x81FF (512 bytes)

module @test {
aie.device(xcvc1902) {
%tile12 = aie.tile(1, 2)
%1 = aie.buffer(%tile12) { sym_name = "a" } : memref<1024xi32> //4096 bytes
%1 = aie.buffer(%tile12) { sym_name = "a" } : memref<2048xi32> //8192 bytes
%2 = aie.buffer(%tile12) { sym_name = "b" } : memref<2048xi32> //8192 bytes
%3 = aie.buffer(%tile12) { sym_name = "c" } : memref<2048xi32> //8192 bytes
%4 = aie.buffer(%tile12) { sym_name = "d" } : memref<1024xi32> //4096 bytes
Expand Down

0 comments on commit fc6dca2

Please sign in to comment.