From 9ce4d820a5f94e2e252e9fb35d59969ee4ca8c72 Mon Sep 17 00:00:00 2001 From: Stephen Neuendorffer Date: Fri, 12 Jul 2024 15:39:06 -0700 Subject: [PATCH 1/3] Avoid test conflicts between peano and chess Basically there are two kinds of tests: 1) tests which can use either compiler 2) tests which specifically use one or the other We need to be careful in the second case to not mix the two compilers. --- test/unit_tests/aie/31_stream_core/aie.mlir | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit_tests/aie/31_stream_core/aie.mlir b/test/unit_tests/aie/31_stream_core/aie.mlir index 99262c6549..65c8753e79 100644 --- a/test/unit_tests/aie/31_stream_core/aie.mlir +++ b/test/unit_tests/aie/31_stream_core/aie.mlir @@ -8,11 +8,10 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: peano, !hsa +// REQUIRES: !hsa // RUN: %PYTHON aiecc.py --aiesim --no-xchesscc --xbridge %VitisSysrootFlag% --host-target=%aieHostTargetTriplet% %link_against_hsa% %s %test_lib_flags %S/test.cpp -o test.elf // RUN: %run_on_board ./test.elf -// RUN: sh -c 'aie.mlir.prj/aiesim.sh; exit 0' | FileCheck %s // CHECK: test start. // CHECK: PASS! From 845fd6ea35443d86a02001a3eefa96cd300511ae Mon Sep 17 00:00:00 2001 From: Stephen Neuendorffer Date: Fri, 12 Jul 2024 15:52:20 -0700 Subject: [PATCH 2/3] more.. --- .../chess_compiler_tests/00_itsalive/aie.mlir | 12 +++++++----- .../chess_compiler_tests_aie2/00_itsalive/aie.mlir | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/test/unit_tests/chess_compiler_tests/00_itsalive/aie.mlir b/test/unit_tests/chess_compiler_tests/00_itsalive/aie.mlir index 9b388d7985..ef63e90370 100644 --- a/test/unit_tests/chess_compiler_tests/00_itsalive/aie.mlir +++ b/test/unit_tests/chess_compiler_tests/00_itsalive/aie.mlir @@ -9,13 +9,15 @@ //===----------------------------------------------------------------------===// // REQUIRES: valid_xchess_license -// REQUIRES: peano // RUN: %PYTHON aiecc.py --no-unified --xchesscc --xbridge %s // RUN: %PYTHON aiecc.py --unified --xchesscc --xbridge %s -// RUN: %PYTHON aiecc.py --no-unified --no-xchesscc --xbridge %s -// RUN: %PYTHON aiecc.py --unified --no-xchesscc --xbridge %s -// RUN: %PYTHON aiecc.py --no-unified --xchesscc --no-xbridge %s -// RUN: %PYTHON aiecc.py --unified --xchesscc --no-xbridge %s + +// These cases mix chess and peano, which is not supported. +// DONTREQUIRES: peano +// DONTRUN: %PYTHON aiecc.py --no-unified --no-xchesscc --xbridge %s +// DONTRUN: %PYTHON aiecc.py --unified --no-xchesscc --xbridge %s +// DONTRUN: %PYTHON aiecc.py --no-unified --xchesscc --no-xbridge %s +// DONTRUN: %PYTHON aiecc.py --unified --xchesscc --no-xbridge %s module @test00_itsalive { %tile12 = aie.tile(1, 2) diff --git a/test/unit_tests/chess_compiler_tests_aie2/00_itsalive/aie.mlir b/test/unit_tests/chess_compiler_tests_aie2/00_itsalive/aie.mlir index ac78980548..f386f0b383 100644 --- a/test/unit_tests/chess_compiler_tests_aie2/00_itsalive/aie.mlir +++ b/test/unit_tests/chess_compiler_tests_aie2/00_itsalive/aie.mlir @@ -9,13 +9,15 @@ //===----------------------------------------------------------------------===// // REQUIRES: valid_xchess_license -// REQUIRES: peano // RUN: %PYTHON aiecc.py --no-unified --xchesscc --xbridge %s // RUN: %PYTHON aiecc.py --unified --xchesscc --xbridge %s -// RUN: %PYTHON aiecc.py --no-unified --no-xchesscc --xbridge %s -// RUN: %PYTHON aiecc.py --unified --no-xchesscc --xbridge %s -// RUN: %PYTHON aiecc.py --no-unified --xchesscc --no-xbridge %s -// RUN: %PYTHON aiecc.py --unified --xchesscc --no-xbridge %s + +// These cases mix chess and peano, which is not supported. +// DONTREQUIRES: peano +// DONTRUN: %PYTHON aiecc.py --no-unified --no-xchesscc --xbridge %s +// DONTRUN: %PYTHON aiecc.py --unified --no-xchesscc --xbridge %s +// DONTRUN: %PYTHON aiecc.py --no-unified --xchesscc --no-xbridge %s +// DONTRUN: %PYTHON aiecc.py --unified --xchesscc --no-xbridge %s module @test00_itsalive { aie.device(xcve2802) { From b749b3c59ba5c24c31260e89a373dde99c82e9a3 Mon Sep 17 00:00:00 2001 From: Stephen Neuendorffer Date: Mon, 15 Jul 2024 11:21:32 -0700 Subject: [PATCH 3/3] [AIE1] Add some missing stream wrappers There was a test for this, but it wasn't getting run. --- aie_runtime_lib/AIE/chess_intrinsic_wrapper.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aie_runtime_lib/AIE/chess_intrinsic_wrapper.cpp b/aie_runtime_lib/AIE/chess_intrinsic_wrapper.cpp index ce39b86c89..337565c71e 100644 --- a/aie_runtime_lib/AIE/chess_intrinsic_wrapper.cpp +++ b/aie_runtime_lib/AIE/chess_intrinsic_wrapper.cpp @@ -25,3 +25,12 @@ extern "C" void llvm___aie___lock___acquire___reg(unsigned id, unsigned val) { extern "C" void llvm___aie___lock___release___reg(unsigned id, unsigned val) { release(id, val); } + +extern "C" int llvm___aie___get___ss(int stream) { return get_ss(stream); } +extern "C" float llvm___aie___getf___ss(int stream) { return getf_ss(stream); } +extern "C" int llvm___aie___get___ss0___tlast() { return get_ss0_tlast(); } +extern "C" int llvm___aie___get___ss1___tlast() { return get_ss1_tlast(); } +extern "C" int llvm___aie___get___wss0___tlast() { return get_wss0_tlast(); } +extern "C" int llvm___aie___get___wss1___tlast() { return get_wss1_tlast(); } +extern "C" void llvm___aie___put___ms(int idx_ms, int a) { put_ms(idx_ms, a); } +//extern "C" void llvm___aie___put___ms___tlast(int idx_ms, int a, int tlast) { put_ms(idx_ms, a, tlast); } \ No newline at end of file