Skip to content

Commit

Permalink
Removing empty padDims
Browse files Browse the repository at this point in the history
  • Loading branch information
pvasireddy-amd committed Nov 12, 2024
1 parent 270009a commit cbab8e9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions test/python/aie_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def externalBufferOp():
# CHECK-LABEL: objFifo
# CHECK: %[[VAL0:.*]] = aie.tile(6, 6)
# CHECK: %[[VAL1:.*]] = aie.tile(2, 2)
# CHECK: aie.objectfifo @of0(%[[VAL0]] dimensionsToStream [<size = 1, stride = 2>], {%[[VAL1]] dimensionsFromStream [<size = 1, stride = 2>]}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>, via_DMA = true} : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @of0(%[[VAL0]] dimensionsToStream [<size = 1, stride = 2>], {%[[VAL1]] dimensionsFromStream [<size = 1, stride = 2>]}, 2 : i32) {via_DMA = true} : !aie.objectfifo<memref<12xf16>>
@construct_and_print_module
def objFifo():
dev = Device(AIEDevice.xcvc1902)
Expand All @@ -126,8 +126,8 @@ def objFifo():
# CHECK: %[[VAL_0:.*]] = aie.tile(6, 3)
# CHECK: %[[VAL_1:.*]] = aie.tile(6, 1)
# CHECK: %[[VAL_2:.*]] = aie.tile(7, 3)
# CHECK: aie.objectfifo @[[VAL_3:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @[[VAL_4:.*]](%[[VAL_1]], {%[[VAL_2]]}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @[[VAL_3:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @[[VAL_4:.*]](%[[VAL_1]], {%[[VAL_2]]}, 2 : i32) : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo.link [@[[VAL_3]]] -> [@[[VAL_4]]]([] [])
@construct_and_print_module
def objFifoLink():
Expand All @@ -146,7 +146,7 @@ def objFifoLink():
# CHECK-LABEL: objFifoAcquire
# CHECK: %[[VAL_0:.*]] = aie.tile(6, 6)
# CHECK: %[[VAL_1:.*]] = aie.tile(2, 2)
# CHECK: aie.objectfifo @[[VAL_2:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @[[VAL_2:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) : !aie.objectfifo<memref<12xf16>>
# CHECK: %[[VAL_3:.*]] = aie.objectfifo.acquire @[[VAL_2]](Consume, 1) : !aie.objectfifosubview<memref<12xf16>>
@construct_and_print_module
def objFifoAcquire():
Expand All @@ -166,7 +166,7 @@ def objFifoAcquire():
# CHECK-LABEL: objFifoSubviewAccess
# CHECK: %[[VAL_0:.*]] = aie.tile(6, 6)
# CHECK: %[[VAL_1:.*]] = aie.tile(2, 2)
# CHECK: aie.objectfifo @[[VAL_2:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @[[VAL_2:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) : !aie.objectfifo<memref<12xf16>>
# CHECK: %[[VAL_3:.*]] = aie.objectfifo.acquire @[[VAL_2]](Consume, 1) : !aie.objectfifosubview<memref<12xf16>>
# CHECK: %[[VAL_4:.*]] = aie.objectfifo.subview.access %[[VAL_3]][0] : !aie.objectfifosubview<memref<12xf16>> -> memref<12xf16>
@construct_and_print_module
Expand All @@ -189,7 +189,7 @@ def objFifoSubviewAccess():
# CHECK-LABEL: objFifoRelease
# CHECK: %[[VAL_0:.*]] = aie.tile(6, 6)
# CHECK: %[[VAL_1:.*]] = aie.tile(2, 2)
# CHECK: aie.objectfifo @[[VAL_2:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo @[[VAL_2:.*]](%[[VAL_0]], {%[[VAL_1]]}, 2 : i32) : !aie.objectfifo<memref<12xf16>>
# CHECK: aie.objectfifo.release @[[VAL_2]](Produce, 1)
@construct_and_print_module
def objFifoRelease():
Expand Down
4 changes: 2 additions & 2 deletions test/python/code_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
# CHECK: %tile_0_2 = aie.tile(0, 2)
# CHECK: %tile_1_2 = aie.tile(1, 2)
# CHECK: %tile_3_3 = aie.tile(3, 3)
# CHECK: aie.objectfifo @of0(%tile_0_2, {%tile_1_2}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_1_2, {%tile_3_3}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<8x8xi32>>
# CHECK: aie.objectfifo @of0(%tile_0_2, {%tile_1_2}, 2 : i32) : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_1_2, {%tile_3_3}, 2 : i32) : !aie.objectfifo<memref<8x8xi32>>
# CHECK: aie.objectfifo.link [@of0] -> [@of1]([] [])
# CHECK: %core_3_3 = aie.core(%tile_3_3) {
# CHECK: %c0 = arith.constant 0 : index
Expand Down
4 changes: 2 additions & 2 deletions test/python/core_ext_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
# CHECK: %tile_0_2 = aie.tile(0, 2)
# CHECK: %tile_1_2 = aie.tile(1, 2)
# CHECK: %tile_3_3 = aie.tile(3, 3)
# CHECK: aie.objectfifo @of0(%tile_0_2, {%tile_1_2}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_1_2, {%tile_3_3}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<8x8xi32>>
# CHECK: aie.objectfifo @of0(%tile_0_2, {%tile_1_2}, 2 : i32) : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_1_2, {%tile_3_3}, 2 : i32) : !aie.objectfifo<memref<8x8xi32>>
# CHECK: aie.objectfifo.link [@of0] -> [@of1]([] [])
# CHECK: %core_3_3 = aie.core(%tile_3_3) {
# CHECK: %c0 = arith.constant 0 : index
Expand Down
6 changes: 3 additions & 3 deletions test/python/objFifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
# CHECK: %tile_0_1 = aie.tile(0, 1)
# CHECK: %tile_1_2 = aie.tile(1, 2)
# CHECK: %tile_1_3 = aie.tile(1, 3)
# CHECK: aie.objectfifo @of0(%tile_0_0, {%tile_1_2}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_0_1, {%tile_1_2}, 2 : i32) {memtile_repeat = 4 : i32, padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of2(%tile_1_2, {%tile_1_3}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>, via_shared_mem = 1 : i32} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of0(%tile_0_0, {%tile_1_2}, 2 : i32) : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_0_1, {%tile_1_2}, 2 : i32) {memtile_repeat = 4 : i32} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of2(%tile_1_2, {%tile_1_3}, 2 : i32) {via_shared_mem = 1 : i32} : !aie.objectfifo<memref<256xi32>>
# CHECK: %core_1_2 = aie.core(%tile_1_2) {
# CHECK: %0 = aie.objectfifo.acquire @of0(Consume, 1) : !aie.objectfifosubview<memref<256xi32>>
# CHECK: %1 = aie.objectfifo.subview.access %0[0] : !aie.objectfifosubview<memref<256xi32>> -> memref<256xi32>
Expand Down
12 changes: 6 additions & 6 deletions test/python/objFifo_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
# CHECK: %tile_1_1 = aie.tile(1, 1)
# CHECK: %tile_2_2 = aie.tile(2, 2)
# CHECK: %tile_2_3 = aie.tile(2, 3)
# CHECK: aie.objectfifo @of0(%tile_0_0, {%tile_1_1}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_1_1, {%tile_2_2, %tile_2_3}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<64xi32>>
# CHECK: aie.objectfifo @of0(%tile_0_0, {%tile_1_1}, 2 : i32) : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of1(%tile_1_1, {%tile_2_2, %tile_2_3}, 2 : i32) : !aie.objectfifo<memref<64xi32>>
# CHECK: aie.objectfifo.link [@of0] -> [@of1]([] [])
# CHECK: aie.objectfifo @of2(%tile_1_1 dimensionsToStream [<size = 1, stride = 2>], {%tile_2_2 dimensionsFromStream [<size = 1, stride = 2>], %tile_2_3 dimensionsFromStream [<size = 1, stride = 2>]}, [2 : i32, 2 : i32, 7 : i32]) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xui8>>
# CHECK: aie.objectfifo @of3(%tile_0_0, {%tile_1_1}, 1 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of4(%tile_1_1, {%tile_2_2}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<64xi32>>
# CHECK: aie.objectfifo @of5(%tile_1_1, {%tile_2_3}, 2 : i32) {padDimensions = #aie<bd_pad_layout_array[]>} : !aie.objectfifo<memref<64xi32>>
# CHECK: aie.objectfifo @of2(%tile_1_1 dimensionsToStream [<size = 1, stride = 2>], {%tile_2_2 dimensionsFromStream [<size = 1, stride = 2>], %tile_2_3 dimensionsFromStream [<size = 1, stride = 2>]}, [2 : i32, 2 : i32, 7 : i32]) : !aie.objectfifo<memref<256xui8>>
# CHECK: aie.objectfifo @of3(%tile_0_0, {%tile_1_1}, 1 : i32) : !aie.objectfifo<memref<256xi32>>
# CHECK: aie.objectfifo @of4(%tile_1_1, {%tile_2_2}, 2 : i32) : !aie.objectfifo<memref<64xi32>>
# CHECK: aie.objectfifo @of5(%tile_1_1, {%tile_2_3}, 2 : i32) : !aie.objectfifo<memref<64xi32>>
# CHECK: aie.objectfifo.link [@of3] -> [@of4, @of5]([] [0, 128])
# CHECK: }
# CHECK: }
Expand Down

0 comments on commit cbab8e9

Please sign in to comment.