forked from Xilinx/mlir-aie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Object FIFO: Introduce new dynamic lowering (Xilinx#1798)
Co-authored-by: André Rösti <[email protected]> Co-authored-by: AndraBisca <[email protected]> Co-authored-by: Pranathi Vasireddy <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9e95ec0
commit fa85462
Showing
42 changed files
with
2,385 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
programming_examples/dynamic_object_fifo/nested_loops/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
##===- Makefile -----------------------------------------------------------===## | ||
# | ||
# This file licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# | ||
# Copyright (C) 2024, Advanced Micro Devices, Inc. | ||
# | ||
##===----------------------------------------------------------------------===## | ||
|
||
# --- | ||
|
||
# The following environment variables that point to the Xilinx runtime (XRT) | ||
# should be set up by an environment setup script already. | ||
XILINX_XRT?=/opt/xilinx/xrt | ||
XILINX_VITIS?=$(shell realpath $(dir $(shell which vitis))/../) | ||
|
||
# --- | ||
|
||
srcdir := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
|
||
XILINX_XRT_INCLUDE?=${XILINX_XRT}/include | ||
XILINX_XRT_LIB?=${XILINX_XRT}/lib | ||
|
||
CHESSCCWRAP2_FLAGS=aie2 -I${XILINX_VITIS}/aietools/include | ||
XRT_FLAGS=-I${XILINX_XRT_INCLUDE} -L${XILINX_XRT_LIB} | ||
XRT_LIBS=-lxrt_coreutil | ||
CXX=g++-13 -ggdb | ||
|
||
#mlir_target?=build/aie.mlir | ||
xclbin_target?=build/final.xclbin | ||
insts_target?=build/insts.txt | ||
host_target?=build/test | ||
|
||
.PHONY: all | ||
all: ${xclbin_target} ${host_target} | ||
|
||
build/aie.mlir: ${srcdir}/aie2.py | ||
mkdir -p ${@D} | ||
python3 $< > $@ | ||
|
||
build/kernel.o: ${srcdir}/kernel.cc | ||
mkdir -p ${@D} | ||
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -c $< -o ${@F} | ||
|
||
${xclbin_target}: build/aie.mlir build/kernel.o | ||
mkdir -p ${@D} | ||
cd ${@D} && aiecc.py -v --aie-generate-cdo --no-compile-host --xclbin-name=${@F} \ | ||
--dynamic-objFifos --aie-generate-npu --npu-insts-name=${insts_target:build/%=%} ${<:%=../%} | ||
|
||
${host_target}: ${srcdir}/test.cpp ${xclbin_target} | ||
mkdir -p ${@D} | ||
${CXX} ${XRT_FLAGS} -DM=$M -DN=$N -o $@ $< ${XRT_LIBS} | ||
|
||
.PHONY: run | ||
run: ${host_target} | ||
./${host_target} | ||
|
||
xclbin_sign=${XILINX_XRT}/amdxdna/setup_xclbin_firmware.sh | ||
.PHONY: sign | ||
sign: ${xclbin_target} | ||
${xclbin_sign} -dev Phoenix -xclbin $< | ||
|
||
.PHONY: clean | ||
clean: | ||
-rm -r build |
Oops, something went wrong.