Skip to content

Commit

Permalink
added Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
singagan committed Apr 9, 2024
1 parent 3d7d25e commit c20d4e0
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions programming_examples/ml/conv2d/Makefile
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit c20d4e0

Please sign in to comment.