From 5dcd881519e66737934aae965501f1b53dcc6ceb Mon Sep 17 00:00:00 2001 From: Jeff Fifield Date: Wed, 25 Sep 2024 10:04:44 -0600 Subject: [PATCH] Fix more tests (#1794) Co-authored-by: Erika Hunhoff --- test/npu-xrt/add_12_i8_using_2d_dma_op_with_padding/run.lit | 2 +- test/npu-xrt/add_21_i8_using_dma_op_with_padding/run.lit | 2 +- test/npu-xrt/matrix_transpose/aie2.py | 1 + test/npu-xrt/nd_memcpy_transforms/aie2.py | 2 +- test/npu-xrt/sync_task_complete_token/aie2.py | 2 +- test/npu-xrt/sync_task_complete_token_bd_chaining/aie2.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/npu-xrt/add_12_i8_using_2d_dma_op_with_padding/run.lit b/test/npu-xrt/add_12_i8_using_2d_dma_op_with_padding/run.lit index 75e63d21b2..814fc1de9e 100644 --- a/test/npu-xrt/add_12_i8_using_2d_dma_op_with_padding/run.lit +++ b/test/npu-xrt/add_12_i8_using_2d_dma_op_with_padding/run.lit @@ -4,7 +4,7 @@ // REQUIRES: ryzen_ai // // 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++ +// 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! // diff --git a/test/npu-xrt/add_21_i8_using_dma_op_with_padding/run.lit b/test/npu-xrt/add_21_i8_using_dma_op_with_padding/run.lit index b23de6d009..63c080e095 100644 --- a/test/npu-xrt/add_21_i8_using_dma_op_with_padding/run.lit +++ b/test/npu-xrt/add_21_i8_using_dma_op_with_padding/run.lit @@ -4,7 +4,7 @@ // REQUIRES: ryzen_ai // // 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++ +// 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! diff --git a/test/npu-xrt/matrix_transpose/aie2.py b/test/npu-xrt/matrix_transpose/aie2.py index 9476ab3544..fa3db77d27 100644 --- a/test/npu-xrt/matrix_transpose/aie2.py +++ b/test/npu-xrt/matrix_transpose/aie2.py @@ -18,6 +18,7 @@ from aie.dialects.aie import * from aie.dialects.aiex import * +from aie.ir import MemRefType from aie.extras.dialects.ext.scf import _for as range_ matrix_rows = 7 diff --git a/test/npu-xrt/nd_memcpy_transforms/aie2.py b/test/npu-xrt/nd_memcpy_transforms/aie2.py index afdca71eaa..be1d754c67 100644 --- a/test/npu-xrt/nd_memcpy_transforms/aie2.py +++ b/test/npu-xrt/nd_memcpy_transforms/aie2.py @@ -19,7 +19,7 @@ from aie.dialects.aie import * from aie.dialects.aiex import * from aie.extras.dialects.ext.scf import _for as range_ - +from aie.ir import MemRefType dtype = T.i16 a_len = 8 diff --git a/test/npu-xrt/sync_task_complete_token/aie2.py b/test/npu-xrt/sync_task_complete_token/aie2.py index 29cb6ebb80..773d40c00f 100644 --- a/test/npu-xrt/sync_task_complete_token/aie2.py +++ b/test/npu-xrt/sync_task_complete_token/aie2.py @@ -56,7 +56,7 @@ def device_body(): def core_body(): for _ in range_(0xFFFFFFFF): elem_output = fifo_output.acquire(ObjectFifoPort.Produce, 1) - zero = constant(T.i32(), 0) + zero = constant(0) memref.store(zero, elem_output, [0]) for _ in range_(16): elem_input = fifo_input.acquire(ObjectFifoPort.Consume, 1) diff --git a/test/npu-xrt/sync_task_complete_token_bd_chaining/aie2.py b/test/npu-xrt/sync_task_complete_token_bd_chaining/aie2.py index b8ee75a67f..4723c18749 100644 --- a/test/npu-xrt/sync_task_complete_token_bd_chaining/aie2.py +++ b/test/npu-xrt/sync_task_complete_token_bd_chaining/aie2.py @@ -56,7 +56,7 @@ def device_body(): def core_body(): for _ in range_(0xFFFFFFFF): elem_output = fifo_output.acquire(ObjectFifoPort.Produce, 1) - zero = constant(T.i32(), 0) + zero = constant(0) memref.store(zero, elem_output, [0]) for _ in range_(16): elem_input = fifo_input.acquire(ObjectFifoPort.Consume, 1)