Skip to content

Commit

Permalink
[LIT] Lit test (#1252)
Browse files Browse the repository at this point in the history
e^x with lit test
  • Loading branch information
jamesroxbypb authored and fifield committed Apr 17, 2024
1 parent a54d5b3 commit 7e45023
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions programming_examples/basic/eltwise_exp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ all: build/final.xclbin build/insts.txt

build/exp.o: ${KERNELLIB}/bf16_exp.cc
mkdir -p ${@D}
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -I${INSTALL_ROOT}/mlir_aie/aie_runtime_lib/AIE2 -c $< -o ${@F}
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -I${INSTALL_ROOT}/aie_runtime_lib/AIE2 -c $< -o ${@F}

build/lut_based_ops.o: ${INSTALL_ROOT}/mlir_aie/aie_runtime_lib/AIE2/lut_based_ops.cpp
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -I${INSTALL_ROOT}/mlir_aie/aie_runtime_lib/AIE2 -c $< -o ${@F}
build/lut_based_ops.o: ${INSTALL_ROOT}/aie_runtime_lib/AIE2/lut_based_ops.cpp
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -I${INSTALL_ROOT}/aie_runtime_lib/AIE2 -c $< -o ${@F}

build/kernels.a: build/exp.o build/lut_based_ops.o
ar rvs $@ $+
Expand Down
2 changes: 1 addition & 1 deletion programming_examples/basic/eltwise_exp/run.lit
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
// RUN: %python aiecc.py --xbridge --aie-generate-cdo --aie-generate-ipu --no-compile-host --xclbin-name=aie.xclbin --ipu-insts-name=insts.txt ./aie.mlir
// RUN: g++-13 %S/test.cpp -o test.exe -std=c++23 -Wall -I%S/../../../runtime_lib/test_lib %S/../../../runtime_lib/test_lib/test_utils.cpp %xrt_flags -lrt -lstdc++ -lboost_program_options -lboost_filesystem
// RUN: %run_on_ipu ./test.exe -x aie.xclbin -k MLIR_AIE -i insts.txt | FileCheck %s
// CHECK: PASS!
// CHECK: PASS!
2 changes: 2 additions & 0 deletions programming_examples/makefile-common
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Contains common definitions used across the Makefiles of ipu-xrt tests.
REPO_ROOT ?= $(shell realpath $(dir $(shell which aie-opt))/../../..)
INSTALL_ROOT ?= $(shell realpath $(dir $(shell which aie-opt))/..)


# VITIS related variables
VITIS_ROOT ?= $(shell realpath $(dir $(shell which vitis))/../)
Expand Down

0 comments on commit 7e45023

Please sign in to comment.