Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Dec 20, 2023
1 parent 692d8c5 commit 9bc1cff
Show file tree
Hide file tree
Showing 432 changed files with 43,778 additions and 43,776 deletions.
1 change: 1 addition & 0 deletions python/dialects/aie.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
IntegerType,
_i32ArrayAttr,
)
from ._ods_common import _cext

# Comes from _aie
register_dialect(get_dialect_registry())
Expand Down
398 changes: 199 additions & 199 deletions reference_designs/MM_2x2/circuit_switched_version/aie.mlir

Large diffs are not rendered by default.

172 changes: 86 additions & 86 deletions reference_designs/MM_2x2/objectFifo_circuit_switched_version/aie.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -15,136 +15,136 @@
// RUN: aiecc.py %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%host_runtime_lib%/test_lib/include %extraAieCcFlags% -L%host_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf
// RUN: %run_on_board ./test.elf

AIE.device(xcvc1902) {
%t60 = AIE.tile(6, 0)
%t63 = AIE.tile(6, 3)
%t64 = AIE.tile(6, 4)
aie.device(xcvc1902) {
%t60 = aie.tile(6, 0)
%t63 = aie.tile(6, 3)
%t64 = aie.tile(6, 4)

%t70 = AIE.tile(7, 0)
%t73 = AIE.tile(7, 3)
%t74 = AIE.tile(7, 4)
%t70 = aie.tile(7, 0)
%t73 = aie.tile(7, 3)
%t74 = aie.tile(7, 4)

%t100 = AIE.tile(10, 0)
%t100 = aie.tile(10, 0)

AIE.objectfifo @of_LHS0 (%t60, {%t63, %t73}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_LHS1 (%t60, {%t64, %t74}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_RHS0 (%t70, {%t63}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_RHS1 (%t70, {%t64}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_RHS2 (%t100, {%t73}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_RHS3 (%t100, {%t74}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
aie.objectfifo @of_LHS0 (%t60, {%t63, %t73}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_LHS1 (%t60, {%t64, %t74}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_RHS0 (%t70, {%t63}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_RHS1 (%t70, {%t64}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_RHS2 (%t100, {%t73}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_RHS3 (%t100, {%t74}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>

AIE.objectfifo @of_out0 (%t64, {%t60}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_out1 (%t74, {%t60}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
aie.objectfifo @of_out0 (%t64, {%t60}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_out1 (%t74, {%t60}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>

AIE.objectfifo @of_acc0 (%t63, {%t64}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
AIE.objectfifo @of_acc1 (%t73, {%t74}, 1 : i32) : !AIE.objectfifo<memref<1024xi32>>
aie.objectfifo @of_acc0 (%t63, {%t64}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>
aie.objectfifo @of_acc1 (%t73, {%t74}, 1 : i32) : !aie.objectfifo<memref<1024xi32>>

%buffer0 = AIE.external_buffer {sym_name = "LHS_tile0"} : memref<1024 x i32> //LHS_tile0
%buffer1 = AIE.external_buffer {sym_name = "LHS_tile1"} : memref<1024 x i32> //LHS_tile1
%buffer2 = AIE.external_buffer {sym_name = "RHS_tile0"} : memref<1024 x i32> //RHS_tile0
%buffer3 = AIE.external_buffer {sym_name = "RHS_tile1"} : memref<1024 x i32> //RHS_tile1
%buffer4 = AIE.external_buffer {sym_name = "RHS_tile2"} : memref<1024 x i32> //RHS_tile2
%buffer5 = AIE.external_buffer {sym_name = "RHS_tile3"} : memref<1024 x i32> //RHS_tile3
%buffer6 = AIE.external_buffer {sym_name = "Out_tile0"} : memref<1024 x i32> //Out_tile0
%buffer7 = AIE.external_buffer {sym_name = "Out_tile1"} : memref<1024 x i32> //Out_tile1
%buffer0 = aie.external_buffer {sym_name = "LHS_tile0"} : memref<1024 x i32> //LHS_tile0
%buffer1 = aie.external_buffer {sym_name = "LHS_tile1"} : memref<1024 x i32> //LHS_tile1
%buffer2 = aie.external_buffer {sym_name = "RHS_tile0"} : memref<1024 x i32> //RHS_tile0
%buffer3 = aie.external_buffer {sym_name = "RHS_tile1"} : memref<1024 x i32> //RHS_tile1
%buffer4 = aie.external_buffer {sym_name = "RHS_tile2"} : memref<1024 x i32> //RHS_tile2
%buffer5 = aie.external_buffer {sym_name = "RHS_tile3"} : memref<1024 x i32> //RHS_tile3
%buffer6 = aie.external_buffer {sym_name = "Out_tile0"} : memref<1024 x i32> //Out_tile0
%buffer7 = aie.external_buffer {sym_name = "Out_tile1"} : memref<1024 x i32> //Out_tile1

AIE.objectfifo.register_external_buffers @of_LHS0 (%t60, {%buffer0}) : (memref<1024xi32>)
AIE.objectfifo.register_external_buffers @of_LHS1 (%t60, {%buffer1}) : (memref<1024xi32>)
AIE.objectfifo.register_external_buffers @of_out0 (%t60, {%buffer6}) : (memref<1024xi32>)
AIE.objectfifo.register_external_buffers @of_out1 (%t60, {%buffer7}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_LHS0 (%t60, {%buffer0}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_LHS1 (%t60, {%buffer1}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_out0 (%t60, {%buffer6}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_out1 (%t60, {%buffer7}) : (memref<1024xi32>)

AIE.objectfifo.register_external_buffers @of_RHS0 (%t70, {%buffer2}) : (memref<1024xi32>)
AIE.objectfifo.register_external_buffers @of_RHS1 (%t70, {%buffer3}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_RHS0 (%t70, {%buffer2}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_RHS1 (%t70, {%buffer3}) : (memref<1024xi32>)

AIE.objectfifo.register_external_buffers @of_RHS2 (%t100, {%buffer4}) : (memref<1024xi32>)
AIE.objectfifo.register_external_buffers @of_RHS3 (%t100, {%buffer5}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_RHS2 (%t100, {%buffer4}) : (memref<1024xi32>)
aie.objectfifo.register_external_buffers @of_RHS3 (%t100, {%buffer5}) : (memref<1024xi32>)

%buf63 = AIE.buffer(%t63) {sym_name = "buf63"} : memref<1024xi32> //Accumulator0
%buf73 = AIE.buffer(%t73) {sym_name = "buf73"} : memref<1024xi32> //Accumulator1
%buf63 = aie.buffer(%t63) {sym_name = "buf63"} : memref<1024xi32> //Accumulator0
%buf73 = aie.buffer(%t73) {sym_name = "buf73"} : memref<1024xi32> //Accumulator1

func.func private @extern_kernel(%A: memref<1024xi32>, %B: memref<1024xi32>, %acc: memref<1024xi32>, %C: memref<1024xi32>) -> ()

%core63 = AIE.core(%t63) {
%LHS0Subview = AIE.objectfifo.acquire @of_LHS0 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%LHS0 = AIE.objectfifo.subview.access %LHS0Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%core63 = aie.core(%t63) {
%LHS0Subview = aie.objectfifo.acquire @of_LHS0 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%LHS0 = aie.objectfifo.subview.access %LHS0Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%RHS0Subview = AIE.objectfifo.acquire @of_RHS0 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%RHS0 = AIE.objectfifo.subview.access %RHS0Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%RHS0Subview = aie.objectfifo.acquire @of_RHS0 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%RHS0 = aie.objectfifo.subview.access %RHS0Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%ACC0Subview = AIE.objectfifo.acquire @of_acc0 (Produce, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%ACC0 = AIE.objectfifo.subview.access %ACC0Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%ACC0Subview = aie.objectfifo.acquire @of_acc0 (Produce, 1) : !aie.objectfifosubview<memref<1024xi32>>
%ACC0 = aie.objectfifo.subview.access %ACC0Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

func.call @extern_kernel(%LHS0, %RHS0, %buf63, %ACC0) : (memref<1024xi32>, memref<1024xi32>, memref<1024xi32>, memref<1024xi32>) -> ()

AIE.objectfifo.release @of_LHS0 (Consume, 1)
AIE.objectfifo.release @of_RHS0 (Consume, 1)
AIE.objectfifo.release @of_acc0 (Produce, 1)
aie.objectfifo.release @of_LHS0 (Consume, 1)
aie.objectfifo.release @of_RHS0 (Consume, 1)
aie.objectfifo.release @of_acc0 (Produce, 1)

AIE.end
aie.end
} { link_with="kernel.o" }

%core64 = AIE.core(%t64) {
%LHS1Subview = AIE.objectfifo.acquire @of_LHS1 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%LHS1 = AIE.objectfifo.subview.access %LHS1Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%core64 = aie.core(%t64) {
%LHS1Subview = aie.objectfifo.acquire @of_LHS1 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%LHS1 = aie.objectfifo.subview.access %LHS1Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%RHS1Subview = AIE.objectfifo.acquire @of_RHS1 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%RHS1 = AIE.objectfifo.subview.access %RHS1Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%RHS1Subview = aie.objectfifo.acquire @of_RHS1 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%RHS1 = aie.objectfifo.subview.access %RHS1Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%ACC0Subview = AIE.objectfifo.acquire @of_acc0 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%ACC0 = AIE.objectfifo.subview.access %ACC0Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%ACC0Subview = aie.objectfifo.acquire @of_acc0 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%ACC0 = aie.objectfifo.subview.access %ACC0Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%Out0Subview = AIE.objectfifo.acquire @of_out0 (Produce, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%Out0 = AIE.objectfifo.subview.access %Out0Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%Out0Subview = aie.objectfifo.acquire @of_out0 (Produce, 1) : !aie.objectfifosubview<memref<1024xi32>>
%Out0 = aie.objectfifo.subview.access %Out0Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

func.call @extern_kernel(%LHS1, %RHS1, %ACC0, %Out0) : (memref<1024xi32>, memref<1024xi32>, memref<1024xi32>, memref<1024xi32>) -> ()

AIE.objectfifo.release @of_LHS1 (Consume, 1)
AIE.objectfifo.release @of_RHS1 (Consume, 1)
AIE.objectfifo.release @of_acc0 (Consume, 1)
AIE.objectfifo.release @of_out0 (Produce, 1)
aie.objectfifo.release @of_LHS1 (Consume, 1)
aie.objectfifo.release @of_RHS1 (Consume, 1)
aie.objectfifo.release @of_acc0 (Consume, 1)
aie.objectfifo.release @of_out0 (Produce, 1)

AIE.end
aie.end
} { link_with="kernel.o" }

%core73 = AIE.core(%t73) {
%LHS0Subview = AIE.objectfifo.acquire @of_LHS0 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%LHS0 = AIE.objectfifo.subview.access %LHS0Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%core73 = aie.core(%t73) {
%LHS0Subview = aie.objectfifo.acquire @of_LHS0 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%LHS0 = aie.objectfifo.subview.access %LHS0Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%RHS2Subview = AIE.objectfifo.acquire @of_RHS2 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%RHS2 = AIE.objectfifo.subview.access %RHS2Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%RHS2Subview = aie.objectfifo.acquire @of_RHS2 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%RHS2 = aie.objectfifo.subview.access %RHS2Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%ACC1Subview = AIE.objectfifo.acquire @of_acc1 (Produce, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%ACC1 = AIE.objectfifo.subview.access %ACC1Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%ACC1Subview = aie.objectfifo.acquire @of_acc1 (Produce, 1) : !aie.objectfifosubview<memref<1024xi32>>
%ACC1 = aie.objectfifo.subview.access %ACC1Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

func.call @extern_kernel(%LHS0, %RHS2, %buf73, %ACC1) : (memref<1024xi32>, memref<1024xi32>, memref<1024xi32>, memref<1024xi32>) -> ()

AIE.objectfifo.release @of_LHS0 (Consume, 1)
AIE.objectfifo.release @of_RHS2 (Consume, 1)
AIE.objectfifo.release @of_acc1 (Produce, 1)
aie.objectfifo.release @of_LHS0 (Consume, 1)
aie.objectfifo.release @of_RHS2 (Consume, 1)
aie.objectfifo.release @of_acc1 (Produce, 1)

AIE.end
aie.end
} { link_with="kernel.o" }

%core74 = AIE.core(%t74) {
%LHS1Subview = AIE.objectfifo.acquire @of_LHS1 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%LHS1 = AIE.objectfifo.subview.access %LHS1Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%core74 = aie.core(%t74) {
%LHS1Subview = aie.objectfifo.acquire @of_LHS1 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%LHS1 = aie.objectfifo.subview.access %LHS1Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%RHS3Subview = AIE.objectfifo.acquire @of_RHS3 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%RHS3 = AIE.objectfifo.subview.access %RHS3Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%RHS3Subview = aie.objectfifo.acquire @of_RHS3 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%RHS3 = aie.objectfifo.subview.access %RHS3Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%ACC1Subview = AIE.objectfifo.acquire @of_acc1 (Consume, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%ACC1 = AIE.objectfifo.subview.access %ACC1Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%ACC1Subview = aie.objectfifo.acquire @of_acc1 (Consume, 1) : !aie.objectfifosubview<memref<1024xi32>>
%ACC1 = aie.objectfifo.subview.access %ACC1Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

%Out1Subview = AIE.objectfifo.acquire @of_out1 (Produce, 1) : !AIE.objectfifosubview<memref<1024xi32>>
%Out1 = AIE.objectfifo.subview.access %Out1Subview[0] : !AIE.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>
%Out1Subview = aie.objectfifo.acquire @of_out1 (Produce, 1) : !aie.objectfifosubview<memref<1024xi32>>
%Out1 = aie.objectfifo.subview.access %Out1Subview[0] : !aie.objectfifosubview<memref<1024xi32>> -> memref<1024xi32>

func.call @extern_kernel(%LHS1, %RHS3, %ACC1, %Out1) : (memref<1024xi32>, memref<1024xi32>, memref<1024xi32>, memref<1024xi32>) -> ()

AIE.objectfifo.release @of_LHS1 (Consume, 1)
AIE.objectfifo.release @of_RHS3 (Consume, 1)
AIE.objectfifo.release @of_acc1 (Consume, 1)
AIE.objectfifo.release @of_out1 (Produce, 1)
aie.objectfifo.release @of_LHS1 (Consume, 1)
aie.objectfifo.release @of_RHS3 (Consume, 1)
aie.objectfifo.release @of_acc1 (Consume, 1)
aie.objectfifo.release @of_out1 (Produce, 1)

AIE.end
aie.end
} { link_with="kernel.o" }
}
Loading

0 comments on commit 9bc1cff

Please sign in to comment.