Skip to content

Commit

Permalink
Add flag where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
abisca committed Apr 24, 2024
1 parent cca86ff commit 11a4adc
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 37 deletions.
14 changes: 7 additions & 7 deletions python/compiler/aiecc/cl_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ def parse_args(args=None):
action="store_false",
help="Disable linking of AIE code",
)
parser.add_argument(
"--basic-alloc-scheme",
dest="basic_alloc_scheme",
default=False,
action="store_true",
help="Use basic memory allocation scheme for AIE buffer address assignment",
)
parser.add_argument(
"--aie-generate-airbin",
dest="airbin",
Expand Down Expand Up @@ -264,13 +271,6 @@ def parse_args(args=None):
default="0x901",
help="Kernel id in xclbin file",
)
parser.add_argument(
"--basic-alloc-scheme",
dest="basic_alloc_scheme",
default=False,
action="store_const",
help="Use basic memory allocation scheme for AIE buffer address assignment",
)

opts = parser.parse_args(args)
return opts
Expand Down
12 changes: 6 additions & 6 deletions test/aiecc/simple.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
//
//===----------------------------------------------------------------------===//

// RUN: %PYTHON aiecc.py --compile --xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --compile --no-xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE
// RUN: %PYTHON aiecc.py --no-unified --compile --no-link --xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --no-unified --compile --no-link --no-xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --no-unified --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --compile --xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --compile --no-xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-unified --compile --no-link --xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-unified --compile --no-link --no-xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-unified --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE

// Note that llc determines the architecture from the llvm IR.

Expand Down
12 changes: 6 additions & 6 deletions test/aiecc/simple_aie2.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
//
//===----------------------------------------------------------------------===//

// RUN: %PYTHON aiecc.py --compile --xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --compile --no-xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE
// RUN: %PYTHON aiecc.py --no-unified --compile --no-link --xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --no-unified --compile --no-link --no-xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --no-unified --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --compile --xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --compile --no-xchesscc --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-unified --compile --no-link --xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=XCHESSCC
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-unified --compile --no-link --no-xchesscc -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=PEANO
// RUN: %PYTHON aiecc.py --basic-alloc-scheme --no-unified --no-compile --no-link -nv %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %s -I%aie_runtime_lib%/test_lib/include %extraAieCcFlags% -L%aie_runtime_lib%/test_lib/lib -ltest_lib %S/test.cpp -o test.elf | FileCheck %s --check-prefix=NOCOMPILE

// Note that llc determines the architecture from the llvm IR.
// XCHESSCC-NOT: {{^[^ ]*llc}}
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badbuffer-ve2802.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// Row 2 is a memtile, not a coretile.
// CHECK: error{{.*}}'aie.buffer' op in Column 1 and Row 2 is accessed from an unreachable tile in Column 1 and Row 3

Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badbuffer.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.buffer' op in Column 1 and Row 1 is accessed from an unreachable tile in Column 4 and Row 4

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badconnect.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}} 'aie.connect' op source index cannot be less than zero

module {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badcore.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.core' op failed to verify that op exists in a core tile

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badcore2.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.core' op failed to verify that op exists in a core tile

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badlock-vc1902.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.lock' op lock assigned invalid id (maximum is 15)
module @test {
%t1 = aie.tile(1, 1)
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badlock-ve2802.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.lock' op lock assigned invalid id (maximum is 63)
module @test {
aie.device(xcve2802) {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badlockdma.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.lock' op in Column 4 and Row 4 is accessed from an unreachable tile in Column 1 and Row 1
module @test {
%t1 = aie.tile(1, 1)
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badlockfunc.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.lock' op is accessed outside of a tile
module @test {
%t1 = aie.tile(1, 1)
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badmemtiledma_neighboraccess.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.buffer' op in Column 3 and Row 1 is accessed from an unreachable tile in Column 1 and Row 1

// memtiles can only access neighboring memtiles
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badswitchbox_memtile_nofifo-ve2802.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//===----------------------------------------------------------------------===//


// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.connect' op source bundle FIFO not supported

module {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badswitchbox_shimtile_nodma-ve2802.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//===----------------------------------------------------------------------===//


// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.connect' op source bundle DMA not supported

module {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badtile-ve2802.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.tile' op column index (50) must be less than the number of columns in the device (38)

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badtile.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.tile' op attribute 'col' failed to satisfy constraint: 32-bit signless integer attribute whose minimum value is 0

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badtile2.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.tile' op column index (50) must be less than the number of columns in the device (50)

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badtiledma.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.use_lock' op used in a DMA block that have multiple locks.

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badtiledma2.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.dma_bd' op Core tile DMAs can only access a buffer in the same tile.

module @test {
Expand Down
2 changes: 1 addition & 1 deletion test/dialect/AIE/badtiledma3.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

// RUN: not %PYTHON aiecc.py %s 2>&1 | FileCheck %s
// RUN: not %PYTHON aiecc.py --basic-alloc-scheme %s 2>&1 | FileCheck %s
// CHECK: error{{.*}}'aie.use_lock' op can only access a lock in the same tile

module @test {
Expand Down

0 comments on commit 11a4adc

Please sign in to comment.