From c20d4e0bd5c291e3979c5249747c7d442d46e396 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Tue, 9 Apr 2024 21:22:23 +0200 Subject: [PATCH] added Makefile --- programming_examples/ml/conv2d/Makefile | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 programming_examples/ml/conv2d/Makefile diff --git a/programming_examples/ml/conv2d/Makefile b/programming_examples/ml/conv2d/Makefile new file mode 100755 index 0000000000..9bbfcf1a2e --- /dev/null +++ b/programming_examples/ml/conv2d/Makefile @@ -0,0 +1,32 @@ +include ../../basic/makefile-common + +#mlirFileName = aie_1core +mlirFileName = aieWithTrace_1core +# VPATH := ../../kernels + +all: build/conv2dk1.o build/final.xclbin + + +build/${mlirFileName}.mlir: aie2.py + mkdir -p ${@D} + python3 $< > $@ + +#insts.txt: ${mlirFileName}.mlir +insts.txt: build/${mlirFileName}.mlir + aiecc.py -v --aie-only-generate-ipu --ipu-insts-name=$@ $< + +build/conv2dk1.o: conv2dk1.cc + xchesscc -d ${CHESSCC2_FLAGS} -DINT8_ACT -c $< -o $@ + +build/final.xclbin: build/${mlirFileName}.mlir + cd build && aiecc.py -v --aie-generate-cdo --aie-generate-ipu --no-compile-host \ + --xclbin-name=${@F} --ipu-insts-name=insts.txt $(<:%=../%) + +clean: + rm -rf build *.elf* *.lst *.bif ${mlirFileName}.mlir.prj *.xclbin sim \ + chess* *.o insts.txt \ + *.log aie_partition.json *.bin BOOT.BIN _x test.exe + +test.exe: test.cpp + $(CXX) $(LD_FLAGS) $< -o $@ $(CFLAGS) $(INC) $(LD_PATHS) +