Skip to content

Commit

Permalink
test strix runner (#1956)
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph Melber <[email protected]>
  • Loading branch information
fifield and jgmelber authored Dec 9, 2024
1 parent e462815 commit fe1b7b1
Show file tree
Hide file tree
Showing 68 changed files with 127 additions and 121 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/buildAndTestRyzenAI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ env:
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF
# -j12 here to reduce the number of parallel chess jobs.
LIT_OPTS: -sv --time-tests -j12 --timeout 600 --show-unsupported --show-excluded
LIT_OPTS: -sv --time-tests --timeout 600 --show-unsupported --show-excluded

jobs:
build-tests:
name: Run Tests on Ryzen AI
runs-on: amd7940hs
runs-on: ${{ matrix.runner_type }}
strategy:
fail-fast: false
matrix:
runner_type: [ amd7940hs, amdhx370 ]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -98,6 +101,14 @@ jobs:
mkdir build
pushd build
# -j here to reduce the number of parallel chess jobs.
# -j6 for 32GB RAM, -j12 for 64GB RAM
if [ x"${{ matrix.runner_type }}" == x"amdhx370" ]; then
LIT_OPTS="-j6 $LIT_OPTS"
else
LIT_OPTS="-j12 $LIT_OPTS"
fi
export PATH=$VITIS/bin:$VITIS/aietools/bin:$PATH
cmake .. -G Ninja \
-DPython3_EXECUTABLE=$(which python) \
Expand All @@ -114,7 +125,11 @@ jobs:
build-quick-setup:
name: Run Examples on Ryzen AI
runs-on: amd7940hs
runs-on: ${{ matrix.runner_type }}
strategy:
fail-fast: false
matrix:
runner_type: [ amd7940hs ]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -150,6 +165,14 @@ jobs:
# build is created by the build-mlir-aie-from-wheels.sh script
pushd build
# -j here to reduce the number of parallel chess jobs.
# -j6 for 32GB RAM, -j12 for 64GB RAM
if [ x"${{ matrix.runner_type }}" == x"amdhx370" ]; then
LIT_OPTS="-j6 $LIT_OPTS"
else
LIT_OPTS="-j12 $LIT_OPTS"
fi
ninja install
ninja check-reference-designs
ninja check-programming-guide
Expand Down
8 changes: 5 additions & 3 deletions programming_examples/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@
if not m:
continue
print("Found Ryzen AI device:", m.group(1))
model = "unknown"
if len(m.groups()) == 3:
print("\tmodel:", m.group(3))
model = str(m.group(3))
print("\tmodel:", model)
config.available_features.add("ryzen_ai")
if str(m.group(3)) == "npu1":
if model == "npu1":
run_on_npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
if str(m.group(3)) == "npu4":
if model == "npu4":
run_on_2npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
Expand Down
15 changes: 11 additions & 4 deletions programming_guide/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,19 @@
if not m:
continue
print("Found Ryzen AI device:", m.group(1))
model = "unknown"
if len(m.groups()) == 3:
print("\tmodel:", m.group(3))
model = str(m.group(3))
print("\tmodel:", model)
config.available_features.add("ryzen_ai")
run_on_npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
if model == "npu1":
run_on_npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
if model == "npu4":
run_on_2npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
break
except:
print("Failed to run xrt-smi")
Expand Down
2 changes: 2 additions & 0 deletions programming_guide/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ if lit.util.pythonize_bool("@AIETools_AIE_FOUND@"):
config.vitis_components.append("AIE")
if lit.util.pythonize_bool("@AIETools_AIE2_FOUND@"):
config.vitis_components.append("AIE2")
if lit.util.pythonize_bool("@AIETools_AIE2P_FOUND@"):
config.vitis_components.append("AIE2P")

# Support substitution of the tools_dir with user parameters. This is
# used when we can't determine the tool dir at configuration time.
Expand Down
17 changes: 13 additions & 4 deletions test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
llvm_config.with_environment("XILINX_VITIS_AIETOOLS", config.vitis_aietools_dir)

run_on_npu = "echo"
run_on_2npu = "echo"
xrt_flags = ""

# Not using run_on_board anymore, need more specific per-platform commands
Expand Down Expand Up @@ -159,12 +160,19 @@
if not m:
continue
print("Found Ryzen AI device:", m.group(1))
model = "unknown"
if len(m.groups()) == 3:
print("\tmodel:", m.group(3))
model = str(m.group(3))
print("\tmodel:", model)
config.available_features.add("ryzen_ai")
run_on_npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
if model == "npu1":
run_on_npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
if model == "npu4":
run_on_2npu = (
f"flock /tmp/npu.lock {config.aie_src_root}/utils/run_on_npu.sh"
)
break
except:
print("Failed to run xrt-smi")
Expand All @@ -173,6 +181,7 @@
print("xrt not found")

config.substitutions.append(("%run_on_npu", run_on_npu))
config.substitutions.append(("%run_on_2npu", run_on_2npu))
config.substitutions.append(("%xrt_flags", xrt_flags))
config.substitutions.append(("%XRT_DIR", config.xrt_dir))

Expand Down
2 changes: 2 additions & 0 deletions test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ if lit.util.pythonize_bool("@AIETools_AIE_FOUND@"):
config.vitis_components.append("AIE")
if lit.util.pythonize_bool("@AIETools_AIE2_FOUND@"):
config.vitis_components.append("AIE2")
if lit.util.pythonize_bool("@AIETools_AIE2P_FOUND@"):
config.vitis_components.append("AIE2P")

# Support substitution of the tools_dir with user parameters. This is
# used when we can't determine the tool dir at configuration time.
Expand Down
3 changes: 1 addition & 2 deletions test/npu-xrt/add_12_i8_using_2d_dma_op_with_padding/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe aie.xclbin | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe aie.xclbin
//
3 changes: 1 addition & 2 deletions test/npu-xrt/add_21_i8_using_dma_op_with_padding/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe aie.xclbin | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe aie.xclbin
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe aie.xclbin | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe aie.xclbin
3 changes: 1 addition & 2 deletions test/npu-xrt/add_314_using_dma_op/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe aie.xclbin | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe aie.xclbin

3 changes: 1 addition & 2 deletions test/npu-xrt/add_378_i32_using_dma_op_with_padding/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe aie.xclbin | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe aie.xclbin

3 changes: 1 addition & 2 deletions test/npu-xrt/add_blockwrite/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt

3 changes: 1 addition & 2 deletions test/npu-xrt/add_maskwrite/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt

3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_ctrl_packet/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt

3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_ctrl_packet_4_cores/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall -lrt -lstdc++ %xrt_flags %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt
3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_ctrl_packet_col_overlay/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --generate-ctrl-pkt-overlay --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt
3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_objFifo/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt

3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_two/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
// RUN: %python aiecc.py --xclbin-kernel-name=ADDONE --xclbin-kernel-id=0x901 --xclbin-instance-name=ADDONEINST --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-name=add_one.xclbin --npu-insts-name=insts.txt %S/aie1.mlir
// RUN: %python aiecc.py --xclbin-kernel-name=ADDTWO --xclbin-kernel-id=0x902 --xclbin-instance-name=ADDTWOINST --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-input=add_one.xclbin --xclbin-name=add_two.xclbin --npu-insts-name=insts.txt %S/aie2.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x add_two.xclbin -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x add_two.xclbin -i insts.txt

3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_two_txn/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
// RUN: %python aiecc.py --xclbin-kernel-name=ADDONE --xclbin-kernel-id=0x901 --xclbin-instance-name=ADDONEINST --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-name=add_one.xclbin --npu-insts-name=add_one_insts.txt %S/aie1.mlir
// RUN: %python aiecc.py --no-aiesim --aie-generate-txn --aie-generate-npu --no-compile-host --npu-insts-name=add_two_insts.txt %S/aie2.mlir
// RUN: aie-translate -aie-npu-instgen -aie-output-binary=true -aie-sequence-name=configure aie2.mlir.prj/txn.mlir -o add_two_cfg.bin
// RUN: %run_on_npu ./test.exe -x add_one.xclbin -i add_one_insts.txt -c add_two_cfg.bin -j add_two_insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x add_one.xclbin -i add_one_insts.txt -c add_two_cfg.bin -j add_two_insts.txt
3 changes: 1 addition & 2 deletions test/npu-xrt/add_one_using_dma/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
//
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt

3 changes: 1 addition & 2 deletions test/npu-xrt/adjacent_memtile_access/three_memtiles/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# RUN: %python %S/aie2.py > ./aie2.mlir
# RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt ./aie2.mlir
# RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
# RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
# CHECK: PASS!
# RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt
import numpy as np
import sys

Expand Down
3 changes: 1 addition & 2 deletions test/npu-xrt/adjacent_memtile_access/two_memtiles/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# RUN: %python %S/aie2.py > ./aie2.mlir
# RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --alloc-scheme=basic-sequential --xclbin-name=aie.xclbin --npu-insts-name=insts.txt ./aie2.mlir
# RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
# RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
# CHECK: PASS!
# RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt
import numpy as np
import sys

Expand Down
3 changes: 1 addition & 2 deletions test/npu-xrt/cascade_flows/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
// RUN: xchesscc_wrapper aie2 -I %aietools/include -c %S/kernel3.cc -o ./kernel3.o
// RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --no-compile-host --xclbin-name=aie.xclbin --npu-insts-name=insts.txt %S/aie.mlir
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt
3 changes: 1 addition & 2 deletions test/npu-xrt/ctrl_packet_reconfig/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
// RUN: aie-translate -aie-npu-instgen -aie-sequence-name=configure ctrlpkt_dma_seq.mlir -o ctrlpkt_dma_seq.txt
//
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe
3 changes: 1 addition & 2 deletions test/npu-xrt/ctrl_packet_reconfig_1x4_cores/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
// RUN: aie-translate -aie-npu-instgen -aie-sequence-name=configure ctrlpkt_dma_seq.mlir -o ctrlpkt_dma_seq.txt
//
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe
3 changes: 1 addition & 2 deletions test/npu-xrt/ctrl_packet_reconfig_4x1_cores/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
// RUN: aie-translate -aie-npu-instgen -aie-sequence-name=configure ctrlpkt_dma_seq.mlir -o ctrlpkt_dma_seq.txt
//
// RUN: clang %S/test.cpp -o test.exe -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
// RUN: %run_on_npu ./test.exe | FileCheck %s
// CHECK: PASS!
// RUN: %run_on_npu ./test.exe
3 changes: 1 addition & 2 deletions test/npu-xrt/dma_task_large_linear/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
# RUN: %python %S/aie2.py > ./aie2.mlir
# RUN: %python aiecc.py --no-aiesim --no-xchesscc --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --xclbin-name=final.xclbin --npu-insts-name=insts.txt ./aie2.mlir
# RUN: clang %S/test.cpp -o test -std=c++11 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
# RUN: %run_on_npu ./test | FileCheck %s
# CHECK: PASS!
# RUN: %run_on_npu ./test
import numpy as np
from aie.extras.context import mlir_mod_ctx

Expand Down
1 change: 1 addition & 0 deletions test/npu-xrt/dma_task_large_linear/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ int main(int argc, const char *argv[]) {
std::cout << "PASS!" << std::endl;
} else {
std::cout << "FAIL." << std::endl;
return 1;
}

return 0;
Expand Down
3 changes: 1 addition & 2 deletions test/npu-xrt/dynamic_object_fifo/nested_loops/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# RUN: %python %S/aie2.py > ./aie2.mlir
# RUN: clang %S/test.cpp -o test.exe -std=c++17 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
# RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --dynamic-objFifos --xclbin-name=final.xclbin --npu-insts-name=insts.txt ./aie2.mlir
# RUN: %run_on_npu ./test.exe -x final.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
# CHECK: PASS!
# RUN: %run_on_npu ./test.exe -x final.xclbin -k MLIR_AIE -i insts.txt

import numpy as np

Expand Down
2 changes: 2 additions & 0 deletions test/npu-xrt/dynamic_object_fifo/nested_loops/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,7 @@ int main(int argc, const char *argv[]) {
std::cout << std::endl << std::endl;
std::cout << (pass ? "PASS!" : "FAIL.") << std::endl;

if (!pass)
return 1;
return 0;
}
3 changes: 1 addition & 2 deletions test/npu-xrt/dynamic_object_fifo/ping_pong/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# RUN: %python %S/aie2.py > ./aie2.mlir
# RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --dynamic-objFifos --xclbin-name=final.xclbin --npu-insts-name=insts.txt ./aie2.mlir
# RUN: clang %S/test.cpp -o test.exe -std=c++17 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
# RUN: %run_on_npu ./test.exe | FileCheck %s
# CHECK: PASS!
# RUN: %run_on_npu ./test.exe
import numpy as np
import sys

Expand Down
2 changes: 2 additions & 0 deletions test/npu-xrt/dynamic_object_fifo/ping_pong/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,7 @@ int main(int argc, const char *argv[]) {
std::cout << std::endl;
std::cout << (pass ? "PASS!" : "FAIL.") << std::endl;

if (!pass)
return 1;
return 0;
}
3 changes: 1 addition & 2 deletions test/npu-xrt/dynamic_object_fifo/reduction/aie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# RUN: %python %S/aie2.py > ./aie2.mlir
# RUN: %python aiecc.py --no-aiesim --aie-generate-cdo --aie-generate-npu --aie-generate-xclbin --no-compile-host --dynamic-objFifos --xclbin-name=final.xclbin --npu-insts-name=insts.txt ./aie2.mlir
# RUN: clang %S/test.cpp -o test.exe -std=c++17 -Wall %xrt_flags -lrt -lstdc++ %test_utils_flags
# RUN: %run_on_npu ./test.exe | FileCheck %s
# CHECK: PASS!
# RUN: %run_on_npu ./test.exe
import numpy as np
import sys

Expand Down
2 changes: 2 additions & 0 deletions test/npu-xrt/dynamic_object_fifo/reduction/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@ int main(int argc, const char *argv[]) {
std::cout << std::endl << std::endl;
std::cout << (pass ? "PASS!" : "FAIL.") << std::endl;

if (!pass)
return 1;
return 0;
}
Loading

0 comments on commit fe1b7b1

Please sign in to comment.