Skip to content

Commit

Permalink
Added chess option to vector_scalar_mul for section 4c
Browse files Browse the repository at this point in the history
  • Loading branch information
jackl-xilinx committed Oct 28, 2024
1 parent c04b219 commit fd5ff40
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions programming_examples/basic/vector_scalar_mul/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ VPATH := ${srcdir}/../../../aie_kernels/aie2
targetname = vectorScalar
data_size = 4096
trace_size = 8192
use_chess = true

all: build/final_${data_size}.xclbin build/insts_${data_size}.txt

kristof: build/insts_${data_size}.txt

build/%.o: %.cc
mkdir -p ${@D}
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang++ ${PEANOWRAP2_FLAGS} -c $< -o ${@F}
ifeq ($(use_chess), true)
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -c $< -o ${@F};
else
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang++ ${PEANOWRAP2_FLAGS} -c $< -o ${@F};
endif

build/aie_${data_size}.mlir: ${srcdir}/aie2.py
mkdir -p ${@D}
Expand All @@ -39,12 +44,17 @@ build/final_${data_size}.xclbin: build/aie_${data_size}.mlir build/scale.o
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --no-compile-host --xclbin-name=${@F} \
--no-xchesscc --no-xbridge \
$(if $(shell [ $(use_chess) != true ] && echo true), \
--no-xchesscc --no-xbridge \
) \
--aie-generate-npu --npu-insts-name=insts_${data_size}.txt $(<:%=../%)

build/final_trace_${data_size}.xclbin: build/aie_trace_${data_size}.mlir build/scale.o
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --no-compile-host --xclbin-name=${@F} \
--no-xchesscc --no-xbridge \
$(if $(shell [ $(use_chess) != true ] && echo true), \
--no-xchesscc --no-xbridge \
) \
--aie-generate-npu --npu-insts-name=insts_${data_size}.txt $(<:%=../%)

${targetname}_${data_size}.exe: ${srcdir}/test.cpp
Expand Down
4 changes: 2 additions & 2 deletions programming_guide/section-4/section-4b/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ build/final.xclbin: build/aie.mlir build/scale.o
mkdir -p ${@D}
cd ${@D} && aiecc.py --aie-generate-cdo --no-compile-host --xclbin-name=${@F} \
$(if $(shell [ $(use_chess) != true ] && echo true), \
--no-xchesscc --no-xbridge --peano ${PEANO_INSTALL_DIR} \
--no-xchesscc --no-xbridge \
) \
--aie-generate-npu --npu-insts-name=insts.txt $(<:%=../%)

build/trace.xclbin: build/aie_trace.mlir build/scale.o
mkdir -p ${@D}
cd ${@D} && aiecc.py -v --aie-generate-cdo --no-compile-host --xclbin-name=${@F} \
$(if $(shell [ $(use_chess) != true ] && echo true), \
--no-xchesscc --no-xbridge --peano ${PEANO_INSTALL_DIR} \
--no-xchesscc --no-xbridge \
) \
--aie-generate-npu --npu-insts-name=insts.txt $(<:%=../%)

Expand Down

0 comments on commit fd5ff40

Please sign in to comment.