Skip to content

Commit

Permalink
fix(vitis/cnn) update make file for new rapidstream
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrantxiao24 committed Dec 10, 2024
1 parent d4ea943 commit 7f81e0b
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"dse_range_min": 0.7,
"partition_strategy": "flat",
"port_pre_assignments": {
".*final_out.*": "HBM[16]",
".*final_out_dist_.*": "HBM[16]",
".*final_out_id_.*": "HBM[16]",
".*in_0_.*": "HBM[0]",
Expand Down
11 changes: 6 additions & 5 deletions benchmarks/vitis_flow/cnn13x2/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PLATFORM := xilinx_u50_gen3x16_xdma_5_202210_1
KERNEL_NAME := kernel3
PLATFORM := xilinx_u50_gen3x16_xdma_5_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run_u50.py
Expand All @@ -24,7 +23,9 @@ BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

ifeq ($(notdir $(RS_SCRIPT)), run_u50.py)
PART := xcu50-fsvh2104-2-e
Expand All @@ -47,7 +48,7 @@ else
endif

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -69,7 +70,7 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x10/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x12/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x14/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x16/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x4/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x6/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down
14 changes: 8 additions & 6 deletions benchmarks/vitis_flow/cnn13x4_16/cnn13x8/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. All rights reserved.
# The contributor(s) of this file has/have agreed to the RapidStream Contributor License Agreement.


ROOT_DIR := $(shell git rev-parse --show-toplevel)
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
KERNEL_NAME := kernel3
PLATFORM := xilinx_u250_gen3x16_xdma_4_1_202210_1
GRP_UTIL := $(ROOT_DIR)/common/util/get_group.py
PART := xcu250-figd2104-2L-e
LINK_FILE := link_config.ini
KERNEL_NAME := kernel3
SRC_DIR := $(CURDIR)/design
TARGET := hw
RS_SCRIPT := $(CURDIR)/run.py
Expand All @@ -24,12 +23,14 @@ CLK_PERIOD_NS := 4
RS_TARGET := $(TEMP_DIR)/dse/candidate_0/exported/$(KERNEL_NAME).xo
BUILD_LOG := $(TEMP_DIR)/build.json
SUCCESS := "Build Successful"
TIMING_RPT := $(TEMP_DIR)/reports/link/imp/impl_1_hw_bb_locked_timing_summary_routed.rpt
TIMING_RPT := impl_1_hw_bb_locked_timing_summary_routed.rpt
SLACK_GETTER := $(ROOT_DIR)/common/util/get_slack.py
RSPATH := $(CURDIR)
RSXX := rapidstream
RSPYTHON := rapidstream

all: $(RS_KERNEL_XCLBIN)
$(RSXX) $(SLACK_GETTER) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
cd $(RSPATH) && $(RSPYTHON) $(SLACK_GETTER) -d $(TEMP_DIR) -i $(TIMING_RPT) -o $(BUILD_LOG) -c clk_kernel_00_unbuffered_net -p 3.333
echo $(SUCCESS)

sw_emu: $(KERNEL_XCLBIN) $(HOST)
Expand All @@ -44,13 +45,14 @@ $(RS_KERNEL_XCLBIN): $(RS_TARGET)
--connectivity.nk $(KERNEL_NAME):1:$(KERNEL_NAME) \
--config $(SRC_DIR)/$(LINK_FILE) \
--temp_dir $(TEMP_DIR) \
--save-temps \
-o $@ \
$^

rs_opt:$(RS_TARGET)

$(RS_TARGET): $(KERNEL_XO)
$(RSXX) $(RS_SCRIPT)
cd $(RSPATH) && $(RSPYTHON) $(RS_SCRIPT)

$(KERNEL_XCLBIN): $(KERNEL_XO)
v++ -l -t ${TARGET} \
Expand Down

0 comments on commit 7f81e0b

Please sign in to comment.