From 71366a6f49bff4b24225a5d73b802d50baa640b1 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Mon, 19 Dec 2022 10:14:30 +0100 Subject: [PATCH 01/53] initial commit for GTSRB CNV example --- build/gtsrb/build.py | 90 +++++++++++++++++++ .../cnv_gtsrb_folding_config.json | 80 +++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 build/gtsrb/build.py create mode 100644 build/gtsrb/folding_config/cnv_gtsrb_folding_config.json diff --git a/build/gtsrb/build.py b/build/gtsrb/build.py new file mode 100644 index 0000000..b0adfc5 --- /dev/null +++ b/build/gtsrb/build.py @@ -0,0 +1,90 @@ +import finn.builder.build_dataflow as build +import finn.builder.build_dataflow_config as build_cfg +from finn.util.basic import alveo_default_platform +from finn.builder.build_dataflow_config import default_build_dataflow_steps +from qonnx.core.datatype import DataType +import os +import shutil +import numpy as np +from onnx import helper as oh + +models = [ + "cnv_gtsrb", +] + +# which platforms to build the networks for +zynq_platforms = ["Pynq-Z1"] +platforms_to_build = zynq_platforms + +def custom_step_add_preproc(model, cfg): + # GTSRB data with raw uint8 pixels is divided by 255 prior to training + # reflect this in the inference graph so we can perform inference directly + # on raw uint8 data + in_name = model.graph.input[0].name + new_in_name = model.make_new_valueinfo_name() + new_param_name = model.make_new_valueinfo_name() + div_param = np.asarray(255.0, dtype=np.float32) + new_div = oh.make_node( + "Div", + [in_name, new_param_name], + [new_in_name], + name="PreprocDiv", + ) + model.set_initializer(new_param_name, div_param) + model.graph.node.insert(0, new_div) + model.graph.node[1].input[0] = new_in_name + # set input dtype to uint8 + model.set_tensor_datatype(in_name, DataType["UINT8"]) + return model + + +custom_build_steps = [custom_step_add_preproc] + default_build_dataflow_steps + +# determine which shell flow to use for a given platform +def platform_to_shell(platform): + if platform in zynq_platforms: + return build_cfg.ShellFlowType.VIVADO_ZYNQ + else: + raise Exception("Unknown platform, can't determine ShellFlowType") + + +# create a release dir, used for finn-examples release packaging +os.makedirs("release", exist_ok=True) + +for platform_name in platforms_to_build: + shell_flow_type = platform_to_shell(platform_name) + vitis_platform = None + # for Zynq, use the board name as the release name + # e.g. ZCU104 + release_platform_name = platform_name + platform_dir = "release/%s" % release_platform_name + os.makedirs(platform_dir, exist_ok=True) + for model_name in models: + # set up the build configuration for this model + cfg = build_cfg.DataflowBuildConfig( + output_dir="output_%s_%s" % (model_name, release_platform_name), + folding_config_file="folding_config/%s_folding_config.json" % model_name, + synth_clk_period_ns=10.0, + board=platform_name, + steps=custom_build_steps, + shell_flow_type=shell_flow_type, + vitis_platform=vitis_platform, + generate_outputs=[build_cfg.DataflowOutputType.BITFILE], + #stop_step="step_create_dataflow_partition", + save_intermediate_models=True, + ) + model_file = "models/%s.onnx" % model_name + # launch FINN compiler to build + build.build_dataflow_cfg(model_file, cfg) + # copy bitfiles into release dir if found + bitfile_gen_dir = cfg.output_dir + "/bitfile" + files_to_check_and_copy = [ + "finn-accel.bit", + "finn-accel.hwh", + "finn-accel.xclbin", + ] + for f in files_to_check_and_copy: + src_file = bitfile_gen_dir + "/" + f + dst_file = platform_dir + "/" + f.replace("finn-accel", model_name) + if os.path.isfile(src_file): + shutil.copy(src_file, dst_file) diff --git a/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json b/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json new file mode 100644 index 0000000..06d02d8 --- /dev/null +++ b/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json @@ -0,0 +1,80 @@ +{ + "Defaults": {}, + "Thresholding_Batch_0": { + "PE": 1, + "ram_style": "distributed" + }, + "ConvolutionInputGenerator_0": { + "SIMD": 3, + "ram_style": "distributed" + }, + "MatrixVectorActivation_0": { + "PE": 16, + "SIMD": 3, + "ram_style": "auto" + }, + "ConvolutionInputGenerator_1": { + "SIMD": 32, + "ram_style": "distributed" + }, + "MatrixVectorActivation_1": { + "PE": 32, + "SIMD": 32, + "ram_style": "auto" + }, + "ConvolutionInputGenerator_2": { + "SIMD": 32, + "ram_style": "distributed" + }, + "MatrixVectorActivation_2": { + "PE": 16, + "SIMD": 32, + "ram_style": "auto" + }, + "ConvolutionInputGenerator_3": { + "SIMD": 32, + "ram_style": "distributed" + }, + "MatrixVectorActivation_3": { + "PE": 16, + "SIMD": 32, + "ram_style": "auto" + }, + "ConvolutionInputGenerator_4": { + "SIMD": 32, + "ram_style": "distributed" + }, + "MatrixVectorActivation_4": { + "PE": 4, + "SIMD": 32, + "ram_style": "auto" + }, + "ConvolutionInputGenerator_5": { + "SIMD": 32, + "ram_style": "distributed" + }, + "MatrixVectorActivation_5": { + "PE": 1, + "SIMD": 32, + "ram_style": "auto" + }, + "MatrixVectorActivation_6": { + "PE": 1, + "SIMD": 4, + "ram_style": "auto" + }, + "MatrixVectorActivation_7": { + "PE": 1, + "SIMD": 8, + "ram_style": "auto" + }, + "MatrixVectorActivation_8": { + "PE": 4, + "SIMD": 1, + "ram_style": "auto" + }, + "LabelSelect_Batch_0": { + "PE": 1 + } + } + \ No newline at end of file From ddd0840c9f7e55d2be3fc7f9ea9832b00d1609c1 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Mon, 19 Dec 2022 12:45:38 +0100 Subject: [PATCH 02/53] fix board name typo --- build/gtsrb/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gtsrb/build.py b/build/gtsrb/build.py index b0adfc5..88081a2 100644 --- a/build/gtsrb/build.py +++ b/build/gtsrb/build.py @@ -13,7 +13,7 @@ ] # which platforms to build the networks for -zynq_platforms = ["Pynq-Z1"] +zynq_platforms = ["ZUBoard-1CG"] platforms_to_build = zynq_platforms def custom_step_add_preproc(model, cfg): From 3e943ec60a36ab75fc7fc8fab6566764e88dd257 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Tue, 7 Feb 2023 14:49:10 +0300 Subject: [PATCH 03/53] [GTSRB] switch to Pynq-Z1 and auto folding to 3k FPS --- build/gtsrb/build.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/build/gtsrb/build.py b/build/gtsrb/build.py index 88081a2..c6103a3 100644 --- a/build/gtsrb/build.py +++ b/build/gtsrb/build.py @@ -9,11 +9,11 @@ from onnx import helper as oh models = [ - "cnv_gtsrb", + "cnv_1w1a_gtsrb", ] # which platforms to build the networks for -zynq_platforms = ["ZUBoard-1CG"] +zynq_platforms = ["Pynq-Z1"] platforms_to_build = zynq_platforms def custom_step_add_preproc(model, cfg): @@ -63,13 +63,18 @@ def platform_to_shell(platform): # set up the build configuration for this model cfg = build_cfg.DataflowBuildConfig( output_dir="output_%s_%s" % (model_name, release_platform_name), - folding_config_file="folding_config/%s_folding_config.json" % model_name, + target_fps=3000, synth_clk_period_ns=10.0, board=platform_name, steps=custom_build_steps, shell_flow_type=shell_flow_type, vitis_platform=vitis_platform, - generate_outputs=[build_cfg.DataflowOutputType.BITFILE], + generate_outputs=[ + build_cfg.DataflowOutputType.ESTIMATE_REPORTS, + build_cfg.DataflowOutputType.STITCHED_IP, + build_cfg.DataflowOutputType.RTLSIM_PERFORMANCE, + build_cfg.DataflowOutputType.BITFILE, + ], #stop_step="step_create_dataflow_partition", save_intermediate_models=True, ) From 4b4b505de5ed1d9d0a94fd7b0f2d31293c89140c Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Wed, 8 Feb 2023 00:05:48 +0300 Subject: [PATCH 04/53] [GTSRB] add i/o shapes and inst fxn --- finn_examples/models.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/finn_examples/models.py b/finn_examples/models.py index 8a10f77..0f2ad70 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -67,6 +67,17 @@ "num_outputs": 1, } +_gtsrb_cnv_io_shape_dict = { + "idt": DataType["UINT8"], + "odt": DataType["INT16"], + "ishape_normal": (1, 32, 32, 3), + "oshape_normal": (1, 44), + "ishape_folded": (1, 1, 32, 32, 3, 1), + "oshape_folded": (1, 11, 4), + "ishape_packed": (1, 1, 32, 32, 3, 1), + "oshape_packed": (1, 11, 8), +} + _bincop_cnv_io_shape_dict = { "idt": [DataType["UINT8"]], "odt": [DataType["UINT8"]], @@ -329,7 +340,6 @@ def resnet50_w1a2_imagenet(target_platform=None): runtime_weight_dir=runtime_weight_dir, ) - def vgg10_w4a4_radioml(target_platform=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() @@ -343,7 +353,6 @@ def vgg10_w4a4_radioml(target_platform=None): fclk_mhz=fclk_mhz, ) - def mlp_w2a2_unsw_nb15(target_platform=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() @@ -353,3 +362,10 @@ def mlp_w2a2_unsw_nb15(target_platform=None): return FINNExampleOverlay( filename, driver_mode, _unsw_nb15_mlp_io_shape_dict, fclk_mhz=fclk_mhz ) + +def cnv_w1a1_gtsrb(target_platform=None): + target_platform = resolve_target_platform(target_platform) + driver_mode = get_driver_mode() + model_name = "cnv-gtsrb-w1a1" + filename = find_bitfile(model_name, target_platform) + return FINNExampleOverlay(filename, driver_mode, _gtsrb_cnv_io_shape_dict) \ No newline at end of file From ad4a2e6172d78d0a4d35cccf83415b6348e75beb Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Wed, 8 Feb 2023 00:06:59 +0300 Subject: [PATCH 05/53] [GTSRB] add notebook example --- .../6_traffic_sign_recognition_gtsrb.ipynb | 441 ++++++++++++++++++ 1 file changed, 441 insertions(+) create mode 100644 finn_examples/notebooks/6_traffic_sign_recognition_gtsrb.ipynb diff --git a/finn_examples/notebooks/6_traffic_sign_recognition_gtsrb.ipynb b/finn_examples/notebooks/6_traffic_sign_recognition_gtsrb.ipynb new file mode 100644 index 0000000..f512b3e --- /dev/null +++ b/finn_examples/notebooks/6_traffic_sign_recognition_gtsrb.ipynb @@ -0,0 +1,441 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Initialize the accelerator" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "\n", + "try {\n", + "require(['notebook/js/codecell'], function(codecell) {\n", + " codecell.CodeCell.options_default.highlight_modes[\n", + " 'magic_text/x-csrc'] = {'reg':[/^%%microblaze/]};\n", + " Jupyter.notebook.events.one('kernel_ready.Kernel', function(){\n", + " Jupyter.notebook.get_cells().map(function(cell){\n", + " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", + " });\n", + "});\n", + "} catch (e) {};\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\n", + "try {\n", + "require(['notebook/js/codecell'], function(codecell) {\n", + " codecell.CodeCell.options_default.highlight_modes[\n", + " 'magic_text/x-csrc'] = {'reg':[/^%%pybind11/]};\n", + " Jupyter.notebook.events.one('kernel_ready.Kernel', function(){\n", + " Jupyter.notebook.get_cells().map(function(cell){\n", + " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", + " });\n", + "});\n", + "} catch (e) {};\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from finn_examples import models\n", + "accel = models.cnv_w1a1_gtsrb()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Expected input shape and datatype: (1, 32, 32, 3) UINT8\n", + "Expected output shape and datatype: (1, 44) INT16\n" + ] + } + ], + "source": [ + "print(\"Expected input shape and datatype: %s %s\" % (str(accel.ishape_normal), str(accel.idt)))\n", + "print(\"Expected output shape and datatype: %s %s\" % (str(accel.oshape_normal), str(accel.odt)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Load the GTSRB dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "from os import path\n", + "import urllib\n", + "import numpy as np\n", + "dataset_local = \"/tmp/traffic-signs-data.zip\"\n", + "if not path.isfile(dataset_local):\n", + " dataset_url = \"https://d17h27t6h515a5.cloudfront.net/topher/2017/February/5898cd6f_traffic-signs-data/traffic-signs-data.zip\"\n", + " urllib.request.urlretrieve(dataset_url, dataset_local)\n", + " ! unzip {dataset_local} -d /tmp\n", + "\n", + "dataset_dict = np.load(\"/tmp/test.p\")\n", + "testx = dataset_dict[\"features\"]\n", + "testy = dataset_dict[\"labels\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "gtsrb_classes = [\n", + " '20 Km/h', \n", + " '30 Km/h', \n", + " '50 Km/h', \n", + " '60 Km/h', \n", + " '70 Km/h', \n", + " '80 Km/h', \n", + " 'End 80 Km/h', \n", + " '100 Km/h', \n", + " '120 Km/h', \n", + " 'No overtaking', \n", + " 'No overtaking for large trucks', \n", + " 'Priority crossroad', \n", + " 'Priority road', \n", + " 'Give way', \n", + " 'Stop', \n", + " 'No vehicles', \n", + " 'Prohibited for vehicles with a permitted gross weight over 3.5t including their trailers, and for tractors except passenger cars and buses', \n", + " 'No entry for vehicular traffic', \n", + " 'Danger Ahead', \n", + " 'Bend to left', \n", + " 'Bend to right', \n", + " 'Double bend (first to left)', \n", + " 'Uneven road', \n", + " 'Road slippery when wet or dirty', \n", + " 'Road narrows (right)', \n", + " 'Road works', \n", + " 'Traffic signals', \n", + " 'Pedestrians in road ahead', \n", + " 'Children crossing ahead', \n", + " 'Bicycles prohibited', \n", + " 'Risk of snow or ice', \n", + " 'Wild animals', \n", + " 'End of all speed and overtaking restrictions', \n", + " 'Turn right ahead', \n", + " 'Turn left ahead', \n", + " 'Ahead only', \n", + " 'Ahead or right only', \n", + " 'Ahead or left only', \n", + " 'Pass by on right', \n", + " 'Pass by on left', \n", + " 'Roundabout', \n", + " 'End of no-overtaking zone', \n", + " 'End of no-overtaking zone for vehicles with a permitted gross weight over 3.5t including their trailers, and for tractors except passenger cars and buses', \n", + " 'Not a roadsign'\n", + "]" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dataset shape is (12630, 32, 32, 3)\n" + ] + } + ], + "source": [ + "print(\"Dataset shape is \" + str(testx.shape))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Classify a single image" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "test_single_x = testx[0]\n", + "test_single_y = testy[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAHRlJREFUeJztnVuMXNd1pv91TlU1+8Jbs0mqeRGpmy1rZJmSO4pvMewECRTDgOzBwLAfDD0YYTCIgRjIPAgeYOwB5sGZiW34IXBAj4QoA8eX+AIrE2NiR/CMknFGFmVJlChaskSREqkmmxS7ye5ms7vrnDUPVXRa9PlXF/tSTWX/H0Cweq/aZ+/addY5VfuvtZa5O4QQ6ZGt9QSEEGuDnF+IRJHzC5Eocn4hEkXOL0SiyPmFSBQ5vxCJIucXIlHk/EIkSm05nc3sHgBfAZAD+O/u/oXo+b39G3zj4LZq45J+aWiBrYu/XPQyMHKbZXV+yHjAwLSE123BOvp80DG6d7BjRmMFJi+WMBY/ZHTmhPMIjM0mX6s8565Gjxm8L2VRvR7TkxOYnZkOX95lluz8ZpYD+HMAvwvgBIDHzexhd3+O9dk4uA2f/OP/Vm0s+ZubkUVw5MEMm9RSBmN5eHKSN6mcC+ZxkVp6erdTW+HBG1/y1+blTGV7Frwss15qa86forbM1lFbSd6b3Bp8IgWf5Pz8BT5Wyc+Dsqy+QGXGndgLfsGeL3i/iYnXqG3DhiFqaxbV76f3cPecmhivbP+H7/wF7XMly/nYfzeAF939qLvPAfgmgHuXcTwhRBdZjvPvBPDqgr9PtNuEEG8CVn3Dz8z2m9lBMzt4cYp/dBNCdJflOP9JALsX/L2r3fYG3P2Au4+4+0jfwIZlDCeEWEmW4/yPA7jFzG4wswaAjwN4eGWmJYRYbZa82+/uTTP7NIC/R0vqe9DdDy/aLyfXm2iTnez2l2SXtNWJ7+jXavxlF01+zIJsmefBMhoGqA3Od6kjxS6PrtlZ9Q58qGIEMlTNruP9Sr4rnjOFxvhrthp/XX29XJGwQBIrvPqYHkmwxucRvddbd+6mtrn54FzNqudigSq1fbD6ffnHHq7AXMmydH53/yGAHy7nGEKItUG/8BMiUeT8QiSKnF+IRJHzC5Eocn4hEmVZu/1LIWMRcEHkSUEkj1oQ12PBSyuC4AzL+EFrdIpBkEgYoBMEMwX9oiA8FgQVvGQaIdYejVuCtSrJ+2xBBKTlgfQZyG9RoFNOAnjK4OTJAjmyLIP1COTDLDi/mfyZBetREnlwkXjFNx6/42cKIf5VIecXIlHk/EIkipxfiESR8wuRKF3d7TcAGdkZjwJPMpY9KwjsybMePo9gxzlfQhavIOtTGEASBe9kwWW5GWzdO3lt5fws7VPOBbaCpyjLLNjdJsFTeY2n8crq/D1DjQf2hPIHs5XBGkYpviJlJ7BFwUJG+kXn6ZJyJF6B7vxCJIqcX4hEkfMLkShyfiESRc4vRKLI+YVIlK5Kfe5OZap6HgS5kEtUAV7uqhmoJPVAz1tKkEsUCNIMcgIy2RMA5qd5pZ9L56urtQDA+dFXK9vHT75E+0xN/FrS5V/RnJ+mNgSSWF6vftO2bdtB++zc+2+obWDrHj7WBp4V2tdV26Lzw5i2jEUqm4Vlw7hkyoKg8kCOzOtEMu1c6dOdX4hUkfMLkShyfiESRc4vRKLI+YVIFDm/EImyLKnPzI4BmARQAGi6+0jcgafq8yjnXrNafnOax4zn/WtNI8gjF8o1JB9cM5BxZnnE3JmxM9R26pdPUNu5Y89Qm02fq2zPAwkzih7jeQsBC0Mgq5vPjp2lXcYO89dVG+BRfdvewuXDPfs+XNnev2Uv7XMpkNgQ5I0EglJvUb7GvFqytqAcWuQvnbISOv8H3Z2/o0KIaxJ97BciUZbr/A7gR2b2hJntX4kJCSG6w3I/9r/P3U+a2TYAPzazX7j7owuf0L4o7AeADZuGljmcEGKlWNad391Ptv8fA/B9AHdXPOeAu4+4+0jvAP8NthCiuyzZ+c2s38zWX34M4PcAPLtSExNCrC7L+di/HcD3rRXmVAPw1+7+v8IeDjiRnOYCdaV+9TkYYVFyySAKD4G8QhRHTI3zCLyzR7l8dfb5g9RWnBultnqQjLOluv4685EqFySXDKPEoqgzkp00LGkVSI7Nc5eo7fjjXGyaPnu+sn3nre+mfba8ldusj396bUbnY3SfpSXAllbqrVOW7PzufhTAO5Y9AyHEmiCpT4hEkfMLkShyfiESRc4vRKLI+YVIlK4m8AS4qpEHElCTXKOiyKYs4xFWpQcSivOkoNNnq6PwRl94mvY5+9w/Uls2xSWqPIgQswa/Zvdv3FLdvvtm2mdg805q6+sPpK1A6ps883pl+4VTp2mfC2M8kahfeo3agtyvGD/6cmV7Ocnl2XKWJy0dvuP91OaNQWorAum5JOd+oBzSmoweFYC8At35hUgUOb8QiSLnFyJR5PxCJIqcX4hE6W65Ljic7GwWwXWoTnY2y2C3uQx3V/lYF89PUdtrLx2pbD/3i8doH5s6xW0+T20btw9T23W33M773XRbZXttyy7aJ69vorZo77gMalcNWvWpZaRcGwCcP8V3+1959p+p7dRhHiDVP1sd2DN1Zoz2OR2MVevhLjP0tg9S21y+jtqY+JSTIC0AMK8+h6+iWpfu/EKkipxfiESR8wuRKHJ+IRJFzi9Eosj5hUiUrkp9ZoY8q77eRPnPSlYmK5DzIomqOcPLa42/8iK1nX+hWlIqJ7lEVc/5TIb37qG2Hbe/l9rWXc+zp3kPke0ynrcwklnNArkpWH8QGdMaPHBq026+Huu37Ka2wWEetPTCT/+usr0xzgOFJsaqg5IAID/8U2rbtI0HSGVD1RIsAHiduGFUco7mmlRgjxBiEeT8QiSKnF+IRJHzC5Eocn4hEkXOL0SiLCr1mdmDAD4MYMzdb2+3DQL4FoC9AI4B+Ji7j3cyoJG4o3pQMorlJbOwXBePmJs6Vx3pBQCvv3iI2pqvv1LZ3hPkC9y8k1cmHn47l/P6rr+T2ooGz6tXEkkvC+O9gnyBgURoQdkzJkVFJ1wzmEc+wOe//a2/wY9ZNirbj/6f79A+jRkeiXl+lJ87oy/8b2q7boDLgGW9eo4erD0KIvV1rvR1dOf/SwD3XNF2P4BH3P0WAI+0/xZCvIlY1Pnd/VEA565ovhfAQ+3HDwH4yArPSwixyiz1O/92d79cRvYUWhV7hRBvIpa94eetL+T0m4aZ7Tezg2Z2cGbqwnKHE0KsEEt1/tNmNgwA7f9pTiR3P+DuI+4+0jvAN6qEEN1lqc7/MID72o/vA/CDlZmOEKJbdCL1fQPABwAMmdkJAJ8D8AUA3zazTwE4DuBjnQ1nVB4q5iO5qVrm8SDBYTHHpaGJU9WSHQBcOn2U2upldXLPjZs30j7Dt95FbX27uZw3W+ujtixInFkS/bNZcOkzD47X5N3gzte/RqTbIki6Gt6KghJr+ToeXbh17x2V7RdOczlv4pkfUVsxxyP+Tr10nNo27akuGwYA9b7qT8Ru1RIgAJSsXBft8ess6vzu/gli+p2rGEcIcY2hX/gJkShyfiESRc4vRKLI+YVIFDm/EInS1QSecIcTqcdyfh0qSYRYAR71NDPFa+6df+1VarOZaWqrk+E27riO9tmw663U1uzppTZkPNFlEcheMxerk5OeHOUS5vzF56ltdprXmOup8zn29FT3y2v8eLUal7YaNf5e9zS4LNpDJNOhG3nSz4vHX6C2udcnqG1mfJbbzrxEbfXrbiKGQdoniqjsFN35hUgUOb8QiSLnFyJR5PxCJIqcX4hEkfMLkSjdlfoAACQaKUhW6ETqmw9Czi5NXeK2idPUVi+5XNM7UC0b1bfzOnJlz1ZqOz8+SW0XJs9Q2xyJLgSAmamZyvZjY1dmYvsXXnryJ9TWW3BZMb5zEEk3TNQa1QzkI9VJ/UcA2Ll9oLL9He/5t7TPuiGedHVmnMuRtSY/dy6+zus5bpivfj9zVncRAEhC1midrkR3fiESRc4vRKLI+YVIFDm/EIki5xciUbq+208De4Icc2ySRbC1OT/Fd9JthpdcKo3npWtsqA60yDfw3eGpIJdgeZGnMm/M8uvyky/wwJP+rFoZmZmqDvgBgKzgATooqtUDIEyrh4zswDvJPQfEO9VFwbPT1VnpKgD5peod+N6Snx99g5upbaJWrR4AAGa5wjQ7yc85zFavcdnHz0XPe6rbw7Jsb0R3fiESRc4vRKLI+YVIFDm/EIki5xciUeT8QiRKJ+W6HgTwYQBj7n57u+3zAP4AwOXok8+6+w87GTAjUkQQPwIvqyWPMpB45oJcfMU8l2RqpNwVANRJzromyVcHAFMzfCwveD44C/K39YIHl2C+WjbysO4Wt0XyW3znIFJfVFDKuS0LAoKMBH4BQC2vXqtag8ub2QDPrehZYKMWYG6Or3FB3hsmiwNAHqxHp3RyhL8EcE9F+5fdfV/7X0eOL4S4dljU+d39UQA8HlQI8aZkOZ8dPm1mh8zsQTPjP4kSQlyTLNX5vwrgJgD7AIwC+CJ7opntN7ODZnZwZpr/nFUI0V2W5PzuftrdC2/9UPtrAO4OnnvA3UfcfaS3v7oOuRCi+yzJ+c1seMGfHwXw7MpMRwjRLTqR+r4B4AMAhszsBIDPAfiAme1DS904BuAPOx2wJNpRGcg8TH1zkg8QiGVAC/pFx2QlxaYDSeb4KC8NdvQwz51XTnOJMK9z2eiGbTurj5dxedAb/B4wO8dPkSh3XuNqksn9aiKBdBucH3k9kAEb1fMvg5yRlvG5W9QvjKgL7rPkteXB+jLL1az6os7v7p+oaH7gKsYQQlyD6Bd+QiSKnF+IRJHzC5Eocn4hEkXOL0SidDWBpwOYIxFYjUBCKYl+4eAJDkGiuQDAAwklDDprVht9nktURVmdaBEASue/it61o5/3mw/KfE1Xr+PmDdton7138pJiWRAx5x4kmCQ2FqEJAEUQ+TY916Q2NHn5svUbyCle4+tbzPBoS3c+Dw/kzXo9KEdHIvQi2a4sq+fhgSR6JbrzC5Eocn4hEkXOL0SiyPmFSBQ5vxCJIucXIlG6Xqsvy4gUEUhKRiQUVg8OAOrruJSDeh+3BUsyN10tsW0squvBAcC2wd3UNrphPbW9NnaI2m7awqW5uY3ViT+np0dpnxMTPIKw2eS2ouSvu6e3+rXN8rcZPXN8rL51PElqZlx+mzUS1ef83Jmb5NKhB7Iii1gFgFr/RmrL+6rXqpbxc7EomDyoWn1CiEWQ8wuRKHJ+IRJFzi9Eosj5hUiULu/2O4wEHhRR7jwnu/3Btat/A9/Rt0AJKCf4MS9NV+/0bp1+nfbZe/Od1DY5s4/a5rZwJeCdu3dR28DO66sNwWsOwqPQDHIhRkFQ46fOV7Y/+fJh2mfuxM+o7S17ePmyXXvfS23ZQHXw1NR5rixcPPsatVmTl4EzXgEM9Y08sKrMq8/VggSStQbrPICHoTu/EIki5xciUeT8QiSKnF+IRJHzC5Eocn4hEqWTcl27AfwVgO1oiTsH3P0rZjYI4FsA9qJVsutj7j6+yNEAElARlcnKiKxRM95nXT8PBFkXyC5zY8epbWZuprL9wivHaJ+bbhijtvfccSu1NfFWaqsF5aRA8sHlwXU+DzS7eh7kVgxEwm3Xb6ps/8DwEO3TnOPr0cj5a27U+Ps5P1+dQ3Hstcdon7lxXmKt7jzP4Lp+njdyy3Ye4GV5tUZIYncAADn1l5XN4dcE8CfufhuAdwH4IzO7DcD9AB5x91sAPNL+WwjxJmFR53f3UXf/efvxJIAjAHYCuBfAQ+2nPQTgI6s1SSHEynNV3/nNbC+AOwE8BmC7u18OEj+F1tcCIcSbhI6d38wGAHwXwGfc/cJCm7eShVd+2TCz/WZ20MwOzkxfqHqKEGIN6Mj5zayOluN/3d2/124+bWbDbfswgMqdLXc/4O4j7j7S279hJeYshFgBFnV+a+XQegDAEXf/0gLTwwDuaz++D8APVn56QojVopOovvcC+CSAZ8zsqXbbZwF8AcC3zexTAI4D+NjihzKA5CXLSi6hsNJPlgc5/Pq41Ldxx03UdvrEL6itOVX9tWV89BQ/3vNcUtpxF5e9vKdaKgMANy6/sXyHzSC3mweBe6F0FElRVv2eNWo89G1dvoPajEiYAFAW/DR+/US1dDt1lOdILKa5PNuo83XcvHOY99vMIzHLevW56kHkXlmS0nG0x6+zqPO7+z+Blw37nasYSwhxDaFf+AmRKHJ+IRJFzi9Eosj5hUgUOb8QidLVBJ4Gh5FopKjIEFWigpJLyLh+NbhzL7Wdu24PtTVfPlfZfnGKl3A6eeRpamv0X0dtg2+5m9rmenhyTyclzEje1DaBDBh1K3k/okSF0YUejOa8Ihdef+U0tY0erpZaZ079kvbJUR29CQA9m3ki0aEb305t6OORh0VJ3DA6vVmpus6rdenOL0SqyPmFSBQ5vxCJIucXIlHk/EIkipxfiETpcq0+gAl3QdAWrGBRbDy6La9xbaixnkeWDd82Qm3HzlVHe5XjL9M+F85epLajT/wttc3P8ijHHbe/h9ouNQYq251E+wGARQlBnSelNONrnJPkqvNlkKh1licEPXPsJLW9+tw/U9vk8Scr2+sFf19qffw1b7vlZmrrH76D2soajzKtUdmOOwVfqc61Pt35hUgUOb8QiSLnFyJR5PxCJIqcX4hE6epufyu/d3XwBstJBgAZy9VX8j3P0rkSUG/wHdFN26+nth1vf3dl+8kneSBIOcnz+50f4zv6k//3x9R27Pn/R203v/O3KtuHdr+T9mn08qzKpV8KbNSEYr7aOD7Gg3BOHqnemQeAs6/wAKn582eprYfkf8wafPK73/Y2ahu6+V3Ulq/fSm1UsAKQgZwHGVcdyiCoqlN05xciUeT8QiSKnF+IRJHzC5Eocn4hEkXOL0SiLCr1mdluAH+FVgluB3DA3b9iZp8H8AcAzrSf+ll3/2F4LPCwAw+Ui4LUk8qjDHNlFHTCB6v38MCTzbv3Vhv8g7TPa8/+lNqaE9WlpACgdmmO2i6ePENth8f+rtrQz4Nf6n3VwUAAUO/pobZmwddqdqZa/vRpnu/QL/Fgm6icW0/G3+uegeogrutvvYv22fq236S2xtBeaivrXJqLcig2mWwXyHn0eFdRr6sTnb8J4E/c/edmth7AE2Z2WYT+srv/WefDCSGuFTqp1TcKYLT9eNLMjgDYudoTE0KsLlf1nd/M9gK4E8DlfMifNrNDZvagmW1e4bkJIVaRjp3fzAYAfBfAZ9z9AoCvArgJwD60Phl8kfTbb2YHzezgxenqEtdCiO7TkfObWR0tx/+6u38PANz9tLsX7l4C+BqAyioT7n7A3UfcfaSvn/+GXAjRXRZ1fjMzAA8AOOLuX1rQPrzgaR8F8OzKT08IsVp0stv/XgCfBPCMmT3VbvssgE+Y2T60xIVjAP5wsQM5HE5CwcpAfmO6RknyxAGA1YJSUkUgoeQ8/Kp3U7Uk1tv7FtpnwyDfCnnhMS6/4dwRamrOTVNbOV8te9kElweLwMYFRyAL8sUZ0Zws0LwKXpgNWZ2P1Res8Z7bf6Oyff0Nd/KxBvl+drPGXaaMyp4ZP68yY+c37UL7XE25rk52+/+JHDLU9IUQ1zb6hZ8QiSLnFyJR5PxCJIqcX4hEkfMLkShdTeBpMC4PBdFIVL0I+rBEoYt1zEP5qlqKqvXyaK7Gnhup7a4gWeiZlx+nttO/OExtxenqBJnW5ElGveRJOmMFlktzrGOtwctW9Q9tp7ahvXupbeuNt1BbvnlPZbs3+A/Oiixwi+ici0qRsZJcAEpyXkWRrsEsOn6m7vxCJIqcX4hEkfMLkShyfiESRc4vRKLI+YVIlK5KfQCQ5dX6RRkkgzQiGxVB2FOW85dWM17jr4iUkrL6WlkGkYBByUD01KuTSwLAriDB5LYb9lHb9PnxyvaL4ydpn7lLE9RWNnnizFrOF2vduurEn30bttA+fRt5rbtGP+9njV5qQ1b9BrCgOABhDUhjdSMBFIHMVgbHdCL1ZbwLjEQJXo06qDu/EIki5xciUeT8QiSKnF+IRJHzC5Eocn4hEqXLUp8DJBIsc65rsCuUB5FS7oEtiL7yIMGkEdkIWSA5BtpLHl171wX18+q8Nt2m/uqouaEd19E+LNkmALjzU8SNp/ckii5Q4/ImwHXRMng/m0H4m1n1WtWyYB7B8eaDGpBZkKQzWmNqCs5FJiFfRak+3fmFSBU5vxCJIucXIlHk/EIkipxfiERZdLffzNYBeBRAT/v533H3z5nZDQC+CWALgCcAfNLdo+pOAPhuugdTaTard+etFgRLRIEUwQ42sqCcVDFb3cX48bJoB7sIAkiMX5ejMlkZCTwpSJk0AMiXqJqU4DvmLLAqjKcJdtLj+1SQS5AM6HnQZwlBZgBQBiqSBfkOSzLJWlCOjgcRrWwOv1kAv+3u70CrHPc9ZvYuAH8K4MvufjOAcQCf6nhUIcSas6jze4up9p/19j8H8NsAvtNufwjAR1ZlhkKIVaGj7/xmlrcr9I4B+DGAlwBMuPvlz2knAPDSpkKIa46OnN/dC3ffB2AXgLsB3NrpAGa238wOmtnBi9OTS5ymEGKluardfnefAPATAO8GsMnsVztduwBUpopx9wPuPuLuI33965c1WSHEyrGo85vZVjPb1H7cC+B3ARxB6yLw79pPuw/AD1ZrkkKIlaeTwJ5hAA9ZK2lYBuDb7v4/zew5AN80s/8C4EkADyx2IAcPwijBZa9eMksP5LD5SP4JErgVYYARCUoKxvJgLI9qYUVlsoLchU0iN1kQYVQGcqQF888Cqa9okn7B7YblpWuxhMAYABkxNgOZNSO5GlvGQII1nu8wkgGzGnvdgQRL16rzLH6LOr+7HwJwZ0X7UbS+/wsh3oToF35CJIqcX4hEkfMLkShyfiESRc4vRKJYlLNuxQczOwPgePvPIQBnuzY4R/N4I5rHG3mzzWOPu/O6ZwvoqvO/YWCzg+4+siaDax6ah+ahj/1CpIqcX4hEWUvnP7CGYy9E83gjmscb+Vc7jzX7zi+EWFv0sV+IRFkT5zeze8zseTN70czuX4s5tOdxzMyeMbOnzOxgF8d90MzGzOzZBW2DZvZjM/tl+//NazSPz5vZyfaaPGVmH+rCPHab2U/M7DkzO2xmf9xu7+qaBPPo6pqY2Toz+5mZPd2ex39ut99gZo+1/eZbZtZY1kDu3tV/aBVkewnAjQAaAJ4GcFu359GeyzEAQ2sw7vsB3AXg2QVt/xXA/e3H9wP40zWax+cB/Icur8cwgLvaj9cDeAHAbd1ek2AeXV0TtOJyB9qP6wAeA/AuAN8G8PF2+18A+PfLGWct7vx3A3jR3Y96K9X3NwHcuwbzWDPc/VEA565ovhetRKhAlxKiknl0HXcfdfeftx9PopUsZie6vCbBPLqKt1j1pLlr4fw7Aby64O+1TP7pAH5kZk+Y2f41msNltrv7aPvxKQDb13AunzazQ+2vBav+9WMhZrYXrfwRj2EN1+SKeQBdXpNuJM1NfcPvfe5+F4DfB/BHZvb+tZ4Q0Lry4+qqLa8kXwVwE1o1GkYBfLFbA5vZAIDvAviMu19YaOvmmlTMo+tr4stImtspa+H8JwHsXvA3Tf652rj7yfb/YwC+j7XNTHTazIYBoP3/2FpMwt1Pt0+8EsDX0KU1MbM6Wg73dXf/Xru562tSNY+1WpP22FedNLdT1sL5HwdwS3vnsgHg4wAe7vYkzKzfzNZffgzg9wA8G/daVR5GKxEqsIYJUS87W5uPogtrYq0aWA8AOOLuX1pg6uqasHl0e026ljS3WzuYV+xmfgitndSXAPzHNZrDjWgpDU8DONzNeQD4BlofH+fR+u72KbRqHj4C4JcA/gHA4BrN438AeAbAIbScb7gL83gfWh/pDwF4qv3vQ91ek2AeXV0TAHeglRT3EFoXmv+04Jz9GYAXAfwNgJ7ljKNf+AmRKKlv+AmRLHJ+IRJFzi9Eosj5hUgUOb8QiSLnFyJR5PxCJIqcX4hE+f/v3sRbPjbpNQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%matplotlib inline\n", + "from matplotlib import pyplot as plt\n", + "\n", + "plt.imshow(test_single_x)\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Expected class is:\n", + "Prohibited for vehicles with a permitted gross weight over 3.5t including their trailers, and for tractors except passenger cars and buses\n" + ] + } + ], + "source": [ + "print(\"Expected class is:\\n%s\" % (gtsrb_classes[test_single_y]))" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Accelerator result is:\n", + "Prohibited for vehicles with a permitted gross weight over 3.5t including their trailers, and for tractors except passenger cars and buses\n" + ] + } + ], + "source": [ + "accel_y = accel.execute(test_single_x.reshape(accel.ishape_normal))\n", + "print(\"Accelerator result is:\\n%s\" % (gtsrb_classes[np.argmax(accel_y)]))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Validate accuracy on GTSRB test set" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ready to run validation, test images tensor has shape (30, 421, 3072)\n", + "Accelerator buffer shapes are (421, 1, 32, 32, 3, 1) for input, (421, 11, 8) for output\n" + ] + } + ], + "source": [ + "batch_size = 421\n", + "total = testx.shape[0]\n", + "accel.batch_size = batch_size\n", + "n_batches = int(total / batch_size)\n", + "\n", + "batch_imgs = testx.reshape(n_batches, batch_size, -1)\n", + "batch_labels = testy.reshape(n_batches, batch_size)\n", + "obuf_normal = np.empty_like(accel.obuf_packed_device)\n", + "print(\"Ready to run validation, test images tensor has shape %s\" % str(batch_imgs.shape))\n", + "print(\"Accelerator buffer shapes are %s for input, %s for output\" % (str(accel.ishape_packed), str(accel.oshape_packed)) )" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "batch 0 / 30 : total OK 401 NOK 20\n", + "batch 1 / 30 : total OK 798 NOK 44\n", + "batch 2 / 30 : total OK 1203 NOK 60\n", + "batch 3 / 30 : total OK 1605 NOK 79\n", + "batch 4 / 30 : total OK 2003 NOK 102\n", + "batch 5 / 30 : total OK 2404 NOK 122\n", + "batch 6 / 30 : total OK 2806 NOK 141\n", + "batch 7 / 30 : total OK 3210 NOK 158\n", + "batch 8 / 30 : total OK 3609 NOK 180\n", + "batch 9 / 30 : total OK 4009 NOK 201\n", + "batch 10 / 30 : total OK 4404 NOK 227\n", + "batch 11 / 30 : total OK 4805 NOK 247\n", + "batch 12 / 30 : total OK 5205 NOK 268\n", + "batch 13 / 30 : total OK 5605 NOK 289\n", + "batch 14 / 30 : total OK 5996 NOK 319\n", + "batch 15 / 30 : total OK 6403 NOK 333\n", + "batch 16 / 30 : total OK 6796 NOK 361\n", + "batch 17 / 30 : total OK 7200 NOK 378\n", + "batch 18 / 30 : total OK 7596 NOK 403\n", + "batch 19 / 30 : total OK 7994 NOK 426\n", + "batch 20 / 30 : total OK 8397 NOK 444\n", + "batch 21 / 30 : total OK 8804 NOK 458\n", + "batch 22 / 30 : total OK 9213 NOK 470\n", + "batch 23 / 30 : total OK 9616 NOK 488\n", + "batch 24 / 30 : total OK 10010 NOK 515\n", + "batch 25 / 30 : total OK 10414 NOK 532\n", + "batch 26 / 30 : total OK 10817 NOK 550\n", + "batch 27 / 30 : total OK 11218 NOK 570\n", + "batch 28 / 30 : total OK 11619 NOK 590\n", + "batch 29 / 30 : total OK 12021 NOK 609\n" + ] + } + ], + "source": [ + "ok = 0\n", + "nok = 0\n", + "for i in range(n_batches):\n", + " ibuf_normal = batch_imgs[i].reshape(accel.ibuf_packed_device.shape)\n", + " exp = batch_labels[i]\n", + " # to avoid the slower software implementation during data unpacking,\n", + " # we make manual calls to buffer copies and execute_on_buffers\n", + " # all this could have been replaced with accel.execute() otherwise\n", + " accel.copy_input_data_to_device(ibuf_normal)\n", + " accel.execute_on_buffers()\n", + " obuf_normal = np.empty_like(accel.obuf_packed_device)\n", + " accel.copy_output_data_from_device(obuf_normal)\n", + " # this line provides fast unpacking using numpy primitives\n", + " # instead of using FINN's unpack functions\n", + " quick_out = obuf_normal.view(np.uint16).reshape(accel.batch_size, 44)\n", + " obuf_argmax = np.argmax(quick_out, axis=-1)\n", + " ok_batch = (obuf_argmax == exp).sum()\n", + " nok_batch = (batch_size-ok_batch)\n", + " ok += ok_batch\n", + " nok += nok_batch\n", + " \n", + " print(\"batch %d / %d : total OK %d NOK %d\" % (i+1, n_batches, ok, nok))" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final accuracy: 95.17814726840855%\n" + ] + } + ], + "source": [ + "acc = 100.0 * ok / (total)\n", + "print(\"Final accuracy: {}%\".format(acc))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Run built-in benchmarks" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'DRAM_in_bandwidth[MB/s]': 8.867975173609915,\n", + " 'DRAM_out_bandwidth[MB/s]': 0.25403053882736737,\n", + " 'batch_size': 100,\n", + " 'copy_input_data_to_device[ms]': 2.284526824951172,\n", + " 'copy_output_data_from_device[ms]': 0.20766258239746094,\n", + " 'fclk[mhz]': 100.0,\n", + " 'fold_input[ms]': 0.14352798461914062,\n", + " 'pack_input[ms]': 0.10251998901367188,\n", + " 'runtime[ms]': 34.64150428771973,\n", + " 'throughput[images/s]': 2886.7106684928112,\n", + " 'unfold_output[ms]': 0.0762939453125,\n", + " 'unpack_output[ms]': 1504.5325756072998}" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "accel.batch_size = 100\n", + "accel.throughput_test()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 9f609339be7528ed8fd02504818596d126174249 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 25 Jan 2024 11:38:27 +0000 Subject: [PATCH 06/53] [GTSRB] Add download model script --- build/gtsrb/models/download-model.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 build/gtsrb/models/download-model.sh diff --git a/build/gtsrb/models/download-model.sh b/build/gtsrb/models/download-model.sh new file mode 100644 index 0000000..79359df --- /dev/null +++ b/build/gtsrb/models/download-model.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wget https://github.com/fastmachinelearning/qonnx_model_zoo/raw/feature/gtsrb_cnv/models/GTSRB/Brevitas_CNV1W1A/cnv_1w1a_gtsrb.onnx \ No newline at end of file From 035e78448c929b0208994ce8c3818313c05d05de Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 25 Jan 2024 13:39:47 +0000 Subject: [PATCH 07/53] Revert linting on finn_examples init --- finn_examples/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/finn_examples/__init__.py b/finn_examples/__init__.py index f29133f..56735c4 100644 --- a/finn_examples/__init__.py +++ b/finn_examples/__init__.py @@ -37,12 +37,14 @@ import sys -import finn_examples.finn.util.data_packing as data_packing import finn_examples.qonnx as qonnx -import finn_examples.qonnx.core.datatype as datatype -import finn_examples.qonnx.util.basic as basic - sys.modules["qonnx"] = qonnx + +import finn_examples.qonnx.core.datatype as datatype sys.modules["qonnx.core.datatype"] = datatype + +import finn_examples.qonnx.util.basic as basic sys.modules["qonnx.util.basic"] = basic + +import finn_examples.finn.util.data_packing as data_packing sys.modules["finn.util.data_packing"] = data_packing From d911553d0262eba2c4ef12b1c22cc6768dc978c5 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 22 Feb 2024 13:27:59 +0000 Subject: [PATCH 08/53] Update get-finn to pull refactor/rtl_integration branch --- build/get-finn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/get-finn.sh b/build/get-finn.sh index 6dbe581..d93982e 100755 --- a/build/get-finn.sh +++ b/build/get-finn.sh @@ -31,7 +31,7 @@ # URL for git repo to be cloned REPO_URL=https://github.com/Xilinx/finn # commit hash for repo -REPO_COMMIT=02ce6954c93963c8407cd5c20761fccf92e1c70d +REPO_COMMIT=a395fc7d35e7410693edfb5253c91b83dfe054fb # directory (under the same folder as this script) to clone to REPO_DIR=finn From fa950f598bc77cab2483ab174c5afe4c45377f15 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 22 Feb 2024 13:36:49 +0000 Subject: [PATCH 09/53] Rename steps and import new step where necessary --- build/mobilenet-v1/build.py | 10 ++++++---- build/resnet50/build.py | 5 +++-- build/vgg10-radioml/build.py | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index 7ec022d..011986a 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -77,11 +77,12 @@ def select_build_steps(platform): step_mobilenet_lower_convs, step_mobilenet_convert_to_hls_layers_separate_th, "step_create_dataflow_partition", + "step_specialize_layers", "step_apply_folding_config", "step_minimize_bit_width", "step_generate_estimate_reports", - "step_hls_codegen", - "step_hls_ipgen", + "step_hw_codegen", + "step_hw_ipgen", "step_set_fifo_depths", "step_create_stitched_ip", "step_synthesize_bitfile", @@ -94,11 +95,12 @@ def select_build_steps(platform): step_mobilenet_lower_convs, step_mobilenet_convert_to_hls_layers, "step_create_dataflow_partition", + "step_specialize_layers", "step_apply_folding_config", "step_minimize_bit_width", "step_generate_estimate_reports", - "step_hls_codegen", - "step_hls_ipgen", + "step_hw_codegen", + "step_hw_ipgen", "step_set_fifo_depths", step_mobilenet_slr_floorplan, "step_synthesize_bitfile", diff --git a/build/resnet50/build.py b/build/resnet50/build.py index 5ed6b2c..43b82ba 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -54,11 +54,12 @@ step_resnet50_streamline, step_resnet50_convert_to_hls, "step_create_dataflow_partition", + "step_specialize_layers", "step_apply_folding_config", "step_minimize_bit_width", "step_generate_estimate_reports", - "step_hls_codegen", - "step_hls_ipgen", + "step_hw_codegen", + "step_hw_ipgen", step_resnet50_set_fifo_depths, step_resnet50_slr_floorplan, "step_synthesize_bitfile", diff --git a/build/vgg10-radioml/build.py b/build/vgg10-radioml/build.py index 4641020..812b69a 100755 --- a/build/vgg10-radioml/build.py +++ b/build/vgg10-radioml/build.py @@ -64,15 +64,16 @@ def select_build_steps(platform): "step_tidy_up", step_pre_streamline, "step_streamline", - "step_convert_to_hls", + "step_convert_to_hw", step_convert_final_layers, "step_create_dataflow_partition", + "step_specialize_layers", "step_target_fps_parallelization", "step_apply_folding_config", "step_minimize_bit_width", "step_generate_estimate_reports", - "step_hls_codegen", - "step_hls_ipgen", + "step_hw_codegen", + "step_hw_ipgen", "step_set_fifo_depths", "step_create_stitched_ip", "step_measure_rtlsim_performance", From c9f3ec1fa676705308f276f269def022c578bd64 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 22 Feb 2024 13:58:34 +0000 Subject: [PATCH 10/53] Rename convert_to_hls_layers to convert_to_hw_layers --- build/mobilenet-v1/build.py | 8 ++++---- build/mobilenet-v1/custom_steps.py | 6 +++--- build/resnet50/custom_steps.py | 2 +- build/vgg10-radioml/custom_steps.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index 011986a..db6aee0 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -35,8 +35,8 @@ # custom steps for mobilenetv1 from custom_steps import ( step_mobilenet_streamline, - step_mobilenet_convert_to_hls_layers, - step_mobilenet_convert_to_hls_layers_separate_th, + step_mobilenet_convert_to_hw_layers, + step_mobilenet_convert_to_hw_layers_separate_th, step_mobilenet_lower_convs, step_mobilenet_slr_floorplan, ) @@ -75,7 +75,7 @@ def select_build_steps(platform): return [ step_mobilenet_streamline, step_mobilenet_lower_convs, - step_mobilenet_convert_to_hls_layers_separate_th, + step_mobilenet_convert_to_hw_layers_separate_th, "step_create_dataflow_partition", "step_specialize_layers", "step_apply_folding_config", @@ -93,7 +93,7 @@ def select_build_steps(platform): return [ step_mobilenet_streamline, step_mobilenet_lower_convs, - step_mobilenet_convert_to_hls_layers, + step_mobilenet_convert_to_hw_layers, "step_create_dataflow_partition", "step_specialize_layers", "step_apply_folding_config", diff --git a/build/mobilenet-v1/custom_steps.py b/build/mobilenet-v1/custom_steps.py index cb66421..42a1095 100644 --- a/build/mobilenet-v1/custom_steps.py +++ b/build/mobilenet-v1/custom_steps.py @@ -44,7 +44,7 @@ GiveUniqueNodeNames, ApplyConfig, ) -import finn.transformation.fpgadataflow.convert_to_hls_layers as to_hls +import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hls from qonnx.transformation.infer_shapes import InferShapes from qonnx.transformation.change_datalayout import ChangeDataLayoutQuantAvgPool2d from qonnx.transformation.infer_datatypes import InferDataTypes @@ -87,7 +87,7 @@ def step_mobilenet_lower_convs(model: ModelWrapper, cfg: DataflowBuildConfig): return model -def step_mobilenet_convert_to_hls_layers(model: ModelWrapper, cfg: DataflowBuildConfig): +def step_mobilenet_convert_to_hw_layers(model: ModelWrapper, cfg: DataflowBuildConfig): mem_mode = cfg.default_mem_mode.value model = model.transform(to_hls.InferPool_Batch()) model = model.transform(to_hls.InferConvInpGen()) @@ -125,7 +125,7 @@ def step_mobilenet_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): return model -def step_mobilenet_convert_to_hls_layers_separate_th(model: ModelWrapper, cfg: DataflowBuildConfig): +def step_mobilenet_convert_to_hw_layers_separate_th(model: ModelWrapper, cfg: DataflowBuildConfig): mem_mode = cfg.default_mem_mode.value model = model.transform(to_hls.InferPool_Batch()) model = model.transform(to_hls.InferConvInpGen()) diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index 6bc6008..aeacc07 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -87,7 +87,7 @@ from qonnx.transformation.infer_datatypes import InferDataTypes from qonnx.transformation.infer_data_layouts import InferDataLayouts from qonnx.transformation.insert_topk import InsertTopK -import finn.transformation.fpgadataflow.convert_to_hls_layers as to_hls +import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hls from qonnx.transformation.lower_convs_to_matmul import LowerConvsToMatMul from finn.builder.build_dataflow_config import ( diff --git a/build/vgg10-radioml/custom_steps.py b/build/vgg10-radioml/custom_steps.py index 8be2ef4..8e747f7 100755 --- a/build/vgg10-radioml/custom_steps.py +++ b/build/vgg10-radioml/custom_steps.py @@ -29,7 +29,7 @@ from finn.builder.build_dataflow_config import DataflowBuildConfig from qonnx.transformation.change_3d_tensors_to_4d import Change3DTo4DTensors from qonnx.transformation.general import GiveUniqueNodeNames -import finn.transformation.fpgadataflow.convert_to_hls_layers as to_hls +import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hls import finn.transformation.streamline.absorb as absorb From 00c37f5ddbc501542ca449f3e6ca9668e932080a Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 22 Feb 2024 16:12:00 +0000 Subject: [PATCH 11/53] Rename InferPool_batch to InferPool --- build/mobilenet-v1/custom_steps.py | 4 ++-- build/resnet50/custom_steps.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/mobilenet-v1/custom_steps.py b/build/mobilenet-v1/custom_steps.py index 42a1095..e80ac1f 100644 --- a/build/mobilenet-v1/custom_steps.py +++ b/build/mobilenet-v1/custom_steps.py @@ -89,7 +89,7 @@ def step_mobilenet_lower_convs(model: ModelWrapper, cfg: DataflowBuildConfig): def step_mobilenet_convert_to_hw_layers(model: ModelWrapper, cfg: DataflowBuildConfig): mem_mode = cfg.default_mem_mode.value - model = model.transform(to_hls.InferPool_Batch()) + model = model.transform(to_hls.InferPool()) model = model.transform(to_hls.InferConvInpGen()) model = model.transform(to_hls.InferVectorVectorActivation()) model = model.transform(to_hls.InferQuantizedMatrixVectorActivation(mem_mode)) @@ -127,7 +127,7 @@ def step_mobilenet_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): def step_mobilenet_convert_to_hw_layers_separate_th(model: ModelWrapper, cfg: DataflowBuildConfig): mem_mode = cfg.default_mem_mode.value - model = model.transform(to_hls.InferPool_Batch()) + model = model.transform(to_hls.InferPool()) model = model.transform(to_hls.InferConvInpGen()) model = model.transform(to_hls.InferThresholdingLayer()) model = model.transform(to_hls.InferVectorVectorActivation()) diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index aeacc07..b8121fa 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -209,7 +209,7 @@ def step_resnet50_convert_to_hls(model: ModelWrapper, cfg: DataflowBuildConfig): to_hls.InferAddStreamsLayer, LowerConvsToMatMul, to_hls.InferChannelwiseLinearLayer, - to_hls.InferPool_Batch, + to_hls.InferPool, AbsorbTransposeIntoMultiThreshold, RoundAndClipThresholds, to_hls.InferQuantizedMatrixVectorActivation, From 6407ea0290db0e5b7f9e7d61dea746ca602894c3 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Tue, 12 Mar 2024 09:55:47 +0000 Subject: [PATCH 12/53] Update bnn-pynq folding --- .../cnv-w1a1_folding_config.json | 34 +++++++++---------- .../cnv-w1a2_folding_config.json | 34 +++++++++---------- .../cnv-w2a2_folding_config.json | 34 +++++++++---------- .../tfc-w1a1_folding_config.json | 12 +++---- .../tfc-w1a2_folding_config.json | 12 +++---- .../tfc-w2a2_folding_config.json | 12 +++---- 6 files changed, 69 insertions(+), 69 deletions(-) diff --git a/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json b/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json index 03b462d..2a6b9ac 100644 --- a/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json @@ -1,79 +1,79 @@ { "Defaults": {}, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 1, "ram_style": "distributed" }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 3, "ram_style": "auto" }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 32, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 16, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 4, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 1, "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 1, "SIMD": 4, "ram_style": "auto" }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 1, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 5, "SIMD": 1, "ram_style": "auto" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json b/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json index c83c614..254ffd3 100644 --- a/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json @@ -1,79 +1,79 @@ { "Defaults": {}, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 1, "ram_style": "distributed" }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 8, "SIMD": 3, "ram_style": "auto" }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 16, "ram_style": "distributed" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, "ram_style": "auto" }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 16, "ram_style": "distributed" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 8, "SIMD": 16, "ram_style": "auto" }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 16, "ram_style": "distributed" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 8, "SIMD": 16, "ram_style": "block" }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 8, "ram_style": "distributed" }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 4, "SIMD": 8, "ram_style": "auto" }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 8, "ram_style": "distributed" }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 1, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 1, "SIMD": 2, "ram_style": "distributed" }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 2, "SIMD": 2, "ram_style": "block" }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 5, "SIMD": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json b/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json index c83c614..254ffd3 100644 --- a/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json @@ -1,79 +1,79 @@ { "Defaults": {}, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 1, "ram_style": "distributed" }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 8, "SIMD": 3, "ram_style": "auto" }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 16, "ram_style": "distributed" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, "ram_style": "auto" }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 16, "ram_style": "distributed" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 8, "SIMD": 16, "ram_style": "auto" }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 16, "ram_style": "distributed" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 8, "SIMD": 16, "ram_style": "block" }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 8, "ram_style": "distributed" }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 4, "SIMD": 8, "ram_style": "auto" }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 8, "ram_style": "distributed" }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 1, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 1, "SIMD": 2, "ram_style": "distributed" }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 2, "SIMD": 2, "ram_style": "block" }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 5, "SIMD": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json b/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json index 95167f1..0cb9188 100644 --- a/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json @@ -1,30 +1,30 @@ { "Defaults": {}, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 49, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 49, "ram_style": "block" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 8, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 8, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 10, "SIMD": 8, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json b/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json index 95167f1..0cb9188 100644 --- a/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json @@ -1,30 +1,30 @@ { "Defaults": {}, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 49, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 49, "ram_style": "block" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 8, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 8, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 10, "SIMD": 8, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json b/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json index 95167f1..0cb9188 100644 --- a/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json @@ -1,30 +1,30 @@ { "Defaults": {}, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 49, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 49, "ram_style": "block" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 8, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 8, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 10, "SIMD": 8, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } From f1c6f7f13dd02292670deb6012e119cb8a7462ac Mon Sep 17 00:00:00 2001 From: johnnoel Date: Tue, 19 Mar 2024 16:13:45 +0000 Subject: [PATCH 13/53] [Refactor] Update mobilenet folding and custom steps --- build/mobilenet-v1/build.py | 1 + build/mobilenet-v1/custom_steps.py | 6 +- .../folding_config/U200_folding_config.json | 381 ++++------- .../folding_config/U250_folding_config.json | 380 ++++------- .../folding_config/U280_folding_config.json | 380 ++++------- .../folding_config/U50_folding_config.json | 380 ++++------- .../folding_config/ZCU102_folding_config.json | 628 ++++++------------ .../folding_config/ZCU104_folding_config.json | 628 ++++++------------ .../specialize_layers_config.json | 261 ++++++++ 9 files changed, 1257 insertions(+), 1788 deletions(-) create mode 100644 build/mobilenet-v1/specialize_layers_config.json diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index db6aee0..b3d2098 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -132,6 +132,7 @@ def select_build_steps(platform): steps=select_build_steps(platform_name), output_dir="output_%s_%s" % (model_name, release_platform_name), folding_config_file="folding_config/%s_folding_config.json" % platform_name, + specialize_layers_config_file="specialize_layers_config.json", synth_clk_period_ns=select_clk_period(platform_name), board=platform_name, shell_flow_type=shell_flow_type, diff --git a/build/mobilenet-v1/custom_steps.py b/build/mobilenet-v1/custom_steps.py index e80ac1f..9165f48 100644 --- a/build/mobilenet-v1/custom_steps.py +++ b/build/mobilenet-v1/custom_steps.py @@ -88,11 +88,10 @@ def step_mobilenet_lower_convs(model: ModelWrapper, cfg: DataflowBuildConfig): def step_mobilenet_convert_to_hw_layers(model: ModelWrapper, cfg: DataflowBuildConfig): - mem_mode = cfg.default_mem_mode.value model = model.transform(to_hls.InferPool()) model = model.transform(to_hls.InferConvInpGen()) model = model.transform(to_hls.InferVectorVectorActivation()) - model = model.transform(to_hls.InferQuantizedMatrixVectorActivation(mem_mode)) + model = model.transform(to_hls.InferQuantizedMatrixVectorActivation()) model = model.transform(to_hls.InferChannelwiseLinearLayer()) model = model.transform(to_hls.InferLabelSelectLayer()) model = model.transform(InferShapes()) @@ -126,12 +125,11 @@ def step_mobilenet_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): def step_mobilenet_convert_to_hw_layers_separate_th(model: ModelWrapper, cfg: DataflowBuildConfig): - mem_mode = cfg.default_mem_mode.value model = model.transform(to_hls.InferPool()) model = model.transform(to_hls.InferConvInpGen()) model = model.transform(to_hls.InferThresholdingLayer()) model = model.transform(to_hls.InferVectorVectorActivation()) - model = model.transform(to_hls.InferQuantizedMatrixVectorActivation(mem_mode)) + model = model.transform(to_hls.InferQuantizedMatrixVectorActivation()) model = model.transform(to_hls.InferChannelwiseLinearLayer()) model = model.transform(to_hls.InferLabelSelectLayer()) model = model.transform(InferShapes()) diff --git a/build/mobilenet-v1/folding_config/U200_folding_config.json b/build/mobilenet-v1/folding_config/U200_folding_config.json index a7b129a..b0183e2 100644 --- a/build/mobilenet-v1/folding_config/U200_folding_config.json +++ b/build/mobilenet-v1/folding_config/U200_folding_config.json @@ -1,499 +1,402 @@ { "Defaults": {}, - "StreamingFIFO_0": { + "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 32, "SIMD": 3, "ram_style": "block", - "mem_mode": "decoupled", - "resType": "dsp" + "mem_mode": "internal_decoupled", + "resType": "lut" }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 32 }, - "StreamingFIFO_3": { + "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_0": { + "VectorVectorActivation_hls_0": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_0": { - "impl_style": "hls" - }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_1": { - "impl_style": "hls" - }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 32 }, - "StreamingFIFO_9": { + "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_1": { + "VectorVectorActivation_hls_1": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_2": { - "impl_style": "hls" - }, - "StreamingFIFO_12": { + "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, - "SIMD": 16, - "ram_style": "block", - "mem_mode": "decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_3": { - "impl_style": "hls" - }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 64 }, - "StreamingFIFO_15": { + "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_2": { + "VectorVectorActivation_hls_2": { "PE": 64, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_4": { - "impl_style": "hls" - }, - "StreamingFIFO_18": { + "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_5": { - "impl_style": "hls" - }, - "StreamingFIFO_20": { + "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 16 }, - "StreamingFIFO_21": { + "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_3": { + "VectorVectorActivation_hls_3": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_23": { + "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_6": { - "impl_style": "hls" - }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 32 }, - "StreamingFIFO_26": { + "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_4": { + "VectorVectorActivation_hls_4": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_7": { - "impl_style": "hls" - }, - "StreamingFIFO_29": { + "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_8": { - "impl_style": "hls" - }, - "StreamingFIFO_31": { + "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 8 }, - "StreamingFIFO_32": { + "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_5": { + "VectorVectorActivation_hls_5": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_9": { - "impl_style": "hls" - }, - "StreamingFIFO_35": { + "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 16 }, - "StreamingFIFO_37": { + "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_6": { + "VectorVectorActivation_hls_6": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_39": { + "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_10": { - "impl_style": "hls" - }, - "StreamingFIFO_41": { + "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 16 }, - "StreamingFIFO_42": { + "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_7": { + "VectorVectorActivation_hls_7": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_44": { + "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_11": { - "impl_style": "hls" - }, - "StreamingFIFO_46": { + "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 16 }, - "StreamingFIFO_47": { + "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_8": { + "VectorVectorActivation_hls_8": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_49": { + "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_12": { - "impl_style": "hls" - }, - "StreamingFIFO_51": { + "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 16 }, - "StreamingFIFO_52": { + "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_9": { + "VectorVectorActivation_hls_9": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_54": { + "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_13": { - "impl_style": "hls" - }, - "StreamingFIFO_56": { + "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 16 }, - "StreamingFIFO_57": { + "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_10": { + "VectorVectorActivation_hls_10": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_59": { + "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_14": { - "impl_style": "hls" - }, - "StreamingFIFO_61": { + "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 4 }, - "StreamingFIFO_62": { + "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_11": { + "VectorVectorActivation_hls_11": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_15": { - "impl_style": "hls" - }, - "StreamingFIFO_65": { + "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_16": { - "impl_style": "hls" - }, - "StreamingFIFO_67": { + "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 8 }, - "StreamingFIFO_68": { + "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_12": { + "VectorVectorActivation_hls_12": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_17": { - "impl_style": "hls" - }, - "StreamingFIFO_71": { + "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_18": { - "impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 4, "ram_style": "distributed" }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 4 }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 4, "SIMD": 4, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_19": { - "impl_style": "hls" - }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/mobilenet-v1/folding_config/U250_folding_config.json b/build/mobilenet-v1/folding_config/U250_folding_config.json index a7b129a..52b52f5 100644 --- a/build/mobilenet-v1/folding_config/U250_folding_config.json +++ b/build/mobilenet-v1/folding_config/U250_folding_config.json @@ -1,499 +1,405 @@ { "Defaults": {}, - "StreamingFIFO_0": { + "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 32, "SIMD": 3, "ram_style": "block", - "mem_mode": "decoupled", - "resType": "dsp" + "mem_mode": "internal_decoupled", + "resType": "lut" }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 32 }, - "StreamingFIFO_3": { + "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_0": { + "VectorVectorActivation_hls_0": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_0": { - "impl_style": "hls" - }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_1": { - "impl_style": "hls" - }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 32 }, - "StreamingFIFO_9": { + "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_1": { + "VectorVectorActivation_hls_1": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_2": { - "impl_style": "hls" - }, - "StreamingFIFO_12": { + "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_3": { - "impl_style": "hls" - }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 64 }, - "StreamingFIFO_15": { + "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_2": { + "VectorVectorActivation_hls_2": { "PE": 64, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_4": { - "impl_style": "hls" - }, - "StreamingFIFO_18": { + "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_5": { - "impl_style": "hls" - }, - "StreamingFIFO_20": { + "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 16 }, - "StreamingFIFO_21": { + "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_3": { + "VectorVectorActivation_hls_3": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_23": { + "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_6": { - "impl_style": "hls" - }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 32 }, - "StreamingFIFO_26": { + "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_4": { + "VectorVectorActivation_hls_4": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_7": { - "impl_style": "hls" - }, - "StreamingFIFO_29": { + "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_8": { - "impl_style": "hls" - }, - "StreamingFIFO_31": { + "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 8 }, - "StreamingFIFO_32": { + "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_5": { + "VectorVectorActivation_hls_5": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_9": { - "impl_style": "hls" - }, - "StreamingFIFO_35": { + "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 16 }, - "StreamingFIFO_37": { + "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_6": { + "VectorVectorActivation_hls_6": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_39": { + "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_10": { - "impl_style": "hls" - }, - "StreamingFIFO_41": { + "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 16 }, - "StreamingFIFO_42": { + "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_7": { + "VectorVectorActivation_hls_7": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_44": { + "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_11": { - "impl_style": "hls" - }, - "StreamingFIFO_46": { + "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 16 }, - "StreamingFIFO_47": { + "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_8": { + "VectorVectorActivation_hls_8": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_49": { + "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_12": { - "impl_style": "hls" - }, - "StreamingFIFO_51": { + "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 16 }, - "StreamingFIFO_52": { + "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_9": { + "VectorVectorActivation_hls_9": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_54": { + "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_13": { - "impl_style": "hls" - }, - "StreamingFIFO_56": { + "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 16 }, - "StreamingFIFO_57": { + "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_10": { + "VectorVectorActivation_hls_10": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_59": { + "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_14": { - "impl_style": "hls" - }, - "StreamingFIFO_61": { + "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 4 }, - "StreamingFIFO_62": { + "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_11": { + "VectorVectorActivation_hls_11": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_15": { - "impl_style": "hls" - }, - "StreamingFIFO_65": { + "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_16": { - "impl_style": "hls" - }, - "StreamingFIFO_67": { + "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 8 }, - "StreamingFIFO_68": { + "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_12": { + "VectorVectorActivation_hls_12": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_17": { - "impl_style": "hls" - }, - "StreamingFIFO_71": { + "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_18": { - "impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 4, "ram_style": "distributed" }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 4 }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 4, "SIMD": 4, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_19": { - "impl_style": "hls" - }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/mobilenet-v1/folding_config/U280_folding_config.json b/build/mobilenet-v1/folding_config/U280_folding_config.json index a7b129a..52b52f5 100644 --- a/build/mobilenet-v1/folding_config/U280_folding_config.json +++ b/build/mobilenet-v1/folding_config/U280_folding_config.json @@ -1,499 +1,405 @@ { "Defaults": {}, - "StreamingFIFO_0": { + "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 32, "SIMD": 3, "ram_style": "block", - "mem_mode": "decoupled", - "resType": "dsp" + "mem_mode": "internal_decoupled", + "resType": "lut" }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 32 }, - "StreamingFIFO_3": { + "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_0": { + "VectorVectorActivation_hls_0": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_0": { - "impl_style": "hls" - }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_1": { - "impl_style": "hls" - }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 32 }, - "StreamingFIFO_9": { + "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_1": { + "VectorVectorActivation_hls_1": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_2": { - "impl_style": "hls" - }, - "StreamingFIFO_12": { + "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_3": { - "impl_style": "hls" - }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 64 }, - "StreamingFIFO_15": { + "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_2": { + "VectorVectorActivation_hls_2": { "PE": 64, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_4": { - "impl_style": "hls" - }, - "StreamingFIFO_18": { + "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_5": { - "impl_style": "hls" - }, - "StreamingFIFO_20": { + "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 16 }, - "StreamingFIFO_21": { + "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_3": { + "VectorVectorActivation_hls_3": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_23": { + "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_6": { - "impl_style": "hls" - }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 32 }, - "StreamingFIFO_26": { + "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_4": { + "VectorVectorActivation_hls_4": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_7": { - "impl_style": "hls" - }, - "StreamingFIFO_29": { + "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_8": { - "impl_style": "hls" - }, - "StreamingFIFO_31": { + "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 8 }, - "StreamingFIFO_32": { + "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_5": { + "VectorVectorActivation_hls_5": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_9": { - "impl_style": "hls" - }, - "StreamingFIFO_35": { + "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 16 }, - "StreamingFIFO_37": { + "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_6": { + "VectorVectorActivation_hls_6": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_39": { + "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_10": { - "impl_style": "hls" - }, - "StreamingFIFO_41": { + "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 16 }, - "StreamingFIFO_42": { + "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_7": { + "VectorVectorActivation_hls_7": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_44": { + "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_11": { - "impl_style": "hls" - }, - "StreamingFIFO_46": { + "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 16 }, - "StreamingFIFO_47": { + "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_8": { + "VectorVectorActivation_hls_8": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_49": { + "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_12": { - "impl_style": "hls" - }, - "StreamingFIFO_51": { + "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 16 }, - "StreamingFIFO_52": { + "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_9": { + "VectorVectorActivation_hls_9": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_54": { + "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_13": { - "impl_style": "hls" - }, - "StreamingFIFO_56": { + "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 16 }, - "StreamingFIFO_57": { + "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_10": { + "VectorVectorActivation_hls_10": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_59": { + "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_14": { - "impl_style": "hls" - }, - "StreamingFIFO_61": { + "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 4 }, - "StreamingFIFO_62": { + "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_11": { + "VectorVectorActivation_hls_11": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_15": { - "impl_style": "hls" - }, - "StreamingFIFO_65": { + "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_16": { - "impl_style": "hls" - }, - "StreamingFIFO_67": { + "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 8 }, - "StreamingFIFO_68": { + "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_12": { + "VectorVectorActivation_hls_12": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_17": { - "impl_style": "hls" - }, - "StreamingFIFO_71": { + "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_18": { - "impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 4, "ram_style": "distributed" }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 4 }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 4, "SIMD": 4, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_19": { - "impl_style": "hls" - }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/mobilenet-v1/folding_config/U50_folding_config.json b/build/mobilenet-v1/folding_config/U50_folding_config.json index a7b129a..52b52f5 100644 --- a/build/mobilenet-v1/folding_config/U50_folding_config.json +++ b/build/mobilenet-v1/folding_config/U50_folding_config.json @@ -1,499 +1,405 @@ { "Defaults": {}, - "StreamingFIFO_0": { + "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 32, "SIMD": 3, "ram_style": "block", - "mem_mode": "decoupled", - "resType": "dsp" + "mem_mode": "internal_decoupled", + "resType": "lut" }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 32 }, - "StreamingFIFO_3": { + "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_0": { + "VectorVectorActivation_hls_0": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_0": { - "impl_style": "hls" - }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_1": { - "impl_style": "hls" - }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 32 }, - "StreamingFIFO_9": { + "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_1": { + "VectorVectorActivation_hls_1": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_2": { - "impl_style": "hls" - }, - "StreamingFIFO_12": { + "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_3": { - "impl_style": "hls" - }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 64 }, - "StreamingFIFO_15": { + "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_2": { + "VectorVectorActivation_hls_2": { "PE": 64, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_4": { - "impl_style": "hls" - }, - "StreamingFIFO_18": { + "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_5": { - "impl_style": "hls" - }, - "StreamingFIFO_20": { + "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 16 }, - "StreamingFIFO_21": { + "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_3": { + "VectorVectorActivation_hls_3": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_23": { + "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_6": { - "impl_style": "hls" - }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 32 }, - "StreamingFIFO_26": { + "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_4": { + "VectorVectorActivation_hls_4": { "PE": 32, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_7": { - "impl_style": "hls" - }, - "StreamingFIFO_29": { + "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_8": { - "impl_style": "hls" - }, - "StreamingFIFO_31": { + "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 8 }, - "StreamingFIFO_32": { + "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_5": { + "VectorVectorActivation_hls_5": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_9": { - "impl_style": "hls" - }, - "StreamingFIFO_35": { + "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 16 }, - "StreamingFIFO_37": { + "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_6": { + "VectorVectorActivation_hls_6": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_39": { + "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_10": { - "impl_style": "hls" - }, - "StreamingFIFO_41": { + "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 16 }, - "StreamingFIFO_42": { + "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_7": { + "VectorVectorActivation_hls_7": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_44": { + "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_11": { - "impl_style": "hls" - }, - "StreamingFIFO_46": { + "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 16 }, - "StreamingFIFO_47": { + "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_8": { + "VectorVectorActivation_hls_8": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_49": { + "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_12": { - "impl_style": "hls" - }, - "StreamingFIFO_51": { + "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 16 }, - "StreamingFIFO_52": { + "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_9": { + "VectorVectorActivation_hls_9": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_54": { + "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_13": { - "impl_style": "hls" - }, - "StreamingFIFO_56": { + "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 16 }, - "StreamingFIFO_57": { + "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048, - "impl_style": "vivado" + "depth": 2048 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_10": { + "VectorVectorActivation_hls_10": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_59": { + "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_14": { - "impl_style": "hls" - }, - "StreamingFIFO_61": { + "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 4 }, - "StreamingFIFO_62": { + "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_11": { + "VectorVectorActivation_hls_11": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_15": { - "impl_style": "hls" - }, - "StreamingFIFO_65": { + "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_16": { - "impl_style": "hls" - }, - "StreamingFIFO_67": { + "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 8 }, - "StreamingFIFO_68": { + "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_12": { + "VectorVectorActivation_hls_12": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_17": { - "impl_style": "hls" - }, - "StreamingFIFO_71": { + "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 16, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_18": { - "impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 4, "ram_style": "distributed" }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 4 }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 4, "SIMD": 4, "ram_style": "block", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "StreamingDataWidthConverter_Batch_19": { - "impl_style": "hls" - }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/mobilenet-v1/folding_config/ZCU102_folding_config.json b/build/mobilenet-v1/folding_config/ZCU102_folding_config.json index 8862cf2..b06d849 100755 --- a/build/mobilenet-v1/folding_config/ZCU102_folding_config.json +++ b/build/mobilenet-v1/folding_config/ZCU102_folding_config.json @@ -1,816 +1,610 @@ { "Defaults": {}, - "StreamingFIFO_0": { + "StreamingFIFO_rtl_0": { "ram_style": "block", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 1, "ram_style": "distributed" }, - "StreamingDataWidthConverter_Batch_0": { - "impl_style": "hls" - }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 3, "ram_style": "auto", - "resType": "dsp", - "mem_mode": "decoupled", + "resType": "lut", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_3": { + "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "StreamingDataWidthConverter_Batch_1": { - "impl_style": "hls" - }, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_2": { - "impl_style": "hls" - }, - "StreamingFIFO_6": { + "StreamingFIFO_rtl_6": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 2 }, - "StreamingDataWidthConverter_Batch_3": { - "impl_style": "hls" - }, - "StreamingFIFO_8": { + "StreamingFIFO_rtl_8": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_0": { + "VectorVectorActivation_hls_0": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_10": { + "StreamingFIFO_rtl_10": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" - }, - "StreamingDataWidthConverter_Batch_4": { - "impl_style": "hls" + "depth": 256 }, - "Thresholding_Batch_1": { + "Thresholding_hls_1": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_5": { - "impl_style": "hls" - }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 8, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_6": { - "impl_style": "hls" - }, - "Thresholding_Batch_2": { + "Thresholding_hls_2": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_7": { - "impl_style": "hls" - }, - "StreamingFIFO_17": { + "StreamingFIFO_rtl_17": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 4 }, - "StreamingDataWidthConverter_Batch_8": { - "impl_style": "hls" - }, - "StreamingFIFO_19": { + "StreamingFIFO_rtl_19": { "ram_style": "block", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_1": { + "VectorVectorActivation_hls_1": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_9": { - "impl_style": "hls" - }, - "Thresholding_Batch_3": { + "Thresholding_hls_3": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_10": { - "impl_style": "hls" - }, - "StreamingFIFO_24": { + "StreamingFIFO_rtl_24": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_11": { - "impl_style": "hls" - }, - "Thresholding_Batch_4": { + "Thresholding_hls_4": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_27": { + "StreamingFIFO_rtl_27": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 2 }, - "StreamingDataWidthConverter_Batch_12": { - "impl_style": "hls" - }, - "StreamingFIFO_29": { + "StreamingFIFO_rtl_29": { "ram_style": "block", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_2": { + "VectorVectorActivation_hls_2": { "PE": 16, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_13": { - "impl_style": "hls" - }, - "Thresholding_Batch_5": { + "Thresholding_hls_5": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_14": { - "impl_style": "hls" - }, - "StreamingFIFO_34": { + "StreamingFIFO_rtl_34": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_15": { - "impl_style": "hls" - }, - "Thresholding_Batch_6": { + "Thresholding_hls_6": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_37": { + "StreamingFIFO_rtl_37": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 2 }, - "StreamingDataWidthConverter_Batch_16": { - "impl_style": "hls" - }, - "StreamingFIFO_39": { + "StreamingFIFO_rtl_39": { "ram_style": "block", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_3": { + "VectorVectorActivation_hls_3": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_17": { - "impl_style": "hls" - }, - "Thresholding_Batch_7": { + "Thresholding_hls_7": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_18": { - "impl_style": "hls" - }, - "StreamingFIFO_44": { + "StreamingFIFO_rtl_44": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_19": { - "impl_style": "hls" - }, - "Thresholding_Batch_8": { + "Thresholding_hls_8": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_47": { + "StreamingFIFO_rtl_47": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_20": { - "impl_style": "hls" - }, - "StreamingFIFO_49": { + "StreamingFIFO_rtl_49": { "ram_style": "block", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_4": { + "VectorVectorActivation_hls_4": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_21": { - "impl_style": "hls" - }, - "Thresholding_Batch_9": { + "Thresholding_hls_9": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_22": { - "impl_style": "hls" - }, - "StreamingFIFO_54": { + "StreamingFIFO_rtl_54": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_23": { - "impl_style": "hls" - }, - "Thresholding_Batch_10": { + "Thresholding_hls_10": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_57": { + "StreamingFIFO_rtl_57": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_24": { - "impl_style": "hls" - }, - "StreamingFIFO_59": { + "StreamingFIFO_rtl_59": { "ram_style": "block", - "depth": 8192, - "impl_style": "vivado" + "depth": 8192 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 2, "ram_style": "distributed" }, - "VectorVectorActivation_5": { + "VectorVectorActivation_hls_5": { "PE": 2, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_25": { - "impl_style": "hls" - }, - "Thresholding_Batch_11": { + "Thresholding_hls_11": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_26": { - "impl_style": "hls" - }, - "StreamingFIFO_64": { + "StreamingFIFO_rtl_64": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_27": { - "impl_style": "hls" - }, - "Thresholding_Batch_12": { + "Thresholding_hls_12": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_67": { + "StreamingFIFO_rtl_67": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_28": { - "impl_style": "hls" - }, - "StreamingFIFO_69": { + "StreamingFIFO_rtl_69": { "ram_style": "block", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_6": { + "VectorVectorActivation_hls_6": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_29": { - "impl_style": "hls" - }, - "Thresholding_Batch_13": { + "Thresholding_hls_13": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_30": { - "impl_style": "hls" - }, - "StreamingFIFO_74": { + "StreamingFIFO_rtl_74": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_31": { - "impl_style": "hls" - }, - "Thresholding_Batch_14": { + "Thresholding_hls_14": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_77": { + "StreamingFIFO_rtl_77": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_32": { - "impl_style": "hls" - }, - "StreamingFIFO_79": { + "StreamingFIFO_rtl_79": { "ram_style": "block", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_7": { + "VectorVectorActivation_hls_7": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_33": { - "impl_style": "hls" - }, - "Thresholding_Batch_15": { + "Thresholding_hls_15": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_34": { - "impl_style": "hls" - }, - "StreamingFIFO_84": { + "StreamingFIFO_rtl_84": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_35": { - "impl_style": "hls" - }, - "Thresholding_Batch_16": { + "Thresholding_hls_16": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_87": { + "StreamingFIFO_rtl_87": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_36": { - "impl_style": "hls" - }, - "StreamingFIFO_89": { + "StreamingFIFO_rtl_89": { "ram_style": "block", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_8": { + "VectorVectorActivation_hls_8": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_37": { - "impl_style": "hls" - }, - "Thresholding_Batch_17": { + "Thresholding_hls_17": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_38": { - "impl_style": "hls" - }, - "StreamingFIFO_94": { + "StreamingFIFO_rtl_94": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_39": { - "impl_style": "hls" - }, - "Thresholding_Batch_18": { + "Thresholding_hls_18": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_97": { + "StreamingFIFO_rtl_97": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_40": { - "impl_style": "hls" - }, - "StreamingFIFO_99": { + "StreamingFIFO_rtl_99": { "ram_style": "block", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_9": { + "VectorVectorActivation_hls_9": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_41": { - "impl_style": "hls" - }, - "Thresholding_Batch_19": { + "Thresholding_hls_19": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_42": { - "impl_style": "hls" - }, - "StreamingFIFO_104": { + "StreamingFIFO_rtl_104": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_43": { - "impl_style": "hls" - }, - "Thresholding_Batch_20": { + "Thresholding_hls_20": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_107": { + "StreamingFIFO_rtl_107": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_44": { - "impl_style": "hls" - }, - "StreamingFIFO_109": { + "StreamingFIFO_rtl_109": { "ram_style": "block", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_10": { + "VectorVectorActivation_hls_10": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_45": { - "impl_style": "hls" - }, - "Thresholding_Batch_21": { + "Thresholding_hls_21": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_46": { - "impl_style": "hls" - }, - "StreamingFIFO_114": { + "StreamingFIFO_rtl_114": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_47": { - "impl_style": "hls" - }, - "Thresholding_Batch_22": { + "Thresholding_hls_22": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_117": { + "StreamingFIFO_rtl_117": { "ram_style": "block", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 1 }, - "StreamingFIFO_118": { + "StreamingFIFO_rtl_118": { "ram_style": "block", - "depth": 16384, - "impl_style": "vivado" + "depth": 16384 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 1, "ram_style": "block" }, - "VectorVectorActivation_11": { + "VectorVectorActivation_hls_11": { "PE": 1, "resType": "lut" }, - "Thresholding_Batch_23": { + "Thresholding_hls_23": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_48": { - "impl_style": "hls" - }, - "StreamingFIFO_122": { + "StreamingFIFO_rtl_122": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_49": { - "impl_style": "hls" - }, - "Thresholding_Batch_24": { + "Thresholding_hls_24": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_125": { + "StreamingFIFO_rtl_125": { "ram_style": "block", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_50": { - "impl_style": "hls" - }, - "StreamingFIFO_127": { + "StreamingFIFO_rtl_127": { "ram_style": "block", - "depth": 16384, - "impl_style": "vivado" + "depth": 16384 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 2, "ram_style": "block" }, - "VectorVectorActivation_12": { + "VectorVectorActivation_hls_12": { "PE": 2, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_51": { - "impl_style": "hls" - }, - "Thresholding_Batch_25": { + "Thresholding_hls_25": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_52": { - "impl_style": "hls" - }, - "StreamingFIFO_132": { + "StreamingFIFO_rtl_132": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 8, "ram_style": "block", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_53": { - "impl_style": "hls" - }, - "Thresholding_Batch_26": { + "Thresholding_hls_26": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 1, "ram_style": "block" }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 1 }, - "StreamingDataWidthConverter_Batch_54": { - "impl_style": "hls" - }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 1, "SIMD": 16, "ram_style": "block", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/mobilenet-v1/folding_config/ZCU104_folding_config.json b/build/mobilenet-v1/folding_config/ZCU104_folding_config.json index 40a687a..fc99a45 100755 --- a/build/mobilenet-v1/folding_config/ZCU104_folding_config.json +++ b/build/mobilenet-v1/folding_config/ZCU104_folding_config.json @@ -1,816 +1,610 @@ { "Defaults": {}, - "StreamingFIFO_0": { + "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 1, "ram_style": "distributed" }, - "StreamingDataWidthConverter_Batch_0": { - "impl_style": "hls" - }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 3, "ram_style": "auto", - "resType": "dsp", - "mem_mode": "decoupled", + "resType": "lut", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_3": { + "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "StreamingDataWidthConverter_Batch_1": { - "impl_style": "hls" - }, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_2": { - "impl_style": "hls" - }, - "StreamingFIFO_6": { + "StreamingFIFO_rtl_6": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" + "depth": 256 }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 2 }, - "StreamingDataWidthConverter_Batch_3": { - "impl_style": "hls" - }, - "StreamingFIFO_8": { + "StreamingFIFO_rtl_8": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_0": { + "VectorVectorActivation_hls_0": { "PE": 16, "resType": "lut" }, - "StreamingFIFO_10": { + "StreamingFIFO_rtl_10": { "ram_style": "auto", - "depth": 256, - "impl_style": "rtl" - }, - "StreamingDataWidthConverter_Batch_4": { - "impl_style": "hls" + "depth": 256 }, - "Thresholding_Batch_1": { + "Thresholding_hls_1": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_5": { - "impl_style": "hls" - }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 8, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_6": { - "impl_style": "hls" - }, - "Thresholding_Batch_2": { + "Thresholding_hls_2": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_7": { - "impl_style": "hls" - }, - "StreamingFIFO_17": { + "StreamingFIFO_rtl_17": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 4 }, - "StreamingDataWidthConverter_Batch_8": { - "impl_style": "hls" - }, - "StreamingFIFO_19": { + "StreamingFIFO_rtl_19": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_1": { + "VectorVectorActivation_hls_1": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_9": { - "impl_style": "hls" - }, - "Thresholding_Batch_3": { + "Thresholding_hls_3": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_10": { - "impl_style": "hls" - }, - "StreamingFIFO_24": { + "StreamingFIFO_rtl_24": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_11": { - "impl_style": "hls" - }, - "Thresholding_Batch_4": { + "Thresholding_hls_4": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_27": { + "StreamingFIFO_rtl_27": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 2 }, - "StreamingDataWidthConverter_Batch_12": { - "impl_style": "hls" - }, - "StreamingFIFO_29": { + "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 16, "ram_style": "block" }, - "VectorVectorActivation_2": { + "VectorVectorActivation_hls_2": { "PE": 16, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_13": { - "impl_style": "hls" - }, - "Thresholding_Batch_5": { + "Thresholding_hls_5": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_14": { - "impl_style": "hls" - }, - "StreamingFIFO_34": { + "StreamingFIFO_rtl_34": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_15": { - "impl_style": "hls" - }, - "Thresholding_Batch_6": { + "Thresholding_hls_6": { "PE": 2, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_37": { + "StreamingFIFO_rtl_37": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 2 }, - "StreamingDataWidthConverter_Batch_16": { - "impl_style": "hls" - }, - "StreamingFIFO_39": { + "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_3": { + "VectorVectorActivation_hls_3": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_17": { - "impl_style": "hls" - }, - "Thresholding_Batch_7": { + "Thresholding_hls_7": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_18": { - "impl_style": "hls" - }, - "StreamingFIFO_44": { + "StreamingFIFO_rtl_44": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_19": { - "impl_style": "hls" - }, - "Thresholding_Batch_8": { + "Thresholding_hls_8": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_47": { + "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_20": { - "impl_style": "hls" - }, - "StreamingFIFO_49": { + "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 8, "ram_style": "block" }, - "VectorVectorActivation_4": { + "VectorVectorActivation_hls_4": { "PE": 8, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_21": { - "impl_style": "hls" - }, - "Thresholding_Batch_9": { + "Thresholding_hls_9": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_22": { - "impl_style": "hls" - }, - "StreamingFIFO_54": { + "StreamingFIFO_rtl_54": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_23": { - "impl_style": "hls" - }, - "Thresholding_Batch_10": { + "Thresholding_hls_10": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_57": { + "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_24": { - "impl_style": "hls" - }, - "StreamingFIFO_59": { + "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 8192, - "impl_style": "vivado" + "depth": 8192 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 2, "ram_style": "block" }, - "VectorVectorActivation_5": { + "VectorVectorActivation_hls_5": { "PE": 2, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_25": { - "impl_style": "hls" - }, - "Thresholding_Batch_11": { + "Thresholding_hls_11": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_26": { - "impl_style": "hls" - }, - "StreamingFIFO_64": { + "StreamingFIFO_rtl_64": { "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" + "depth": 32 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_27": { - "impl_style": "hls" - }, - "Thresholding_Batch_12": { + "Thresholding_hls_12": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_67": { + "StreamingFIFO_rtl_67": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_28": { - "impl_style": "hls" - }, - "StreamingFIFO_69": { + "StreamingFIFO_rtl_69": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_6": { + "VectorVectorActivation_hls_6": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_29": { - "impl_style": "hls" - }, - "Thresholding_Batch_13": { + "Thresholding_hls_13": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_30": { - "impl_style": "hls" - }, - "StreamingFIFO_74": { + "StreamingFIFO_rtl_74": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_31": { - "impl_style": "hls" - }, - "Thresholding_Batch_14": { + "Thresholding_hls_14": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_77": { + "StreamingFIFO_rtl_77": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_32": { - "impl_style": "hls" - }, - "StreamingFIFO_79": { + "StreamingFIFO_rtl_79": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_7": { + "VectorVectorActivation_hls_7": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_33": { - "impl_style": "hls" - }, - "Thresholding_Batch_15": { + "Thresholding_hls_15": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_34": { - "impl_style": "hls" - }, - "StreamingFIFO_84": { + "StreamingFIFO_rtl_84": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_35": { - "impl_style": "hls" - }, - "Thresholding_Batch_16": { + "Thresholding_hls_16": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_87": { + "StreamingFIFO_rtl_87": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_36": { - "impl_style": "hls" - }, - "StreamingFIFO_89": { + "StreamingFIFO_rtl_89": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_8": { + "VectorVectorActivation_hls_8": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_37": { - "impl_style": "hls" - }, - "Thresholding_Batch_17": { + "Thresholding_hls_17": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_38": { - "impl_style": "hls" - }, - "StreamingFIFO_94": { + "StreamingFIFO_rtl_94": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_39": { - "impl_style": "hls" - }, - "Thresholding_Batch_18": { + "Thresholding_hls_18": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_97": { + "StreamingFIFO_rtl_97": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_40": { - "impl_style": "hls" - }, - "StreamingFIFO_99": { + "StreamingFIFO_rtl_99": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_9": { + "VectorVectorActivation_hls_9": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_41": { - "impl_style": "hls" - }, - "Thresholding_Batch_19": { + "Thresholding_hls_19": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_42": { - "impl_style": "hls" - }, - "StreamingFIFO_104": { + "StreamingFIFO_rtl_104": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_43": { - "impl_style": "hls" - }, - "Thresholding_Batch_20": { + "Thresholding_hls_20": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_107": { + "StreamingFIFO_rtl_107": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_44": { - "impl_style": "hls" - }, - "StreamingFIFO_109": { + "StreamingFIFO_rtl_109": { "ram_style": "ultra", - "depth": 4096, - "impl_style": "vivado" + "depth": 4096 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_10": { + "VectorVectorActivation_hls_10": { "PE": 4, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_45": { - "impl_style": "hls" - }, - "Thresholding_Batch_21": { + "Thresholding_hls_21": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_46": { - "impl_style": "hls" - }, - "StreamingFIFO_114": { + "StreamingFIFO_rtl_114": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 8, "ram_style": "auto", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_47": { - "impl_style": "hls" - }, - "Thresholding_Batch_22": { + "Thresholding_hls_22": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_117": { + "StreamingFIFO_rtl_117": { "ram_style": "ultra", - "depth": 512, - "impl_style": "vivado" + "depth": 512 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 1 }, - "StreamingFIFO_118": { + "StreamingFIFO_rtl_118": { "ram_style": "ultra", - "depth": 16384, - "impl_style": "vivado" + "depth": 16384 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 1, "ram_style": "block" }, - "VectorVectorActivation_11": { + "VectorVectorActivation_hls_11": { "PE": 1, "resType": "lut" }, - "Thresholding_Batch_23": { + "Thresholding_hls_23": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_48": { - "impl_style": "hls" - }, - "StreamingFIFO_122": { + "StreamingFIFO_rtl_122": { "ram_style": "auto", - "depth": 64, - "impl_style": "rtl" + "depth": 64 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 8, "ram_style": "ultra", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 1 }, - "StreamingDataWidthConverter_Batch_49": { - "impl_style": "hls" - }, - "Thresholding_Batch_24": { + "Thresholding_hls_24": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingFIFO_125": { + "StreamingFIFO_rtl_125": { "ram_style": "ultra", - "depth": 1024, - "impl_style": "vivado" + "depth": 1024 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 1 }, - "StreamingDataWidthConverter_Batch_50": { - "impl_style": "hls" - }, - "StreamingFIFO_127": { + "StreamingFIFO_rtl_127": { "ram_style": "ultra", - "depth": 16384, - "impl_style": "vivado" + "depth": 16384 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 2, "ram_style": "block" }, - "VectorVectorActivation_12": { + "VectorVectorActivation_hls_12": { "PE": 2, "resType": "lut" }, - "StreamingDataWidthConverter_Batch_51": { - "impl_style": "hls" - }, - "Thresholding_Batch_25": { + "Thresholding_hls_25": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingDataWidthConverter_Batch_52": { - "impl_style": "hls" - }, - "StreamingFIFO_132": { + "StreamingFIFO_rtl_132": { "ram_style": "auto", - "depth": 128, - "impl_style": "rtl" + "depth": 128 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 8, "ram_style": "ultra", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 1 }, - "StreamingDataWidthConverter_Batch_53": { - "impl_style": "hls" - }, - "Thresholding_Batch_26": { + "Thresholding_hls_26": { "PE": 1, "ram_style": "distributed", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 1, "ram_style": "block" }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 1 }, - "StreamingDataWidthConverter_Batch_54": { - "impl_style": "hls" - }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 1, "SIMD": 16, "ram_style": "ultra", "resType": "lut", - "mem_mode": "decoupled", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 1 }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } } diff --git a/build/mobilenet-v1/specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config.json new file mode 100644 index 0000000..8a8ac14 --- /dev/null +++ b/build/mobilenet-v1/specialize_layers_config.json @@ -0,0 +1,261 @@ +{ + "Defaults": {}, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "hls" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "Thresholding_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_0": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_0": { + "preferred_impl_style": "hls" + }, + "Thresholding_1": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "Thresholding_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_1": { + "preferred_impl_style": "hls" + }, + "Thresholding_3": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "Thresholding_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_2": { + "preferred_impl_style": "hls" + }, + "Thresholding_5": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "Thresholding_6": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_3": { + "preferred_impl_style": "hls" + }, + "Thresholding_7": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "Thresholding_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_4": { + "preferred_impl_style": "hls" + }, + "Thresholding_9": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "Thresholding_10": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_5": { + "preferred_impl_style": "hls" + }, + "Thresholding_11": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "Thresholding_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_6": { + "preferred_impl_style": "hls" + }, + "Thresholding_13": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "Thresholding_14": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_7": { + "preferred_impl_style": "hls" + }, + "Thresholding_15": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "Thresholding_16": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_8": { + "preferred_impl_style": "hls" + }, + "Thresholding_17": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "Thresholding_18": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_9": { + "preferred_impl_style": "hls" + }, + "Thresholding_19": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "hls" + }, + "Thresholding_20": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_10": { + "preferred_impl_style": "hls" + }, + "Thresholding_21": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "hls" + }, + "Thresholding_22": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_11": { + "preferred_impl_style": "hls" + }, + "Thresholding_23": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "hls" + }, + "Thresholding_24": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "hls" + }, + "VectorVectorActivation_12": { + "preferred_impl_style": "hls" + }, + "Thresholding_25": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "hls" + }, + "Thresholding_26": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "hls" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } + } \ No newline at end of file From 6dcc92c53313bab3699de21be0ac4deac92f1400 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Tue, 12 Mar 2024 09:55:47 +0000 Subject: [PATCH 14/53] [Refactor] Update bnn-pynq folding, create specialize layer config --- build/bnn-pynq/build.py | 1 + .../cnv-w1a1_folding_config.json | 27 ++++++--- .../cnv-w1a2_folding_config.json | 27 ++++++--- .../cnv-w2a2_folding_config.json | 27 ++++++--- .../tfc-w1a1_folding_config.json | 12 ++-- .../tfc-w1a2_folding_config.json | 12 ++-- .../tfc-w2a2_folding_config.json | 12 ++-- build/bnn-pynq/specialize_layers_config.json | 60 +++++++++++++++++++ 8 files changed, 139 insertions(+), 39 deletions(-) create mode 100644 build/bnn-pynq/specialize_layers_config.json diff --git a/build/bnn-pynq/build.py b/build/bnn-pynq/build.py index ea509bf..ad4d52d 100644 --- a/build/bnn-pynq/build.py +++ b/build/bnn-pynq/build.py @@ -54,6 +54,7 @@ def platform_to_shell(platform): cfg = build_cfg.DataflowBuildConfig( output_dir="output_%s_%s" % (model_name, release_platform_name), folding_config_file="folding_config/%s_folding_config.json" % model_name, + specialize_layers_config_file="specialize_layers_config.json", synth_clk_period_ns=10.0, board=platform_name, shell_flow_type=shell_flow_type, diff --git a/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json b/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json index 2a6b9ac..f11b896 100644 --- a/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json @@ -11,7 +11,8 @@ "MVAU_hls_0": { "PE": 16, "SIMD": 3, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_1": { "SIMD": 32, @@ -20,7 +21,8 @@ "MVAU_hls_1": { "PE": 32, "SIMD": 32, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_2": { "SIMD": 32, @@ -29,7 +31,8 @@ "MVAU_hls_2": { "PE": 16, "SIMD": 32, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_3": { "SIMD": 32, @@ -38,7 +41,8 @@ "MVAU_hls_3": { "PE": 16, "SIMD": 32, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_4": { "SIMD": 32, @@ -47,7 +51,8 @@ "MVAU_hls_4": { "PE": 4, "SIMD": 32, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_5": { "SIMD": 32, @@ -56,22 +61,26 @@ "MVAU_hls_5": { "PE": 1, "SIMD": 32, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_6": { "PE": 1, "SIMD": 4, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_7": { "PE": 1, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_8": { "PE": 5, "SIMD": 1, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json b/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json index 254ffd3..a4ca895 100644 --- a/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json @@ -11,7 +11,8 @@ "MVAU_hls_0": { "PE": 8, "SIMD": 3, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_1": { "SIMD": 16, @@ -20,7 +21,8 @@ "MVAU_hls_1": { "PE": 16, "SIMD": 16, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_2": { "SIMD": 16, @@ -29,7 +31,8 @@ "MVAU_hls_2": { "PE": 8, "SIMD": 16, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_3": { "SIMD": 16, @@ -38,7 +41,8 @@ "MVAU_hls_3": { "PE": 8, "SIMD": 16, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "ConvolutionInputGenerator_hls_4": { "SIMD": 8, @@ -47,7 +51,8 @@ "MVAU_hls_4": { "PE": 4, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_5": { "SIMD": 8, @@ -56,22 +61,26 @@ "MVAU_hls_5": { "PE": 1, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_6": { "PE": 1, "SIMD": 2, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "MVAU_hls_7": { "PE": 2, "SIMD": 2, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "MVAU_hls_8": { "PE": 5, "SIMD": 1, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json b/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json index 254ffd3..a4ca895 100644 --- a/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json @@ -11,7 +11,8 @@ "MVAU_hls_0": { "PE": 8, "SIMD": 3, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_1": { "SIMD": 16, @@ -20,7 +21,8 @@ "MVAU_hls_1": { "PE": 16, "SIMD": 16, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_2": { "SIMD": 16, @@ -29,7 +31,8 @@ "MVAU_hls_2": { "PE": 8, "SIMD": 16, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_3": { "SIMD": 16, @@ -38,7 +41,8 @@ "MVAU_hls_3": { "PE": 8, "SIMD": 16, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "ConvolutionInputGenerator_hls_4": { "SIMD": 8, @@ -47,7 +51,8 @@ "MVAU_hls_4": { "PE": 4, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "ConvolutionInputGenerator_hls_5": { "SIMD": 8, @@ -56,22 +61,26 @@ "MVAU_hls_5": { "PE": 1, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_6": { "PE": 1, "SIMD": 2, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "MVAU_hls_7": { "PE": 2, "SIMD": 2, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "MVAU_hls_8": { "PE": 5, "SIMD": 1, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json b/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json index 0cb9188..8f5d3b6 100644 --- a/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json @@ -7,22 +7,26 @@ "MVAU_hls_0": { "PE": 16, "SIMD": 49, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "MVAU_hls_1": { "PE": 8, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_2": { "PE": 8, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_3": { "PE": 10, "SIMD": 8, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json b/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json index 0cb9188..8f5d3b6 100644 --- a/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json @@ -7,22 +7,26 @@ "MVAU_hls_0": { "PE": 16, "SIMD": 49, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "MVAU_hls_1": { "PE": 8, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_2": { "PE": 8, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_3": { "PE": 10, "SIMD": 8, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json b/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json index 0cb9188..8f5d3b6 100644 --- a/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json @@ -7,22 +7,26 @@ "MVAU_hls_0": { "PE": 16, "SIMD": 49, - "ram_style": "block" + "ram_style": "block", + "resType": "lut" }, "MVAU_hls_1": { "PE": 8, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_2": { "PE": 8, "SIMD": 8, - "ram_style": "auto" + "ram_style": "auto", + "resType": "lut" }, "MVAU_hls_3": { "PE": 10, "SIMD": 8, - "ram_style": "distributed" + "ram_style": "distributed", + "resType": "lut" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/bnn-pynq/specialize_layers_config.json b/build/bnn-pynq/specialize_layers_config.json new file mode 100644 index 0000000..65d09a3 --- /dev/null +++ b/build/bnn-pynq/specialize_layers_config.json @@ -0,0 +1,60 @@ +{ + "Defaults": {}, + "Thresholding_0": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "hls" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_0": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_1": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } +} \ No newline at end of file From 774814e1cd4bc97faca50ee106c61ee1f3e0af4a Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 21 Mar 2024 13:43:20 +0000 Subject: [PATCH 15/53] [Refactor] Update ResNet50 folding and create specialize layer config --- .../folding_config/U250_folding_config.json | 348 ++++++------ ...ing_config_no_doublepack_pe_folded_16.json | 354 ++++++------ build/resnet50/specialize_layers_config.json | 528 ++++++++++++++++++ 3 files changed, 879 insertions(+), 351 deletions(-) create mode 100644 build/resnet50/specialize_layers_config.json diff --git a/build/resnet50/folding_config/U250_folding_config.json b/build/resnet50/folding_config/U250_folding_config.json index da4f7da..742fe38 100644 --- a/build/resnet50/folding_config/U250_folding_config.json +++ b/build/resnet50/folding_config/U250_folding_config.json @@ -2,615 +2,615 @@ "Defaults": { "outFIFODepths":[[32],"all"], "inFIFODepths":[[32],"all"], - "mem_mode":["decoupled",["MatrixVectorActivation"]] + "mem_mode":["internal_decoupled",["MVAU"]] }, - "ConvDoublePacked_Batch_0": { + "ConvDoublePacked_hls_0": { "SIMD": 3, "PE": 64, "MMV": 16 }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 64 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 64 }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 64 }, - "DuplicateStreams_Batch_0": { + "DuplicateStreams_hls_0": { "PE": 32, "outFIFODepths": [32, 32] }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 32, "SIMD": 32 }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 8, "SIMD": 32 }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 64 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 64 }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_0": { + "AddStreams_hls_0": { "PE": 32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 32 }, - "DuplicateStreams_Batch_1": { + "DuplicateStreams_hls_1": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_1": { + "Thresholding_hls_1": { "PE": 32 }, - "Thresholding_Batch_2": { + "Thresholding_hls_2": { "PE": 32 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 64 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 64 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_1": { + "AddStreams_hls_1": { "PE": 32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_3": { + "Thresholding_hls_3": { "PE": 32 }, - "DuplicateStreams_Batch_2": { + "DuplicateStreams_hls_2": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_4": { + "Thresholding_hls_4": { "PE": 32 }, - "Thresholding_Batch_5": { + "Thresholding_hls_5": { "PE": 32 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 64 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 64 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 64 }, - "AddStreams_Batch_2": { + "AddStreams_hls_2": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_6": { + "Thresholding_hls_6": { "PE": 32 }, - "Thresholding_Batch_7": { + "Thresholding_hls_7": { "PE": 32 }, - "DuplicateStreams_Batch_3": { + "DuplicateStreams_hls_3": { "PE": 32, "outFIFODepths": [32, 32] }, - "DownSampler_0": { + "DownSampler_hls_0": { "SIMD": 64 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 64 }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 64 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 64 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_3": { + "AddStreams_hls_3": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_8": { + "Thresholding_hls_8": { "PE": 32 }, - "DuplicateStreams_Batch_4": { + "DuplicateStreams_hls_4": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_9": { + "Thresholding_hls_9": { "PE": 32 }, - "Thresholding_Batch_10": { + "Thresholding_hls_10": { "PE": 32 }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 64 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 64 }, - "MatrixVectorActivation_15": { + "MVAU_hls_15": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_16": { + "MVAU_hls_16": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_4": { + "AddStreams_hls_4": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_11": { + "Thresholding_hls_11": { "PE": 32 }, - "DuplicateStreams_Batch_5": { + "DuplicateStreams_hls_5": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_12": { + "Thresholding_hls_12": { "PE": 32 }, - "Thresholding_Batch_13": { + "Thresholding_hls_13": { "PE": 32 }, - "MatrixVectorActivation_17": { + "MVAU_hls_17": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 64 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 64 }, - "MatrixVectorActivation_18": { + "MVAU_hls_18": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_19": { + "MVAU_hls_19": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_5": { + "AddStreams_hls_5": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_14": { + "Thresholding_hls_14": { "PE": 32 }, - "DuplicateStreams_Batch_6": { + "DuplicateStreams_hls_6": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_15": { + "Thresholding_hls_15": { "PE": 32 }, - "Thresholding_Batch_16": { + "Thresholding_hls_16": { "PE": 32 }, - "MatrixVectorActivation_20": { + "MVAU_hls_20": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 64 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 64 }, - "MatrixVectorActivation_21": { + "MVAU_hls_21": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_22": { + "MVAU_hls_22": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_6": { + "AddStreams_hls_6": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_17": { + "Thresholding_hls_17": { "PE": 32 }, - "Thresholding_Batch_18": { + "Thresholding_hls_18": { "PE": 32 }, - "DuplicateStreams_Batch_7": { + "DuplicateStreams_hls_7": { "PE": 32, "outFIFODepths": [32, 32] }, - "DownSampler_1": { + "DownSampler_hls_1": { "SIMD": 64 }, - "MatrixVectorActivation_23": { + "MVAU_hls_23": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_24": { + "MVAU_hls_24": { "PE": 32, "SIMD": 64 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 64 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 64 }, - "MatrixVectorActivation_25": { + "MVAU_hls_25": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_26": { + "MVAU_hls_26": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_7": { + "AddStreams_hls_7": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_19": { + "Thresholding_hls_19": { "PE": 32 }, - "DuplicateStreams_Batch_8": { + "DuplicateStreams_hls_8": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_20": { + "Thresholding_hls_20": { "PE": 32 }, - "Thresholding_Batch_21": { + "Thresholding_hls_21": { "PE": 32 }, - "MatrixVectorActivation_27": { + "MVAU_hls_27": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 64 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 64 }, - "MatrixVectorActivation_28": { + "MVAU_hls_28": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_29": { + "MVAU_hls_29": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_8": { + "AddStreams_hls_8": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_22": { + "Thresholding_hls_22": { "PE": 32 }, - "DuplicateStreams_Batch_9": { + "DuplicateStreams_hls_9": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_23": { + "Thresholding_hls_23": { "PE": 32 }, - "Thresholding_Batch_24": { + "Thresholding_hls_24": { "PE": 32 }, - "MatrixVectorActivation_30": { + "MVAU_hls_30": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 64 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 64 }, - "MatrixVectorActivation_31": { + "MVAU_hls_31": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_32": { + "MVAU_hls_32": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_9": { + "AddStreams_hls_9": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_25": { + "Thresholding_hls_25": { "PE": 32 }, - "DuplicateStreams_Batch_10": { + "DuplicateStreams_hls_10": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_26": { + "Thresholding_hls_26": { "PE": 32 }, - "Thresholding_Batch_27": { + "Thresholding_hls_27": { "PE": 32 }, - "MatrixVectorActivation_33": { + "MVAU_hls_33": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 64 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 64 }, - "MatrixVectorActivation_34": { + "MVAU_hls_34": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_35": { + "MVAU_hls_35": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_10": { + "AddStreams_hls_10": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_28": { + "Thresholding_hls_28": { "PE": 32 }, - "DuplicateStreams_Batch_11": { + "DuplicateStreams_hls_11": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_29": { + "Thresholding_hls_29": { "PE": 32 }, - "Thresholding_Batch_30": { + "Thresholding_hls_30": { "PE": 32 }, - "MatrixVectorActivation_36": { + "MVAU_hls_36": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 64 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 64 }, - "MatrixVectorActivation_37": { + "MVAU_hls_37": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_38": { + "MVAU_hls_38": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_11": { + "AddStreams_hls_11": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_31": { + "Thresholding_hls_31": { "PE": 32 }, - "DuplicateStreams_Batch_12": { + "DuplicateStreams_hls_12": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_32": { + "Thresholding_hls_32": { "PE": 32 }, - "Thresholding_Batch_33": { + "Thresholding_hls_33": { "PE": 32 }, - "MatrixVectorActivation_39": { + "MVAU_hls_39": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_13": { + "FMPadding_hls_13": { "SIMD": 64 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 64 }, - "MatrixVectorActivation_40": { + "MVAU_hls_40": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_41": { + "MVAU_hls_41": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_12": { + "AddStreams_hls_12": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_34": { + "Thresholding_hls_34": { "PE": 32 }, - "Thresholding_Batch_35": { + "Thresholding_hls_35": { "PE": 32 }, - "DuplicateStreams_Batch_13": { + "DuplicateStreams_hls_13": { "PE": 32, "outFIFODepths": [32, 32] }, - "DownSampler_2": { + "DownSampler_hls_2": { "SIMD": 64 }, - "MatrixVectorActivation_42": { + "MVAU_hls_42": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_43": { + "MVAU_hls_43": { "PE": 32, "SIMD": 64 }, - "FMPadding_Batch_14": { + "FMPadding_hls_14": { "SIMD": 64 }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 64 }, - "MatrixVectorActivation_44": { + "MVAU_hls_44": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_45": { + "MVAU_hls_45": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_13": { + "AddStreams_hls_13": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_36": { + "Thresholding_hls_36": { "PE": 32 }, - "DuplicateStreams_Batch_14": { + "DuplicateStreams_hls_14": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_37": { + "Thresholding_hls_37": { "PE": 32 }, - "Thresholding_Batch_38": { + "Thresholding_hls_38": { "PE": 32 }, - "MatrixVectorActivation_46": { + "MVAU_hls_46": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_15": { + "FMPadding_hls_15": { "SIMD": 64 }, - "ConvolutionInputGenerator_15": { + "ConvolutionInputGenerator_hls_15": { "SIMD": 64 }, - "MatrixVectorActivation_47": { + "MVAU_hls_47": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_48": { + "MVAU_hls_48": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_14": { + "AddStreams_hls_14": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_39": { + "Thresholding_hls_39": { "PE": 32 }, - "DuplicateStreams_Batch_15": { + "DuplicateStreams_hls_15": { "PE": 32, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_40": { + "Thresholding_hls_40": { "PE": 32 }, - "Thresholding_Batch_41": { + "Thresholding_hls_41": { "PE": 32 }, - "MatrixVectorActivation_49": { + "MVAU_hls_49": { "PE": 32, "SIMD": 32 }, - "FMPadding_Batch_16": { + "FMPadding_hls_16": { "SIMD": 64 }, - "ConvolutionInputGenerator_16": { + "ConvolutionInputGenerator_hls_16": { "SIMD": 64 }, - "MatrixVectorActivation_50": { + "MVAU_hls_50": { "PE": 32, "SIMD": 64 }, - "MatrixVectorActivation_51": { + "MVAU_hls_51": { "PE": 32, "SIMD": 32 }, - "AddStreams_Batch_15": { + "AddStreams_hls_15": { "PE":32, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_42": { + "Thresholding_hls_42": { "PE": 32 }, - "ConvolutionInputGenerator_17": { + "ConvolutionInputGenerator_hls_17": { "SIMD": 64 }, - "Pool_Batch_1": { + "Pool_hls_1": { "PE": 64 }, - "MatrixVectorActivation_52": { + "MVAU_hls_52": { "PE": 1, "SIMD": 64, "mem_mode" : "external" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "outputDataType":"UINT16", "PE": 1 }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 32 }, - "ChannelwiseOp_Batch_1": { + "ChannelwiseOp_hls_1": { "PE": 32 }, - "ChannelwiseOp_Batch_2": { + "ChannelwiseOp_hls_2": { "PE": 1 } } diff --git a/build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json b/build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json index 09aa2dc..e25bfd8 100644 --- a/build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json +++ b/build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json @@ -9,623 +9,623 @@ "all" ], "mem_mode": [ - "decoupled", + "internal_decoupled", [ - "MatrixVectorActivation" + "MVAU" ] ] }, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 3 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 3 }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "SIMD": 3, "PE": 64 }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 4 }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 4 }, - "Pool_Batch_0": { + "Pool_hls_0": { "PE": 4 }, - "DuplicateStreams_Batch_0": { + "DuplicateStreams_hls_0": { "PE": 2, "outFIFODepths": [32, 32] }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 2, "SIMD": 32 }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 1, "SIMD": 16 }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 4 }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 4 }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_0": { + "AddStreams_hls_0": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_0": { + "Thresholding_hls_0": { "PE": 2 }, - "DuplicateStreams_Batch_1": { + "DuplicateStreams_hls_1": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_1": { + "Thresholding_hls_1": { "PE": 2 }, - "Thresholding_Batch_2": { + "Thresholding_hls_2": { "PE": 2 }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 4 }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 4 }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_1": { + "AddStreams_hls_1": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_3": { + "Thresholding_hls_3": { "PE": 2 }, - "DuplicateStreams_Batch_2": { + "DuplicateStreams_hls_2": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_4": { + "Thresholding_hls_4": { "PE": 2 }, - "Thresholding_Batch_5": { + "Thresholding_hls_5": { "PE": 2 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 4 }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 4 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_10": { + "MVAU_hls_10": { "PE": 2, "SIMD": 64 }, - "AddStreams_Batch_2": { + "AddStreams_hls_2": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_6": { + "Thresholding_hls_6": { "PE": 2 }, - "Thresholding_Batch_7": { + "Thresholding_hls_7": { "PE": 2 }, - "DuplicateStreams_Batch_3": { + "DuplicateStreams_hls_3": { "PE": 2, "outFIFODepths": [32, 32] }, - "DownSampler_0": { + "DownSampler_hls_0": { "SIMD": 4 }, - "MatrixVectorActivation_11": { + "MVAU_hls_11": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_12": { + "MVAU_hls_12": { "PE": 2, "SIMD": 64 }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 4 }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 4 }, - "MatrixVectorActivation_13": { + "MVAU_hls_13": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_14": { + "MVAU_hls_14": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_3": { + "AddStreams_hls_3": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_8": { + "Thresholding_hls_8": { "PE": 2 }, - "DuplicateStreams_Batch_4": { + "DuplicateStreams_hls_4": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_9": { + "Thresholding_hls_9": { "PE": 2 }, - "Thresholding_Batch_10": { + "Thresholding_hls_10": { "PE": 2 }, - "MatrixVectorActivation_15": { + "MVAU_hls_15": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 4 }, - "ConvolutionInputGenerator_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 4 }, - "MatrixVectorActivation_16": { + "MVAU_hls_16": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_17": { + "MVAU_hls_17": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_4": { + "AddStreams_hls_4": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_11": { + "Thresholding_hls_11": { "PE": 2 }, - "DuplicateStreams_Batch_5": { + "DuplicateStreams_hls_5": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_12": { + "Thresholding_hls_12": { "PE": 2 }, - "Thresholding_Batch_13": { + "Thresholding_hls_13": { "PE": 2 }, - "MatrixVectorActivation_18": { + "MVAU_hls_18": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_7": { + "FMPadding_hls_7": { "SIMD": 4 }, - "ConvolutionInputGenerator_7": { + "ConvolutionInputGenerator_hls_7": { "SIMD": 4 }, - "MatrixVectorActivation_19": { + "MVAU_hls_19": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_20": { + "MVAU_hls_20": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_5": { + "AddStreams_hls_5": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_14": { + "Thresholding_hls_14": { "PE": 2 }, - "DuplicateStreams_Batch_6": { + "DuplicateStreams_hls_6": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_15": { + "Thresholding_hls_15": { "PE": 2 }, - "Thresholding_Batch_16": { + "Thresholding_hls_16": { "PE": 2 }, - "MatrixVectorActivation_21": { + "MVAU_hls_21": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_8": { + "FMPadding_hls_8": { "SIMD": 4 }, - "ConvolutionInputGenerator_8": { + "ConvolutionInputGenerator_hls_8": { "SIMD": 4 }, - "MatrixVectorActivation_22": { + "MVAU_hls_22": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_23": { + "MVAU_hls_23": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_6": { + "AddStreams_hls_6": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_17": { + "Thresholding_hls_17": { "PE": 2 }, - "Thresholding_Batch_18": { + "Thresholding_hls_18": { "PE": 2 }, - "DuplicateStreams_Batch_7": { + "DuplicateStreams_hls_7": { "PE": 2, "outFIFODepths": [32, 32] }, - "DownSampler_1": { + "DownSampler_hls_1": { "SIMD": 4 }, - "MatrixVectorActivation_24": { + "MVAU_hls_24": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_25": { + "MVAU_hls_25": { "PE": 2, "SIMD": 64 }, - "FMPadding_Batch_9": { + "FMPadding_hls_9": { "SIMD": 4 }, - "ConvolutionInputGenerator_9": { + "ConvolutionInputGenerator_hls_9": { "SIMD": 4 }, - "MatrixVectorActivation_26": { + "MVAU_hls_26": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_27": { + "MVAU_hls_27": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_7": { + "AddStreams_hls_7": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_19": { + "Thresholding_hls_19": { "PE": 2 }, - "DuplicateStreams_Batch_8": { + "DuplicateStreams_hls_8": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_20": { + "Thresholding_hls_20": { "PE": 2 }, - "Thresholding_Batch_21": { + "Thresholding_hls_21": { "PE": 2 }, - "MatrixVectorActivation_28": { + "MVAU_hls_28": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_10": { + "FMPadding_hls_10": { "SIMD": 4 }, - "ConvolutionInputGenerator_10": { + "ConvolutionInputGenerator_hls_10": { "SIMD": 4 }, - "MatrixVectorActivation_29": { + "MVAU_hls_29": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_30": { + "MVAU_hls_30": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_8": { + "AddStreams_hls_8": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_22": { + "Thresholding_hls_22": { "PE": 2 }, - "DuplicateStreams_Batch_9": { + "DuplicateStreams_hls_9": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_23": { + "Thresholding_hls_23": { "PE": 2 }, - "Thresholding_Batch_24": { + "Thresholding_hls_24": { "PE": 2 }, - "MatrixVectorActivation_31": { + "MVAU_hls_31": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_11": { + "FMPadding_hls_11": { "SIMD": 4 }, - "ConvolutionInputGenerator_11": { + "ConvolutionInputGenerator_hls_11": { "SIMD": 4 }, - "MatrixVectorActivation_32": { + "MVAU_hls_32": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_33": { + "MVAU_hls_33": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_9": { + "AddStreams_hls_9": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_25": { + "Thresholding_hls_25": { "PE": 2 }, - "DuplicateStreams_Batch_10": { + "DuplicateStreams_hls_10": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_26": { + "Thresholding_hls_26": { "PE": 2 }, - "Thresholding_Batch_27": { + "Thresholding_hls_27": { "PE": 2 }, - "MatrixVectorActivation_34": { + "MVAU_hls_34": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_12": { + "FMPadding_hls_12": { "SIMD": 4 }, - "ConvolutionInputGenerator_12": { + "ConvolutionInputGenerator_hls_12": { "SIMD": 4 }, - "MatrixVectorActivation_35": { + "MVAU_hls_35": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_36": { + "MVAU_hls_36": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_10": { + "AddStreams_hls_10": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_28": { + "Thresholding_hls_28": { "PE": 2 }, - "DuplicateStreams_Batch_11": { + "DuplicateStreams_hls_11": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_29": { + "Thresholding_hls_29": { "PE": 2 }, - "Thresholding_Batch_30": { + "Thresholding_hls_30": { "PE": 2 }, - "MatrixVectorActivation_37": { + "MVAU_hls_37": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_13": { + "FMPadding_hls_13": { "SIMD": 4 }, - "ConvolutionInputGenerator_13": { + "ConvolutionInputGenerator_hls_13": { "SIMD": 4 }, - "MatrixVectorActivation_38": { + "MVAU_hls_38": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_39": { + "MVAU_hls_39": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_11": { + "AddStreams_hls_11": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_31": { + "Thresholding_hls_31": { "PE": 2 }, - "DuplicateStreams_Batch_12": { + "DuplicateStreams_hls_12": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_32": { + "Thresholding_hls_32": { "PE": 2 }, - "Thresholding_Batch_33": { + "Thresholding_hls_33": { "PE": 2 }, - "MatrixVectorActivation_40": { + "MVAU_hls_40": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_14": { + "FMPadding_hls_14": { "SIMD": 4 }, - "ConvolutionInputGenerator_14": { + "ConvolutionInputGenerator_hls_14": { "SIMD": 4 }, - "MatrixVectorActivation_41": { + "MVAU_hls_41": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_42": { + "MVAU_hls_42": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_12": { + "AddStreams_hls_12": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_34": { + "Thresholding_hls_34": { "PE": 2 }, - "Thresholding_Batch_35": { + "Thresholding_hls_35": { "PE": 2 }, - "DuplicateStreams_Batch_13": { + "DuplicateStreams_hls_13": { "PE": 2, "outFIFODepths": [32, 32] }, - "DownSampler_2": { + "DownSampler_hls_2": { "SIMD": 4 }, - "MatrixVectorActivation_43": { + "MVAU_hls_43": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_44": { + "MVAU_hls_44": { "PE": 2, "SIMD": 64 }, - "FMPadding_Batch_15": { + "FMPadding_hls_15": { "SIMD": 4 }, - "ConvolutionInputGenerator_15": { + "ConvolutionInputGenerator_hls_15": { "SIMD": 4 }, - "MatrixVectorActivation_45": { + "MVAU_hls_45": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_46": { + "MVAU_hls_46": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_13": { + "AddStreams_hls_13": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_36": { + "Thresholding_hls_36": { "PE": 2 }, - "DuplicateStreams_Batch_14": { + "DuplicateStreams_hls_14": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_37": { + "Thresholding_hls_37": { "PE": 2 }, - "Thresholding_Batch_38": { + "Thresholding_hls_38": { "PE": 2 }, - "MatrixVectorActivation_47": { + "MVAU_hls_47": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_16": { + "FMPadding_hls_16": { "SIMD": 4 }, - "ConvolutionInputGenerator_16": { + "ConvolutionInputGenerator_hls_16": { "SIMD": 4 }, - "MatrixVectorActivation_48": { + "MVAU_hls_48": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_49": { + "MVAU_hls_49": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_14": { + "AddStreams_hls_14": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_39": { + "Thresholding_hls_39": { "PE": 2 }, - "DuplicateStreams_Batch_15": { + "DuplicateStreams_hls_15": { "PE": 2, "outFIFODepths": [32, 32] }, - "Thresholding_Batch_40": { + "Thresholding_hls_40": { "PE": 2 }, - "Thresholding_Batch_41": { + "Thresholding_hls_41": { "PE": 2 }, - "MatrixVectorActivation_50": { + "MVAU_hls_50": { "PE": 2, "SIMD": 32 }, - "FMPadding_Batch_17": { + "FMPadding_hls_17": { "SIMD": 4 }, - "ConvolutionInputGenerator_17": { + "ConvolutionInputGenerator_hls_17": { "SIMD": 4 }, - "MatrixVectorActivation_51": { + "MVAU_hls_51": { "PE": 2, "SIMD": 64 }, - "MatrixVectorActivation_52": { + "MVAU_hls_52": { "PE": 2, "SIMD": 32 }, - "AddStreams_Batch_15": { + "AddStreams_hls_15": { "PE": 2, "inFIFODepths": [32, 32] }, - "Thresholding_Batch_42": { + "Thresholding_hls_42": { "PE": 2 }, - "ConvolutionInputGenerator_18": { + "ConvolutionInputGenerator_hls_18": { "SIMD": 4 }, - "Pool_Batch_1": { + "Pool_hls_1": { "PE": 4 }, - "MatrixVectorActivation_53": { + "MVAU_hls_53": { "PE": 1, "SIMD": 4, "mem_mode": "external" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "outputDataType": "UINT16", "PE": 1 }, - "ChannelwiseOp_Batch_0": { + "ChannelwiseOp_hls_0": { "PE": 2 }, - "ChannelwiseOp_Batch_1": { + "ChannelwiseOp_hls_1": { "PE": 2 }, - "ChannelwiseOp_Batch_2": { + "ChannelwiseOp_hls_2": { "PE": 1 } } diff --git a/build/resnet50/specialize_layers_config.json b/build/resnet50/specialize_layers_config.json new file mode 100644 index 0000000..a3cc5e6 --- /dev/null +++ b/build/resnet50/specialize_layers_config.json @@ -0,0 +1,528 @@ +{ + "Defaults": {}, + "FMPadding_0": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "hls" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "hls" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_0": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "AddStreams_0": { + "preferred_impl_style": "hls" + }, + "Thresholding_0": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_1": { + "preferred_impl_style": "hls" + }, + "Thresholding_1": { + "preferred_impl_style": "hls" + }, + "Thresholding_2": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "AddStreams_1": { + "preferred_impl_style": "hls" + }, + "Thresholding_3": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_2": { + "preferred_impl_style": "hls" + }, + "Thresholding_4": { + "preferred_impl_style": "hls" + }, + "Thresholding_5": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "hls" + }, + "AddStreams_2": { + "preferred_impl_style": "hls" + }, + "Thresholding_6": { + "preferred_impl_style": "hls" + }, + "Thresholding_7": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_3": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "hls" + }, + "DownSampler_0": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "hls" + }, + "AddStreams_3": { + "preferred_impl_style": "hls" + }, + "Thresholding_8": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_4": { + "preferred_impl_style": "hls" + }, + "Thresholding_9": { + "preferred_impl_style": "hls" + }, + "Thresholding_10": { + "preferred_impl_style": "hls" + }, + "MVAU_15": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "hls" + }, + "MVAU_16": { + "preferred_impl_style": "hls" + }, + "MVAU_17": { + "preferred_impl_style": "hls" + }, + "AddStreams_4": { + "preferred_impl_style": "hls" + }, + "Thresholding_11": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_5": { + "preferred_impl_style": "hls" + }, + "Thresholding_12": { + "preferred_impl_style": "hls" + }, + "Thresholding_13": { + "preferred_impl_style": "hls" + }, + "MVAU_18": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "hls" + }, + "MVAU_19": { + "preferred_impl_style": "hls" + }, + "MVAU_20": { + "preferred_impl_style": "hls" + }, + "AddStreams_5": { + "preferred_impl_style": "hls" + }, + "Thresholding_14": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_6": { + "preferred_impl_style": "hls" + }, + "Thresholding_15": { + "preferred_impl_style": "hls" + }, + "Thresholding_16": { + "preferred_impl_style": "hls" + }, + "MVAU_21": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "hls" + }, + "MVAU_22": { + "preferred_impl_style": "hls" + }, + "MVAU_23": { + "preferred_impl_style": "hls" + }, + "AddStreams_6": { + "preferred_impl_style": "hls" + }, + "Thresholding_17": { + "preferred_impl_style": "hls" + }, + "Thresholding_18": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_7": { + "preferred_impl_style": "hls" + }, + "MVAU_24": { + "preferred_impl_style": "hls" + }, + "DownSampler_1": { + "preferred_impl_style": "hls" + }, + "MVAU_25": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "hls" + }, + "MVAU_26": { + "preferred_impl_style": "hls" + }, + "MVAU_27": { + "preferred_impl_style": "hls" + }, + "AddStreams_7": { + "preferred_impl_style": "hls" + }, + "Thresholding_19": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_8": { + "preferred_impl_style": "hls" + }, + "Thresholding_20": { + "preferred_impl_style": "hls" + }, + "Thresholding_21": { + "preferred_impl_style": "hls" + }, + "MVAU_28": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "hls" + }, + "MVAU_29": { + "preferred_impl_style": "hls" + }, + "MVAU_30": { + "preferred_impl_style": "hls" + }, + "AddStreams_8": { + "preferred_impl_style": "hls" + }, + "Thresholding_22": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_9": { + "preferred_impl_style": "hls" + }, + "Thresholding_23": { + "preferred_impl_style": "hls" + }, + "Thresholding_24": { + "preferred_impl_style": "hls" + }, + "MVAU_31": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "hls" + }, + "MVAU_32": { + "preferred_impl_style": "hls" + }, + "MVAU_33": { + "preferred_impl_style": "hls" + }, + "AddStreams_9": { + "preferred_impl_style": "hls" + }, + "Thresholding_25": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_10": { + "preferred_impl_style": "hls" + }, + "Thresholding_26": { + "preferred_impl_style": "hls" + }, + "Thresholding_27": { + "preferred_impl_style": "hls" + }, + "MVAU_34": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "hls" + }, + "MVAU_35": { + "preferred_impl_style": "hls" + }, + "MVAU_36": { + "preferred_impl_style": "hls" + }, + "AddStreams_10": { + "preferred_impl_style": "hls" + }, + "Thresholding_28": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_11": { + "preferred_impl_style": "hls" + }, + "Thresholding_29": { + "preferred_impl_style": "hls" + }, + "Thresholding_30": { + "preferred_impl_style": "hls" + }, + "MVAU_37": { + "preferred_impl_style": "hls" + }, + "FMPadding_13": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "hls" + }, + "MVAU_38": { + "preferred_impl_style": "hls" + }, + "MVAU_39": { + "preferred_impl_style": "hls" + }, + "AddStreams_11": { + "preferred_impl_style": "hls" + }, + "Thresholding_31": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_12": { + "preferred_impl_style": "hls" + }, + "Thresholding_32": { + "preferred_impl_style": "hls" + }, + "Thresholding_33": { + "preferred_impl_style": "hls" + }, + "MVAU_40": { + "preferred_impl_style": "hls" + }, + "FMPadding_14": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "hls" + }, + "MVAU_41": { + "preferred_impl_style": "hls" + }, + "MVAU_42": { + "preferred_impl_style": "hls" + }, + "AddStreams_12": { + "preferred_impl_style": "hls" + }, + "Thresholding_34": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "Thresholding_35": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_13": { + "preferred_impl_style": "hls" + }, + "MVAU_43": { + "preferred_impl_style": "hls" + }, + "DownSampler_2": { + "preferred_impl_style": "hls" + }, + "MVAU_44": { + "preferred_impl_style": "hls" + }, + "FMPadding_15": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_15": { + "preferred_impl_style": "hls" + }, + "MVAU_45": { + "preferred_impl_style": "hls" + }, + "MVAU_46": { + "preferred_impl_style": "hls" + }, + "AddStreams_13": { + "preferred_impl_style": "hls" + }, + "Thresholding_36": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_14": { + "preferred_impl_style": "hls" + }, + "Thresholding_37": { + "preferred_impl_style": "hls" + }, + "Thresholding_38": { + "preferred_impl_style": "hls" + }, + "MVAU_47": { + "preferred_impl_style": "hls" + }, + "FMPadding_16": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_16": { + "preferred_impl_style": "hls" + }, + "MVAU_48": { + "preferred_impl_style": "hls" + }, + "MVAU_49": { + "preferred_impl_style": "hls" + }, + "AddStreams_14": { + "preferred_impl_style": "hls" + }, + "Thresholding_39": { + "preferred_impl_style": "hls" + }, + "DuplicateStreams_15": { + "preferred_impl_style": "hls" + }, + "Thresholding_40": { + "preferred_impl_style": "hls" + }, + "Thresholding_41": { + "preferred_impl_style": "hls" + }, + "MVAU_50": { + "preferred_impl_style": "hls" + }, + "FMPadding_17": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_17": { + "preferred_impl_style": "hls" + }, + "MVAU_51": { + "preferred_impl_style": "hls" + }, + "MVAU_52": { + "preferred_impl_style": "hls" + }, + "AddStreams_15": { + "preferred_impl_style": "hls" + }, + "Thresholding_42": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_1": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_18": { + "preferred_impl_style": "hls" + }, + "Pool_1": { + "preferred_impl_style": "hls" + }, + "MVAU_53": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_2": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } +} \ No newline at end of file From 5bc29f82d9530b38916450fc34f96bb2574e5b05 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Thu, 21 Mar 2024 13:51:53 +0000 Subject: [PATCH 16/53] [Refactor] Update radioml folding and create specialize layer config --- build/vgg10-radioml/build.py | 1 + .../folding_config/ZCU104_folding_config.json | 82 +++++++------- .../specialize_layers_config.json | 102 ++++++++++++++++++ 3 files changed, 144 insertions(+), 41 deletions(-) create mode 100644 build/vgg10-radioml/specialize_layers_config.json diff --git a/build/vgg10-radioml/build.py b/build/vgg10-radioml/build.py index 812b69a..f27b393 100755 --- a/build/vgg10-radioml/build.py +++ b/build/vgg10-radioml/build.py @@ -110,6 +110,7 @@ def select_build_steps(platform): shell_flow_type=shell_flow_type, vitis_platform=vitis_platform, folding_config_file="folding_config/%s_folding_config.json" % platform_name, + specialize_layers_config_file="specialize_layers_config.json", auto_fifo_depths=True, standalone_thresholds=False, # enable extra performance optimizations (physopt) diff --git a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json index 14f908a..52583f9 100755 --- a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json +++ b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json @@ -1,136 +1,136 @@ { "Defaults": {}, - "FMPadding_Batch_0": { + "FMPadding_hls_0": { "SIMD": 2 }, - "ConvolutionInputGenerator1D_0": { + "ConvolutionInputGenerator_hls_0": { "SIMD": 2, "ram_style": "auto" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 32, "SIMD": 6, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_0": { + "StreamingMaxPool_hls_0": { }, - "FMPadding_Batch_1": { + "FMPadding_hls_1": { "SIMD": 16 }, - "ConvolutionInputGenerator1D_1": { + "ConvolutionInputGenerator_hls_1": { "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 96, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_1": { + "StreamingMaxPool_hls_1": { }, - "FMPadding_Batch_2": { + "FMPadding_hls_2": { "SIMD": 8 }, - "ConvolutionInputGenerator1D_2": { + "ConvolutionInputGenerator_hls_2": { "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 8, "SIMD": 96, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_2": { + "StreamingMaxPool_hls_2": { }, - "FMPadding_Batch_3": { + "FMPadding_hls_3": { "SIMD": 8 }, - "ConvolutionInputGenerator1D_3": { + "ConvolutionInputGenerator_hls_3": { "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 4, "SIMD": 96, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_3": { + "StreamingMaxPool_hls_3": { }, - "FMPadding_Batch_4": { + "FMPadding_hls_4": { "SIMD": 4 }, - "ConvolutionInputGenerator1D_4": { + "ConvolutionInputGenerator_hls_4": { "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 2, "SIMD": 96, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_4": { + "StreamingMaxPool_hls_4": { }, - "FMPadding_Batch_5": { + "FMPadding_hls_5": { "SIMD": 2 }, - "ConvolutionInputGenerator1D_5": { + "ConvolutionInputGenerator_hls_5": { "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 1, "SIMD": 96, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_5": { + "StreamingMaxPool_hls_5": { }, - "FMPadding_Batch_6": { + "FMPadding_hls_6": { "SIMD": 1 }, - "ConvolutionInputGenerator1D_6": { + "ConvolutionInputGenerator_hls_6": { "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 1, "SIMD": 96, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "StreamingMaxPool_Batch_6": { + "StreamingMaxPool_hls_6": { }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 2, "SIMD": 32, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 1, "SIMD": 32, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "MatrixVectorActivation_9": { + "MVAU_hls_9": { "PE": 1, "SIMD": 8, "ram_style": "auto", - "mem_mode": "const", + "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 } } diff --git a/build/vgg10-radioml/specialize_layers_config.json b/build/vgg10-radioml/specialize_layers_config.json new file mode 100644 index 0000000..2fbeb76 --- /dev/null +++ b/build/vgg10-radioml/specialize_layers_config.json @@ -0,0 +1,102 @@ +{ + "Defaults": {}, + "FMPadding_0": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "hls" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_1": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_3": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_5": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "StreamingMaxPool_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } +} \ No newline at end of file From 37c067bba48ff57e42e0ce8ab05803c4124c2e22 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Fri, 22 Mar 2024 13:44:55 +0000 Subject: [PATCH 17/53] [Refactor] Update mobilenetv1 --- build/mobilenet-v1/custom_steps.py | 28 +- .../folding_config/U250_folding_config.json | 254 +++++------- .../folding_config/ZCU102_folding_config.json | 369 ++++++------------ .../specialize_layers_config.json | 192 ++++----- 4 files changed, 311 insertions(+), 532 deletions(-) diff --git a/build/mobilenet-v1/custom_steps.py b/build/mobilenet-v1/custom_steps.py index 9165f48..41d8bca 100644 --- a/build/mobilenet-v1/custom_steps.py +++ b/build/mobilenet-v1/custom_steps.py @@ -44,7 +44,7 @@ GiveUniqueNodeNames, ApplyConfig, ) -import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hls +import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hw from qonnx.transformation.infer_shapes import InferShapes from qonnx.transformation.change_datalayout import ChangeDataLayoutQuantAvgPool2d from qonnx.transformation.infer_datatypes import InferDataTypes @@ -88,12 +88,12 @@ def step_mobilenet_lower_convs(model: ModelWrapper, cfg: DataflowBuildConfig): def step_mobilenet_convert_to_hw_layers(model: ModelWrapper, cfg: DataflowBuildConfig): - model = model.transform(to_hls.InferPool()) - model = model.transform(to_hls.InferConvInpGen()) - model = model.transform(to_hls.InferVectorVectorActivation()) - model = model.transform(to_hls.InferQuantizedMatrixVectorActivation()) - model = model.transform(to_hls.InferChannelwiseLinearLayer()) - model = model.transform(to_hls.InferLabelSelectLayer()) + model = model.transform(to_hw.InferPool()) + model = model.transform(to_hw.InferConvInpGen()) + model = model.transform(to_hw.InferVectorVectorActivation()) + model = model.transform(to_hw.InferQuantizedMatrixVectorActivation()) + model = model.transform(to_hw.InferChannelwiseLinearLayer()) + model = model.transform(to_hw.InferLabelSelectLayer()) model = model.transform(InferShapes()) model = model.transform(GiveUniqueNodeNames()) model = model.transform(GiveReadableTensorNames()) @@ -125,13 +125,13 @@ def step_mobilenet_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): def step_mobilenet_convert_to_hw_layers_separate_th(model: ModelWrapper, cfg: DataflowBuildConfig): - model = model.transform(to_hls.InferPool()) - model = model.transform(to_hls.InferConvInpGen()) - model = model.transform(to_hls.InferThresholdingLayer()) - model = model.transform(to_hls.InferVectorVectorActivation()) - model = model.transform(to_hls.InferQuantizedMatrixVectorActivation()) - model = model.transform(to_hls.InferChannelwiseLinearLayer()) - model = model.transform(to_hls.InferLabelSelectLayer()) + model = model.transform(to_hw.InferPool()) + model = model.transform(to_hw.InferConvInpGen()) + model = model.transform(to_hw.InferThresholdingLayer()) + model = model.transform(to_hw.InferVectorVectorActivation()) + model = model.transform(to_hw.InferQuantizedMatrixVectorActivation()) + model = model.transform(to_hw.InferChannelwiseLinearLayer()) + model = model.transform(to_hw.InferLabelSelectLayer()) model = model.transform(InferShapes()) model = model.transform(GiveUniqueNodeNames()) model = model.transform(GiveReadableTensorNames()) diff --git a/build/mobilenet-v1/folding_config/U250_folding_config.json b/build/mobilenet-v1/folding_config/U250_folding_config.json index 52b52f5..a762019 100644 --- a/build/mobilenet-v1/folding_config/U250_folding_config.json +++ b/build/mobilenet-v1/folding_config/U250_folding_config.json @@ -1,403 +1,323 @@ { "Defaults": {}, "StreamingFIFO_rtl_0": { - "ram_style": "ultra", "depth": 512 }, - "ConvolutionInputGenerator_hls_0": { - "SIMD": 3, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_0": { + "SIMD": 3 }, - "MVAU_hls_0": { + "MVAU_rtl_0": { "PE": 32, "SIMD": 3, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_0": { + "FMPadding_rtl_0": { "SIMD": 32 }, "StreamingFIFO_rtl_3": { - "ram_style": "auto", "depth": 256 }, - "ConvolutionInputGenerator_hls_1": { - "SIMD": 32, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_1": { + "SIMD": 32 }, - "VectorVectorActivation_hls_0": { + "VVAU_hls_0": { "PE": 32, "resType": "lut" }, - "MVAU_hls_1": { + "MVAU_rtl_1": { "PE": 16, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_1": { + "FMPadding_rtl_1": { "SIMD": 32 }, "StreamingFIFO_rtl_9": { - "ram_style": "ultra", "depth": 512 }, - "ConvolutionInputGenerator_hls_2": { - "SIMD": 32, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_2": { + "SIMD": 32 }, - "VectorVectorActivation_hls_1": { + "VVAU_hls_1": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_12": { - "ram_style": "auto", "depth": 256 }, - "MVAU_hls_2": { + "MVAU_rtl_2": { "PE": 16, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_2": { + "FMPadding_rtl_2": { "SIMD": 64 }, "StreamingFIFO_rtl_15": { - "ram_style": "auto", "depth": 256 }, - "ConvolutionInputGenerator_hls_3": { - "SIMD": 64, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_3": { + "SIMD": 64 }, - "VectorVectorActivation_hls_2": { + "VVAU_hls_2": { "PE": 64, "resType": "lut" }, "StreamingFIFO_rtl_18": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_3": { + "MVAU_rtl_3": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_20": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_3": { + "FMPadding_rtl_3": { "SIMD": 16 }, "StreamingFIFO_rtl_21": { - "ram_style": "ultra", "depth": 1024 }, - "ConvolutionInputGenerator_hls_4": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_4": { + "SIMD": 16 }, - "VectorVectorActivation_hls_3": { + "VVAU_hls_3": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_23": { - "ram_style": "auto", "depth": 256 }, - "MVAU_hls_4": { + "MVAU_rtl_4": { "PE": 16, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_4": { + "FMPadding_rtl_4": { "SIMD": 32 }, "StreamingFIFO_rtl_26": { - "ram_style": "ultra", "depth": 512 }, - "ConvolutionInputGenerator_hls_5": { - "SIMD": 32, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_5": { + "SIMD": 32 }, - "VectorVectorActivation_hls_4": { + "VVAU_hls_4": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_29": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_5": { + "MVAU_rtl_5": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_31": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_5": { + "FMPadding_rtl_5": { "SIMD": 8 }, "StreamingFIFO_rtl_32": { - "ram_style": "ultra", "depth": 2048 }, - "ConvolutionInputGenerator_hls_6": { - "SIMD": 8, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_6": { + "SIMD": 8 }, - "VectorVectorActivation_hls_5": { + "VVAU_hls_5": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_35": { - "ram_style": "auto", "depth": 256 }, - "MVAU_hls_6": { + "MVAU_rtl_6": { "PE": 16, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_6": { + "FMPadding_rtl_6": { "SIMD": 16 }, "StreamingFIFO_rtl_37": { - "ram_style": "ultra", "depth": 2048 }, - "ConvolutionInputGenerator_hls_7": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_7": { + "SIMD": 16 }, - "VectorVectorActivation_hls_6": { + "VVAU_hls_6": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_39": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_7": { + "MVAU_rtl_7": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_41": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_7": { + "FMPadding_rtl_7": { "SIMD": 16 }, "StreamingFIFO_rtl_42": { - "ram_style": "ultra", "depth": 2048 }, - "ConvolutionInputGenerator_hls_8": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_8": { + "SIMD": 16 }, - "VectorVectorActivation_hls_7": { + "VVAU_hls_7": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_44": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_8": { + "MVAU_rtl_8": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_46": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_8": { + "FMPadding_rtl_8": { "SIMD": 16 }, "StreamingFIFO_rtl_47": { - "ram_style": "ultra", "depth": 2048 }, - "ConvolutionInputGenerator_hls_9": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_9": { + "SIMD": 16 }, - "VectorVectorActivation_hls_8": { + "VVAU_hls_8": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_49": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_9": { + "MVAU_rtl_9": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_51": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_9": { + "FMPadding_rtl_9": { "SIMD": 16 }, "StreamingFIFO_rtl_52": { - "ram_style": "ultra", "depth": 2048 }, - "ConvolutionInputGenerator_hls_10": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_10": { + "SIMD": 16 }, - "VectorVectorActivation_hls_9": { + "VVAU_hls_9": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_54": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_10": { + "MVAU_rtl_10": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_56": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_10": { + "FMPadding_rtl_10": { "SIMD": 16 }, "StreamingFIFO_rtl_57": { - "ram_style": "ultra", "depth": 2048 }, - "ConvolutionInputGenerator_hls_11": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_11": { + "SIMD": 16 }, - "VectorVectorActivation_hls_10": { + "VVAU_hls_10": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_59": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_11": { + "MVAU_rtl_11": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_61": { - "ram_style": "auto", "depth": 128 }, - "FMPadding_hls_11": { + "FMPadding_rtl_11": { "SIMD": 4 }, "StreamingFIFO_rtl_62": { - "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_12": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_12": { + "SIMD": 4 }, - "VectorVectorActivation_hls_11": { + "VVAU_hls_11": { "PE": 4, "resType": "lut" }, "StreamingFIFO_rtl_65": { - "ram_style": "auto", "depth": 256 }, - "MVAU_hls_12": { + "MVAU_rtl_12": { "PE": 16, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "StreamingFIFO_rtl_67": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_12": { + "FMPadding_rtl_12": { "SIMD": 8 }, "StreamingFIFO_rtl_68": { - "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_13": { - "SIMD": 8, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_13": { + "SIMD": 8 }, - "VectorVectorActivation_hls_12": { + "VVAU_hls_12": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_71": { - "ram_style": "ultra", "depth": 1024 }, - "MVAU_hls_13": { + "MVAU_rtl_13": { "PE": 32, "SIMD": 16, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "ConvolutionInputGenerator_hls_14": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_14": { + "SIMD": 4 }, "Pool_hls_0": { "PE": 4 }, - "MVAU_hls_14": { + "MVAU_rtl_14": { "PE": 4, "SIMD": 4, - "ram_style": "block", - "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, "ChannelwiseOp_hls_0": { - "PE": 1, - "ram_style": "distributed" + "PE": 1 }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/mobilenet-v1/folding_config/ZCU102_folding_config.json b/build/mobilenet-v1/folding_config/ZCU102_folding_config.json index b06d849..4fee801 100755 --- a/build/mobilenet-v1/folding_config/ZCU102_folding_config.json +++ b/build/mobilenet-v1/folding_config/ZCU102_folding_config.json @@ -1,608 +1,467 @@ { "Defaults": {}, "StreamingFIFO_rtl_0": { - "ram_style": "block", "depth": 1024 }, - "ConvolutionInputGenerator_hls_0": { - "SIMD": 1, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_0": { + "SIMD": 1 }, - "MVAU_hls_0": { + "MVAU_rtl_0": { "PE": 16, "SIMD": 3, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_3": { - "ram_style": "auto", "depth": 64 }, - "Thresholding_hls_0": { + "Thresholding_rtl_0": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_6": { - "ram_style": "auto", "depth": 256 }, - "FMPadding_hls_0": { + "FMPadding_rtl_0": { "SIMD": 2 }, "StreamingFIFO_rtl_8": { - "ram_style": "block", "depth": 512 }, - "ConvolutionInputGenerator_hls_1": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_1": { + "SIMD": 16 }, - "VectorVectorActivation_hls_0": { + "VVAU_hls_0": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_10": { - "ram_style": "auto", "depth": 256 }, - "Thresholding_hls_1": { + "Thresholding_rtl_1": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "MVAU_hls_1": { + "MVAU_rtl_1": { "PE": 8, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_2": { + "Thresholding_rtl_2": { "PE": 2, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_17": { - "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_1": { + "FMPadding_rtl_1": { "SIMD": 4 }, "StreamingFIFO_rtl_19": { - "ram_style": "block", "depth": 1024 }, - "ConvolutionInputGenerator_hls_2": { - "SIMD": 8, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_2": { + "SIMD": 8 }, - "VectorVectorActivation_hls_1": { + "VVAU_hls_1": { "PE": 8, "resType": "lut" }, - "Thresholding_hls_3": { + "Thresholding_rtl_3": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_24": { - "ram_style": "auto", "depth": 32 }, - "MVAU_hls_2": { + "MVAU_rtl_2": { "PE": 16, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_4": { + "Thresholding_rtl_4": { "PE": 2, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_27": { - "ram_style": "auto", "depth": 128 }, - "FMPadding_hls_2": { + "FMPadding_rtl_2": { "SIMD": 2 }, "StreamingFIFO_rtl_29": { - "ram_style": "block", "depth": 1024 }, - "ConvolutionInputGenerator_hls_3": { - "SIMD": 16, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_3": { + "SIMD": 16 }, - "VectorVectorActivation_hls_2": { + "VVAU_hls_2": { "PE": 16, "resType": "lut" }, - "Thresholding_hls_5": { + "Thresholding_rtl_5": { "PE": 2, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_34": { - "ram_style": "auto", "depth": 32 }, - "MVAU_hls_3": { + "MVAU_rtl_3": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_6": { + "Thresholding_rtl_6": { "PE": 2, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_37": { - "ram_style": "auto", "depth": 128 }, - "FMPadding_hls_3": { + "FMPadding_rtl_3": { "SIMD": 2 }, "StreamingFIFO_rtl_39": { - "ram_style": "block", "depth": 4096 }, - "ConvolutionInputGenerator_hls_4": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_4": { + "SIMD": 4 }, - "VectorVectorActivation_hls_3": { + "VVAU_hls_3": { "PE": 4, "resType": "lut" }, - "Thresholding_hls_7": { + "Thresholding_rtl_7": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_44": { - "ram_style": "auto", "depth": 32 }, - "MVAU_hls_4": { + "MVAU_rtl_4": { "PE": 16, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_8": { + "Thresholding_rtl_8": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_47": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_4": { + "FMPadding_rtl_4": { "SIMD": 1 }, "StreamingFIFO_rtl_49": { - "ram_style": "block", "depth": 1024 }, - "ConvolutionInputGenerator_hls_5": { - "SIMD": 8, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_5": { + "SIMD": 8 }, - "VectorVectorActivation_hls_4": { + "VVAU_hls_4": { "PE": 8, "resType": "lut" }, - "Thresholding_hls_9": { + "Thresholding_rtl_9": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_54": { - "ram_style": "auto", "depth": 32 }, - "MVAU_hls_5": { + "MVAU_rtl_5": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_10": { + "Thresholding_rtl_10": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_57": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_5": { + "FMPadding_rtl_5": { "SIMD": 1 }, "StreamingFIFO_rtl_59": { - "ram_style": "block", "depth": 8192 }, - "ConvolutionInputGenerator_hls_6": { - "SIMD": 2, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_6": { + "SIMD": 2 }, - "VectorVectorActivation_hls_5": { + "VVAU_hls_5": { "PE": 2, "resType": "lut" }, - "Thresholding_hls_11": { + "Thresholding_rtl_11": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_64": { - "ram_style": "auto", "depth": 32 }, - "MVAU_hls_6": { + "MVAU_rtl_6": { "PE": 16, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_12": { + "Thresholding_rtl_12": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_67": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_6": { + "FMPadding_rtl_6": { "SIMD": 1 }, "StreamingFIFO_rtl_69": { - "ram_style": "block", "depth": 4096 }, - "ConvolutionInputGenerator_hls_7": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_7": { + "SIMD": 4 }, - "VectorVectorActivation_hls_6": { + "VVAU_hls_6": { "PE": 4, "resType": "lut" }, - "Thresholding_hls_13": { + "Thresholding_rtl_13": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_74": { - "ram_style": "auto", "depth": 64 }, - "MVAU_hls_7": { + "MVAU_rtl_7": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_14": { + "Thresholding_rtl_14": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_77": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_7": { + "FMPadding_rtl_7": { "SIMD": 1 }, "StreamingFIFO_rtl_79": { - "ram_style": "block", "depth": 4096 }, - "ConvolutionInputGenerator_hls_8": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_8": { + "SIMD": 4 }, - "VectorVectorActivation_hls_7": { + "VVAU_hls_7": { "PE": 4, "resType": "lut" }, - "Thresholding_hls_15": { + "Thresholding_rtl_15": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_84": { - "ram_style": "auto", "depth": 64 }, - "MVAU_hls_8": { + "MVAU_rtl_8": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_16": { + "Thresholding_rtl_16": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_87": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_8": { + "FMPadding_rtl_8": { "SIMD": 1 }, "StreamingFIFO_rtl_89": { - "ram_style": "block", "depth": 4096 }, - "ConvolutionInputGenerator_hls_9": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_9": { + "SIMD": 4 }, - "VectorVectorActivation_hls_8": { + "VVAU_hls_8": { "PE": 4, "resType": "lut" }, - "Thresholding_hls_17": { + "Thresholding_rtl_17": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_94": { - "ram_style": "auto", "depth": 64 }, - "MVAU_hls_9": { + "MVAU_rtl_9": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_18": { + "Thresholding_rtl_18": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_97": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_9": { + "FMPadding_rtl_9": { "SIMD": 1 }, "StreamingFIFO_rtl_99": { - "ram_style": "block", "depth": 4096 }, - "ConvolutionInputGenerator_hls_10": { - "SIMD": 4, - "ram_style": "distributed" + "ConvolutionInputGenerator_rtl_10": { + "SIMD": 4 }, - "VectorVectorActivation_hls_9": { + "VVAU_hls_9": { "PE": 4, "resType": "lut" }, - "Thresholding_hls_19": { + "Thresholding_rtl_19": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_104": { - "ram_style": "auto", "depth": 64 }, - "MVAU_hls_10": { + "MVAU_rtl_10": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_20": { + "Thresholding_rtl_20": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_107": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_10": { + "FMPadding_rtl_10": { "SIMD": 1 }, "StreamingFIFO_rtl_109": { - "ram_style": "block", "depth": 4096 }, - "ConvolutionInputGenerator_hls_11": { - "SIMD": 4, - "ram_style": "block" + "ConvolutionInputGenerator_rtl_11": { + "SIMD": 4 }, - "VectorVectorActivation_hls_10": { + "VVAU_hls_10": { "PE": 4, "resType": "lut" }, - "Thresholding_hls_21": { + "Thresholding_rtl_21": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_114": { - "ram_style": "auto", "depth": 64 }, - "MVAU_hls_11": { + "MVAU_rtl_11": { "PE": 32, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_22": { + "Thresholding_rtl_22": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_117": { - "ram_style": "block", "depth": 512 }, - "FMPadding_hls_11": { + "FMPadding_rtl_11": { "SIMD": 1 }, "StreamingFIFO_rtl_118": { - "ram_style": "block", "depth": 16384 }, - "ConvolutionInputGenerator_hls_12": { - "SIMD": 1, - "ram_style": "block" + "ConvolutionInputGenerator_rtl_12": { + "SIMD": 1 }, - "VectorVectorActivation_hls_11": { + "VVAU_hls_11": { "PE": 1, "resType": "lut" }, - "Thresholding_hls_23": { + "Thresholding_rtl_23": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_122": { - "ram_style": "auto", "depth": 64 }, - "MVAU_hls_12": { + "MVAU_rtl_12": { "PE": 16, "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_24": { + "Thresholding_rtl_24": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_125": { - "ram_style": "block", "depth": 1024 }, - "FMPadding_hls_12": { + "FMPadding_rtl_12": { "SIMD": 1 }, "StreamingFIFO_rtl_127": { - "ram_style": "block", "depth": 16384 }, - "ConvolutionInputGenerator_hls_13": { - "SIMD": 2, - "ram_style": "block" + "ConvolutionInputGenerator_rtl_13": { + "SIMD": 2 }, - "VectorVectorActivation_hls_12": { + "VVAU_hls_12": { "PE": 2, "resType": "lut" }, - "Thresholding_hls_25": { + "Thresholding_rtl_25": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_132": { - "ram_style": "auto", "depth": 128 }, - "MVAU_hls_13": { + "MVAU_rtl_13": { "PE": 32, "SIMD": 8, - "ram_style": "block", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, - "Thresholding_hls_26": { + "Thresholding_rtl_26": { "PE": 1, - "ram_style": "distributed", - "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "ConvolutionInputGenerator_hls_14": { - "SIMD": 1, - "ram_style": "block" + "ConvolutionInputGenerator_rtl_14": { + "SIMD": 1 }, "Pool_hls_0": { "PE": 1 }, - "MVAU_hls_14": { + "MVAU_rtl_14": { "PE": 1, "SIMD": 16, - "ram_style": "block", - "resType": "lut", - "mem_mode": "internal_decoupled", + "resType": "dsp", "runtime_writeable_weights": 0 }, "ChannelwiseOp_hls_0": { - "PE": 1, - "ram_style": "distributed" + "PE": 1 }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/mobilenet-v1/specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config.json index 8a8ac14..4993c05 100644 --- a/build/mobilenet-v1/specialize_layers_config.json +++ b/build/mobilenet-v1/specialize_layers_config.json @@ -1,256 +1,256 @@ { "Defaults": {}, "ConvolutionInputGenerator_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_0": { - "preferred_impl_style": "hls" + "VVAU_0": { + "preferred_impl_style": "rtl" }, "Thresholding_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_1": { - "preferred_impl_style": "hls" + "VVAU_1": { + "preferred_impl_style": "rtl" }, "Thresholding_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_2": { - "preferred_impl_style": "hls" + "VVAU_2": { + "preferred_impl_style": "rtl" }, "Thresholding_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_3": { - "preferred_impl_style": "hls" + "VVAU_3": { + "preferred_impl_style": "rtl" }, "Thresholding_7": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_8": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_4": { - "preferred_impl_style": "hls" + "VVAU_4": { + "preferred_impl_style": "rtl" }, "Thresholding_9": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_10": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_5": { - "preferred_impl_style": "hls" + "VVAU_5": { + "preferred_impl_style": "rtl" }, "Thresholding_11": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_12": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_7": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_6": { - "preferred_impl_style": "hls" + "VVAU_6": { + "preferred_impl_style": "rtl" }, "Thresholding_13": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_7": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_14": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_7": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_8": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_7": { - "preferred_impl_style": "hls" + "VVAU_7": { + "preferred_impl_style": "rtl" }, "Thresholding_15": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_8": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_16": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_8": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_9": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_8": { - "preferred_impl_style": "hls" + "VVAU_8": { + "preferred_impl_style": "rtl" }, "Thresholding_17": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_9": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_18": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_9": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_10": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_9": { - "preferred_impl_style": "hls" + "VVAU_9": { + "preferred_impl_style": "rtl" }, "Thresholding_19": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_10": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_20": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_10": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_11": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_10": { - "preferred_impl_style": "hls" + "VVAU_10": { + "preferred_impl_style": "rtl" }, "Thresholding_21": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_11": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_22": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_11": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_12": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_11": { - "preferred_impl_style": "hls" + "VVAU_11": { + "preferred_impl_style": "rtl" }, "Thresholding_23": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_12": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_24": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "FMPadding_12": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_13": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, - "VectorVectorActivation_12": { - "preferred_impl_style": "hls" + "VVAU_12": { + "preferred_impl_style": "rtl" }, "Thresholding_25": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_13": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Thresholding_26": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_14": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "Pool_0": { "preferred_impl_style": "hls" }, "MVAU_14": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ChannelwiseOp_0": { "preferred_impl_style": "hls" From 323969e1f4cd2be43c14e0a327f728bca43725ec Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Wed, 17 Apr 2024 12:15:12 +0100 Subject: [PATCH 18/53] update FINN commit hash --- build/get-finn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/get-finn.sh b/build/get-finn.sh index d93982e..7feef2c 100755 --- a/build/get-finn.sh +++ b/build/get-finn.sh @@ -31,7 +31,7 @@ # URL for git repo to be cloned REPO_URL=https://github.com/Xilinx/finn # commit hash for repo -REPO_COMMIT=a395fc7d35e7410693edfb5253c91b83dfe054fb +REPO_COMMIT=e3087ad9fbabcc35f21164d415ababec4f462e9f # directory (under the same folder as this script) to clone to REPO_DIR=finn From 6acd29d27979c9fb75412094b9639ab5e6b41ce6 Mon Sep 17 00:00:00 2001 From: auphelia Date: Thu, 18 Apr 2024 09:08:03 +0100 Subject: [PATCH 19/53] [MNV1] Update flows for ZCU boards --- build/mobilenet-v1/build.py | 9 +- .../folding_config/ZCU102_folding_config.json | 323 ++++++++++++------ .../folding_config/ZCU104_folding_config.json | 142 ++++---- .../ZCU102_specialize_layers_config.json} | 28 +- .../ZCU104_specialize_layers_config.json | 261 ++++++++++++++ 5 files changed, 562 insertions(+), 201 deletions(-) rename build/mobilenet-v1/{specialize_layers_config.json => specialize_layers_config/ZCU102_specialize_layers_config.json} (91%) create mode 100644 build/mobilenet-v1/specialize_layers_config/ZCU104_specialize_layers_config.json diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index b3d2098..12adc18 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -44,10 +44,8 @@ model_name = "mobilenetv1-w4a4" # which platforms to build the networks for -# zynq_platforms = ["ZCU102", "ZCU104"] -zynq_platforms = ["ZCU102"] -# alveo_platforms = ["U50", "U200", "U250", "U280"] -alveo_platforms = ["U250"] +zynq_platforms = ["ZCU102", "ZCU104"] +alveo_platforms = [] # "U50", "U200", "U250", "U280"] platforms_to_build = zynq_platforms + alveo_platforms @@ -132,7 +130,8 @@ def select_build_steps(platform): steps=select_build_steps(platform_name), output_dir="output_%s_%s" % (model_name, release_platform_name), folding_config_file="folding_config/%s_folding_config.json" % platform_name, - specialize_layers_config_file="specialize_layers_config.json", + specialize_layers_config_file="specialize_layers_config/%s_specialize_layers_config.json" + % platform_name, synth_clk_period_ns=select_clk_period(platform_name), board=platform_name, shell_flow_type=shell_flow_type, diff --git a/build/mobilenet-v1/folding_config/ZCU102_folding_config.json b/build/mobilenet-v1/folding_config/ZCU102_folding_config.json index 4fee801..bbeea73 100755 --- a/build/mobilenet-v1/folding_config/ZCU102_folding_config.json +++ b/build/mobilenet-v1/folding_config/ZCU102_folding_config.json @@ -1,455 +1,553 @@ { "Defaults": {}, "StreamingFIFO_rtl_0": { - "depth": 1024 + "ram_style": "block", + "depth": 1024, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_0": { - "SIMD": 1 + "SIMD": 1, + "ram_style": "distributed" }, "MVAU_rtl_0": { "PE": 16, "SIMD": 3, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_3": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "Thresholding_rtl_0": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_6": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, "FMPadding_rtl_0": { "SIMD": 2 }, "StreamingFIFO_rtl_8": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_1": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_0": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_10": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, "Thresholding_rtl_1": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "MVAU_rtl_1": { "PE": 8, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_2": { - "PE": 2, - "runtime_writeable_weights": 0 + "PE": 2 }, "StreamingFIFO_rtl_17": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_1": { "SIMD": 4 }, "StreamingFIFO_rtl_19": { - "depth": 1024 + "ram_style": "block", + "depth": 1024, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_2": { - "SIMD": 8 + "SIMD": 8, + "ram_style": "distributed" }, "VVAU_hls_1": { "PE": 8, "resType": "lut" }, "Thresholding_rtl_3": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_24": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "MVAU_rtl_2": { "PE": 16, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_4": { - "PE": 2, - "runtime_writeable_weights": 0 + "PE": 2 }, "StreamingFIFO_rtl_27": { - "depth": 128 + "ram_style": "auto", + "depth": 128, + "impl_style": "rtl" }, "FMPadding_rtl_2": { "SIMD": 2 }, "StreamingFIFO_rtl_29": { - "depth": 1024 + "ram_style": "block", + "depth": 1024, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_3": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_2": { "PE": 16, "resType": "lut" }, "Thresholding_rtl_5": { - "PE": 2, - "runtime_writeable_weights": 0 + "PE": 2 }, "StreamingFIFO_rtl_34": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "MVAU_rtl_3": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_6": { - "PE": 2, - "runtime_writeable_weights": 0 + "PE": 2 }, "StreamingFIFO_rtl_37": { - "depth": 128 + "ram_style": "auto", + "depth": 128, + "impl_style": "rtl" }, "FMPadding_rtl_3": { "SIMD": 2 }, "StreamingFIFO_rtl_39": { - "depth": 4096 + "ram_style": "block", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_4": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "VVAU_hls_3": { "PE": 4, "resType": "lut" }, "Thresholding_rtl_7": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_44": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "MVAU_rtl_4": { "PE": 16, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_8": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_47": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_4": { "SIMD": 1 }, "StreamingFIFO_rtl_49": { - "depth": 1024 + "ram_style": "block", + "depth": 1024, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_5": { - "SIMD": 8 + "SIMD": 8, + "ram_style": "distributed" }, "VVAU_hls_4": { "PE": 8, "resType": "lut" }, "Thresholding_rtl_9": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_54": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "MVAU_rtl_5": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_10": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_57": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_5": { "SIMD": 1 }, "StreamingFIFO_rtl_59": { - "depth": 8192 + "ram_style": "block", + "depth": 8192, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_6": { - "SIMD": 2 + "SIMD": 2, + "ram_style": "distributed" }, "VVAU_hls_5": { "PE": 2, "resType": "lut" }, "Thresholding_rtl_11": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_64": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "MVAU_rtl_6": { "PE": 16, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_12": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_67": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_6": { "SIMD": 1 }, "StreamingFIFO_rtl_69": { - "depth": 4096 + "ram_style": "block", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_7": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "VVAU_hls_6": { "PE": 4, "resType": "lut" }, "Thresholding_rtl_13": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_74": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "MVAU_rtl_7": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_14": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_77": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_7": { "SIMD": 1 }, "StreamingFIFO_rtl_79": { - "depth": 4096 + "ram_style": "block", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_8": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "VVAU_hls_7": { "PE": 4, "resType": "lut" }, "Thresholding_rtl_15": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_84": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "MVAU_rtl_8": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_16": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_87": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_8": { "SIMD": 1 }, "StreamingFIFO_rtl_89": { - "depth": 4096 + "ram_style": "block", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_9": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "VVAU_hls_8": { "PE": 4, "resType": "lut" }, "Thresholding_rtl_17": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_94": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "MVAU_rtl_9": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_18": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_97": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_9": { "SIMD": 1 }, "StreamingFIFO_rtl_99": { - "depth": 4096 + "ram_style": "block", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_10": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "VVAU_hls_9": { "PE": 4, "resType": "lut" }, "Thresholding_rtl_19": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_104": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "MVAU_rtl_10": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_20": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_107": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_10": { "SIMD": 1 }, "StreamingFIFO_rtl_109": { - "depth": 4096 + "ram_style": "block", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_11": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "block" }, "VVAU_hls_10": { "PE": 4, "resType": "lut" }, "Thresholding_rtl_21": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_114": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "MVAU_rtl_11": { "PE": 32, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_22": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_117": { - "depth": 512 + "ram_style": "block", + "depth": 512, + "impl_style": "vivado" }, "FMPadding_rtl_11": { "SIMD": 1 }, "StreamingFIFO_rtl_118": { - "depth": 16384 + "ram_style": "block", + "depth": 16384, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_12": { - "SIMD": 1 + "SIMD": 1, + "ram_style": "block" }, "VVAU_hls_11": { "PE": 1, "resType": "lut" }, "Thresholding_rtl_23": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_122": { - "depth": 64 + "ram_style": "auto", + "depth": 64, + "impl_style": "rtl" }, "MVAU_rtl_12": { "PE": 16, "SIMD": 8, + "ram_style": "auto", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_24": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_125": { - "depth": 1024 + "ram_style": "block", + "depth": 1024, + "impl_style": "vivado" }, "FMPadding_rtl_12": { "SIMD": 1 }, "StreamingFIFO_rtl_127": { - "depth": 16384 + "ram_style": "block", + "depth": 16384, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_13": { - "SIMD": 2 + "SIMD": 2, + "ram_style": "block" }, "VVAU_hls_12": { "PE": 2, "resType": "lut" }, "Thresholding_rtl_25": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "StreamingFIFO_rtl_132": { - "depth": 128 + "ram_style": "auto", + "depth": 128, + "impl_style": "rtl" }, "MVAU_rtl_13": { "PE": 32, "SIMD": 8, + "ram_style": "block", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "Thresholding_rtl_26": { - "PE": 1, - "runtime_writeable_weights": 0 + "PE": 1 }, "ConvolutionInputGenerator_rtl_14": { - "SIMD": 1 + "SIMD": 1, + "ram_style": "block" }, "Pool_hls_0": { "PE": 1 @@ -457,11 +555,14 @@ "MVAU_rtl_14": { "PE": 1, "SIMD": 16, + "ram_style": "block", "resType": "dsp", + "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, "ChannelwiseOp_hls_0": { - "PE": 1 + "PE": 1, + "ram_style": "distributed" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/mobilenet-v1/folding_config/ZCU104_folding_config.json b/build/mobilenet-v1/folding_config/ZCU104_folding_config.json index fc99a45..e300886 100755 --- a/build/mobilenet-v1/folding_config/ZCU104_folding_config.json +++ b/build/mobilenet-v1/folding_config/ZCU104_folding_config.json @@ -4,15 +4,15 @@ "ram_style": "ultra", "depth": 1024 }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 1, "ram_style": "distributed" }, - "MVAU_hls_0": { + "MVAU_rtl_0": { "PE": 16, "SIMD": 3, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -30,18 +30,18 @@ "ram_style": "auto", "depth": 256 }, - "FMPadding_hls_0": { + "FMPadding_rtl_0": { "SIMD": 2 }, "StreamingFIFO_rtl_8": { "ram_style": "ultra", "depth": 512 }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_0": { + "VVAU_hls_0": { "PE": 16, "resType": "lut" }, @@ -55,11 +55,11 @@ "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "MVAU_hls_1": { + "MVAU_rtl_1": { "PE": 8, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -73,18 +73,18 @@ "ram_style": "auto", "depth": 32 }, - "FMPadding_hls_1": { + "FMPadding_rtl_1": { "SIMD": 4 }, "StreamingFIFO_rtl_19": { "ram_style": "ultra", "depth": 1024 }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_1": { + "VVAU_hls_1": { "PE": 8, "resType": "lut" }, @@ -98,11 +98,11 @@ "ram_style": "auto", "depth": 32 }, - "MVAU_hls_2": { + "MVAU_rtl_2": { "PE": 16, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -116,18 +116,18 @@ "ram_style": "auto", "depth": 128 }, - "FMPadding_hls_2": { + "FMPadding_rtl_2": { "SIMD": 2 }, "StreamingFIFO_rtl_29": { "ram_style": "ultra", "depth": 1024 }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 16, "ram_style": "block" }, - "VectorVectorActivation_hls_2": { + "VVAU_hls_2": { "PE": 16, "resType": "lut" }, @@ -141,11 +141,11 @@ "ram_style": "auto", "depth": 32 }, - "MVAU_hls_3": { + "MVAU_rtl_3": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -159,18 +159,18 @@ "ram_style": "auto", "depth": 128 }, - "FMPadding_hls_3": { + "FMPadding_rtl_3": { "SIMD": 2 }, "StreamingFIFO_rtl_39": { "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_hls_3": { + "VVAU_hls_3": { "PE": 4, "resType": "lut" }, @@ -184,11 +184,11 @@ "ram_style": "auto", "depth": 32 }, - "MVAU_hls_4": { + "MVAU_rtl_4": { "PE": 16, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -202,18 +202,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_4": { + "FMPadding_rtl_4": { "SIMD": 1 }, "StreamingFIFO_rtl_49": { "ram_style": "ultra", "depth": 1024 }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 8, "ram_style": "block" }, - "VectorVectorActivation_hls_4": { + "VVAU_hls_4": { "PE": 8, "resType": "lut" }, @@ -227,11 +227,11 @@ "ram_style": "auto", "depth": 32 }, - "MVAU_hls_5": { + "MVAU_rtl_5": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -245,18 +245,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_5": { + "FMPadding_rtl_5": { "SIMD": 1 }, "StreamingFIFO_rtl_59": { "ram_style": "ultra", "depth": 8192 }, - "ConvolutionInputGenerator_hls_6": { + "ConvolutionInputGenerator_rtl_6": { "SIMD": 2, "ram_style": "block" }, - "VectorVectorActivation_hls_5": { + "VVAU_hls_5": { "PE": 2, "resType": "lut" }, @@ -270,11 +270,11 @@ "ram_style": "auto", "depth": 32 }, - "MVAU_hls_6": { + "MVAU_rtl_6": { "PE": 16, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -288,18 +288,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_6": { + "FMPadding_rtl_6": { "SIMD": 1 }, "StreamingFIFO_rtl_69": { "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_7": { + "ConvolutionInputGenerator_rtl_7": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_hls_6": { + "VVAU_hls_6": { "PE": 4, "resType": "lut" }, @@ -313,11 +313,11 @@ "ram_style": "auto", "depth": 64 }, - "MVAU_hls_7": { + "MVAU_rtl_7": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -331,18 +331,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_7": { + "FMPadding_rtl_7": { "SIMD": 1 }, "StreamingFIFO_rtl_79": { "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_8": { + "ConvolutionInputGenerator_rtl_8": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_hls_7": { + "VVAU_hls_7": { "PE": 4, "resType": "lut" }, @@ -356,11 +356,11 @@ "ram_style": "auto", "depth": 64 }, - "MVAU_hls_8": { + "MVAU_rtl_8": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -374,18 +374,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_8": { + "FMPadding_rtl_8": { "SIMD": 1 }, "StreamingFIFO_rtl_89": { "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_9": { + "ConvolutionInputGenerator_rtl_9": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_hls_8": { + "VVAU_hls_8": { "PE": 4, "resType": "lut" }, @@ -399,11 +399,11 @@ "ram_style": "auto", "depth": 64 }, - "MVAU_hls_9": { + "MVAU_rtl_9": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -417,18 +417,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_9": { + "FMPadding_rtl_9": { "SIMD": 1 }, "StreamingFIFO_rtl_99": { "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_10": { + "ConvolutionInputGenerator_rtl_10": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_hls_9": { + "VVAU_hls_9": { "PE": 4, "resType": "lut" }, @@ -442,11 +442,11 @@ "ram_style": "auto", "depth": 64 }, - "MVAU_hls_10": { + "MVAU_rtl_10": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -460,18 +460,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_10": { + "FMPadding_rtl_10": { "SIMD": 1 }, "StreamingFIFO_rtl_109": { "ram_style": "ultra", "depth": 4096 }, - "ConvolutionInputGenerator_hls_11": { + "ConvolutionInputGenerator_rtl_11": { "SIMD": 4, "ram_style": "block" }, - "VectorVectorActivation_hls_10": { + "VVAU_hls_10": { "PE": 4, "resType": "lut" }, @@ -485,11 +485,11 @@ "ram_style": "auto", "depth": 64 }, - "MVAU_hls_11": { + "MVAU_rtl_11": { "PE": 32, "SIMD": 8, "ram_style": "auto", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, @@ -503,18 +503,18 @@ "ram_style": "ultra", "depth": 512 }, - "FMPadding_hls_11": { + "FMPadding_rtl_11": { "SIMD": 1 }, "StreamingFIFO_rtl_118": { "ram_style": "ultra", "depth": 16384 }, - "ConvolutionInputGenerator_hls_12": { + "ConvolutionInputGenerator_rtl_12": { "SIMD": 1, "ram_style": "block" }, - "VectorVectorActivation_hls_11": { + "VVAU_hls_11": { "PE": 1, "resType": "lut" }, @@ -528,11 +528,11 @@ "ram_style": "auto", "depth": 64 }, - "MVAU_hls_12": { + "MVAU_rtl_12": { "PE": 16, "SIMD": 8, "ram_style": "ultra", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 1 }, @@ -546,18 +546,18 @@ "ram_style": "ultra", "depth": 1024 }, - "FMPadding_hls_12": { + "FMPadding_rtl_12": { "SIMD": 1 }, "StreamingFIFO_rtl_127": { "ram_style": "ultra", "depth": 16384 }, - "ConvolutionInputGenerator_hls_13": { + "ConvolutionInputGenerator_rtl_13": { "SIMD": 2, "ram_style": "block" }, - "VectorVectorActivation_hls_12": { + "VVAU_hls_12": { "PE": 2, "resType": "lut" }, @@ -571,11 +571,11 @@ "ram_style": "auto", "depth": 128 }, - "MVAU_hls_13": { + "MVAU_rtl_13": { "PE": 32, "SIMD": 8, "ram_style": "ultra", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 1 }, @@ -585,18 +585,18 @@ "mem_mode": "internal_embedded", "runtime_writeable_weights": 0 }, - "ConvolutionInputGenerator_hls_14": { + "ConvolutionInputGenerator_rtl_14": { "SIMD": 1, "ram_style": "block" }, "Pool_hls_0": { "PE": 1 }, - "MVAU_hls_14": { + "MVAU_rtl_14": { "PE": 1, "SIMD": 16, "ram_style": "ultra", - "resType": "lut", + "resType": "dsp", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 1 }, diff --git a/build/mobilenet-v1/specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json similarity index 91% rename from build/mobilenet-v1/specialize_layers_config.json rename to build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json index 4993c05..640b16a 100644 --- a/build/mobilenet-v1/specialize_layers_config.json +++ b/build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json @@ -16,7 +16,7 @@ "preferred_impl_style": "rtl" }, "VVAU_0": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_1": { "preferred_impl_style": "rtl" @@ -34,7 +34,7 @@ "preferred_impl_style": "rtl" }, "VVAU_1": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_3": { "preferred_impl_style": "rtl" @@ -52,7 +52,7 @@ "preferred_impl_style": "rtl" }, "VVAU_2": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_5": { "preferred_impl_style": "rtl" @@ -70,7 +70,7 @@ "preferred_impl_style": "rtl" }, "VVAU_3": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_7": { "preferred_impl_style": "rtl" @@ -88,7 +88,7 @@ "preferred_impl_style": "rtl" }, "VVAU_4": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_9": { "preferred_impl_style": "rtl" @@ -106,7 +106,7 @@ "preferred_impl_style": "rtl" }, "VVAU_5": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_11": { "preferred_impl_style": "rtl" @@ -124,7 +124,7 @@ "preferred_impl_style": "rtl" }, "VVAU_6": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_13": { "preferred_impl_style": "rtl" @@ -142,7 +142,7 @@ "preferred_impl_style": "rtl" }, "VVAU_7": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_15": { "preferred_impl_style": "rtl" @@ -160,7 +160,7 @@ "preferred_impl_style": "rtl" }, "VVAU_8": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_17": { "preferred_impl_style": "rtl" @@ -178,7 +178,7 @@ "preferred_impl_style": "rtl" }, "VVAU_9": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_19": { "preferred_impl_style": "rtl" @@ -196,7 +196,7 @@ "preferred_impl_style": "rtl" }, "VVAU_10": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_21": { "preferred_impl_style": "rtl" @@ -214,7 +214,7 @@ "preferred_impl_style": "rtl" }, "VVAU_11": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_23": { "preferred_impl_style": "rtl" @@ -232,7 +232,7 @@ "preferred_impl_style": "rtl" }, "VVAU_12": { - "preferred_impl_style": "rtl" + "preferred_impl_style": "hls" }, "Thresholding_25": { "preferred_impl_style": "rtl" @@ -258,4 +258,4 @@ "LabelSelect_0": { "preferred_impl_style": "hls" } - } \ No newline at end of file + } diff --git a/build/mobilenet-v1/specialize_layers_config/ZCU104_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/ZCU104_specialize_layers_config.json new file mode 100644 index 0000000..f766d4a --- /dev/null +++ b/build/mobilenet-v1/specialize_layers_config/ZCU104_specialize_layers_config.json @@ -0,0 +1,261 @@ +{ + "Defaults": {}, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "rtl" + }, + "MVAU_0": { + "preferred_impl_style": "rtl" + }, + "Thresholding_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_0": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "rtl" + }, + "VVAU_0": { + "preferred_impl_style": "hls" + }, + "Thresholding_1": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "rtl" + }, + "Thresholding_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "rtl" + }, + "VVAU_1": { + "preferred_impl_style": "hls" + }, + "Thresholding_3": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "rtl" + }, + "Thresholding_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "rtl" + }, + "VVAU_2": { + "preferred_impl_style": "hls" + }, + "Thresholding_5": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "rtl" + }, + "Thresholding_6": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "rtl" + }, + "VVAU_3": { + "preferred_impl_style": "hls" + }, + "Thresholding_7": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "rtl" + }, + "Thresholding_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "rtl" + }, + "VVAU_4": { + "preferred_impl_style": "hls" + }, + "Thresholding_9": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "rtl" + }, + "Thresholding_10": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "rtl" + }, + "VVAU_5": { + "preferred_impl_style": "hls" + }, + "Thresholding_11": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "rtl" + }, + "Thresholding_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "rtl" + }, + "VVAU_6": { + "preferred_impl_style": "hls" + }, + "Thresholding_13": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "rtl" + }, + "Thresholding_14": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "rtl" + }, + "VVAU_7": { + "preferred_impl_style": "hls" + }, + "Thresholding_15": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "rtl" + }, + "Thresholding_16": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "rtl" + }, + "VVAU_8": { + "preferred_impl_style": "hls" + }, + "Thresholding_17": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "rtl" + }, + "Thresholding_18": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "rtl" + }, + "VVAU_9": { + "preferred_impl_style": "hls" + }, + "Thresholding_19": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "rtl" + }, + "Thresholding_20": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "rtl" + }, + "VVAU_10": { + "preferred_impl_style": "hls" + }, + "Thresholding_21": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "rtl" + }, + "Thresholding_22": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "rtl" + }, + "VVAU_11": { + "preferred_impl_style": "hls" + }, + "Thresholding_23": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "rtl" + }, + "Thresholding_24": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "rtl" + }, + "VVAU_12": { + "preferred_impl_style": "hls" + }, + "Thresholding_25": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "rtl" + }, + "Thresholding_26": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "rtl" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "rtl" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } + } From e19703631fb0eabe6134e78adbf458cbe798b3f3 Mon Sep 17 00:00:00 2001 From: auphelia Date: Thu, 18 Apr 2024 11:10:52 +0100 Subject: [PATCH 20/53] [MNV1] Update Alveo builds to be compatible with FINN v0.10 --- build/mobilenet-v1/build.py | 5 +- build/mobilenet-v1/custom_steps.py | 2 +- .../folding_config/U200_folding_config.json | 189 +++++++----- .../folding_config/U250_folding_config.json | 272 +++++++++++++----- .../folding_config/U280_folding_config.json | 186 +++++++----- .../folding_config/U50_folding_config.json | 186 +++++++----- .../U200_specialize_layers_config.json | 180 ++++++++++++ .../U250_specialize_layers_config.json | 180 ++++++++++++ .../U280_specialize_layers_config.json | 180 ++++++++++++ .../U50_specialize_layers_config.json | 180 ++++++++++++ 10 files changed, 1250 insertions(+), 310 deletions(-) create mode 100644 build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json create mode 100644 build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json create mode 100644 build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json create mode 100644 build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index 12adc18..35ddef5 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -1,4 +1,5 @@ -# Copyright (c) 2020, Xilinx +# Copyright (C) 2020-2022, Xilinx, Inc. +# Copyright (C) 2024, Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -45,7 +46,7 @@ # which platforms to build the networks for zynq_platforms = ["ZCU102", "ZCU104"] -alveo_platforms = [] # "U50", "U200", "U250", "U280"] +alveo_platforms = ["U50", "U200", "U250", "U280"] platforms_to_build = zynq_platforms + alveo_platforms diff --git a/build/mobilenet-v1/custom_steps.py b/build/mobilenet-v1/custom_steps.py index 41d8bca..6cd54af 100644 --- a/build/mobilenet-v1/custom_steps.py +++ b/build/mobilenet-v1/custom_steps.py @@ -103,7 +103,7 @@ def step_mobilenet_convert_to_hw_layers(model: ModelWrapper, cfg: DataflowBuildC def step_mobilenet_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): if cfg.shell_flow_type == ShellFlowType.VITIS_ALVEO: try: - from finn.analysis.partitioning import partition + from finnexperimental.analysis.partitioning import partition # apply partitioning of the model, restricting the first and last layers # to SLR0 diff --git a/build/mobilenet-v1/folding_config/U200_folding_config.json b/build/mobilenet-v1/folding_config/U200_folding_config.json index b0183e2..fe3c3d2 100644 --- a/build/mobilenet-v1/folding_config/U200_folding_config.json +++ b/build/mobilenet-v1/folding_config/U200_folding_config.json @@ -2,9 +2,10 @@ "Defaults": {}, "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, @@ -13,20 +14,21 @@ "SIMD": 3, "ram_style": "block", "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_0": { + "FMPadding_rtl_0": { "SIMD": 32 }, "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_0": { + "VVAU_hls_0": { "PE": 32, "resType": "lut" }, @@ -37,47 +39,54 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_1": { + "FMPadding_rtl_1": { "SIMD": 32 }, "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_1": { + "VVAU_hls_1": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_2": { "PE": 16, + "SIMD": 16, + "ram_style": "block", + "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_2": { + "FMPadding_rtl_2": { "SIMD": 64 }, "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_hls_2": { + "VVAU_hls_2": { "PE": 64, "resType": "lut" }, "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_3": { "PE": 32, @@ -88,26 +97,29 @@ }, "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_3": { + "FMPadding_rtl_3": { "SIMD": 16 }, "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_3": { + "VVAU_hls_3": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_4": { "PE": 16, @@ -116,24 +128,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_4": { + "FMPadding_rtl_4": { "SIMD": 32 }, "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_4": { + "VVAU_hls_4": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_5": { "PE": 32, @@ -144,26 +158,29 @@ }, "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_5": { + "FMPadding_rtl_5": { "SIMD": 8 }, "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_6": { + "ConvolutionInputGenerator_rtl_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_5": { + "VVAU_hls_5": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_6": { "PE": 16, @@ -172,24 +189,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_6": { + "FMPadding_rtl_6": { "SIMD": 16 }, "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_7": { + "ConvolutionInputGenerator_rtl_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_6": { + "VVAU_hls_6": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_7": { "PE": 32, @@ -200,26 +219,29 @@ }, "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_7": { + "FMPadding_rtl_7": { "SIMD": 16 }, "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_8": { + "ConvolutionInputGenerator_rtl_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_7": { + "VVAU_hls_7": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_8": { "PE": 32, @@ -230,26 +252,29 @@ }, "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_8": { + "FMPadding_rtl_8": { "SIMD": 16 }, "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_9": { + "ConvolutionInputGenerator_rtl_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_8": { + "VVAU_hls_8": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_9": { "PE": 32, @@ -260,26 +285,29 @@ }, "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_9": { + "FMPadding_rtl_9": { "SIMD": 16 }, "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_10": { + "ConvolutionInputGenerator_rtl_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_9": { + "VVAU_hls_9": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_10": { "PE": 32, @@ -290,26 +318,29 @@ }, "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_10": { + "FMPadding_rtl_10": { "SIMD": 16 }, "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_11": { + "ConvolutionInputGenerator_rtl_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_10": { + "VVAU_hls_10": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_11": { "PE": 32, @@ -320,26 +351,29 @@ }, "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128 + "depth": 128, + "impl_style": "rtl" }, - "FMPadding_hls_11": { + "FMPadding_rtl_11": { "SIMD": 4 }, "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096 + "depth": 4096, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_12": { + "ConvolutionInputGenerator_rtl_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_hls_11": { + "VVAU_hls_11": { "PE": 4, "resType": "lut" }, "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_12": { "PE": 16, @@ -350,26 +384,29 @@ }, "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_12": { + "FMPadding_rtl_12": { "SIMD": 8 }, "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096 + "depth": 4096, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_13": { + "ConvolutionInputGenerator_rtl_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_12": { + "VVAU_hls_12": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_13": { "PE": 32, @@ -378,7 +415,7 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "ConvolutionInputGenerator_hls_14": { + "ConvolutionInputGenerator_rtl_14": { "SIMD": 4, "ram_style": "distributed" }, diff --git a/build/mobilenet-v1/folding_config/U250_folding_config.json b/build/mobilenet-v1/folding_config/U250_folding_config.json index a762019..fe3c3d2 100644 --- a/build/mobilenet-v1/folding_config/U250_folding_config.json +++ b/build/mobilenet-v1/folding_config/U250_folding_config.json @@ -1,323 +1,437 @@ { "Defaults": {}, "StreamingFIFO_rtl_0": { - "depth": 512 + "ram_style": "ultra", + "depth": 512, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_0": { - "SIMD": 3 + "SIMD": 3, + "ram_style": "distributed" }, - "MVAU_rtl_0": { + "MVAU_hls_0": { "PE": 32, "SIMD": 3, + "ram_style": "block", + "mem_mode": "internal_decoupled", "resType": "dsp" }, "FMPadding_rtl_0": { "SIMD": 32 }, "StreamingFIFO_rtl_3": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_1": { - "SIMD": 32 + "SIMD": 32, + "ram_style": "distributed" }, "VVAU_hls_0": { "PE": 32, "resType": "lut" }, - "MVAU_rtl_1": { + "MVAU_hls_1": { "PE": 16, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "FMPadding_rtl_1": { "SIMD": 32 }, "StreamingFIFO_rtl_9": { - "depth": 512 + "ram_style": "ultra", + "depth": 512, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_2": { - "SIMD": 32 + "SIMD": 32, + "ram_style": "distributed" }, "VVAU_hls_1": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_12": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, - "MVAU_rtl_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "FMPadding_rtl_2": { "SIMD": 64 }, "StreamingFIFO_rtl_15": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_3": { - "SIMD": 64 + "SIMD": 64, + "ram_style": "distributed" }, "VVAU_hls_2": { "PE": 64, "resType": "lut" }, "StreamingFIFO_rtl_18": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_3": { + "MVAU_hls_3": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_20": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_3": { "SIMD": 16 }, "StreamingFIFO_rtl_21": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_4": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_3": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_23": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, - "MVAU_rtl_4": { + "MVAU_hls_4": { "PE": 16, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "FMPadding_rtl_4": { "SIMD": 32 }, "StreamingFIFO_rtl_26": { - "depth": 512 + "ram_style": "ultra", + "depth": 512, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_5": { - "SIMD": 32 + "SIMD": 32, + "ram_style": "distributed" }, "VVAU_hls_4": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_29": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_5": { + "MVAU_hls_5": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_31": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_5": { "SIMD": 8 }, "StreamingFIFO_rtl_32": { - "depth": 2048 + "ram_style": "ultra", + "depth": 2048, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_6": { - "SIMD": 8 + "SIMD": 8, + "ram_style": "distributed" }, "VVAU_hls_5": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_35": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, - "MVAU_rtl_6": { + "MVAU_hls_6": { "PE": 16, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "FMPadding_rtl_6": { "SIMD": 16 }, "StreamingFIFO_rtl_37": { - "depth": 2048 + "ram_style": "ultra", + "depth": 2048, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_7": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_6": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_39": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_7": { + "MVAU_hls_7": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_41": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_7": { "SIMD": 16 }, "StreamingFIFO_rtl_42": { - "depth": 2048 + "ram_style": "ultra", + "depth": 2048, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_8": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_7": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_44": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_8": { + "MVAU_hls_8": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_46": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_8": { "SIMD": 16 }, "StreamingFIFO_rtl_47": { - "depth": 2048 + "ram_style": "ultra", + "depth": 2048, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_9": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_8": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_49": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_9": { + "MVAU_hls_9": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_51": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_9": { "SIMD": 16 }, "StreamingFIFO_rtl_52": { - "depth": 2048 + "ram_style": "ultra", + "depth": 2048, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_10": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_9": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_54": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_10": { + "MVAU_hls_10": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_56": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_10": { "SIMD": 16 }, "StreamingFIFO_rtl_57": { - "depth": 2048 + "ram_style": "ultra", + "depth": 2048, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_11": { - "SIMD": 16 + "SIMD": 16, + "ram_style": "distributed" }, "VVAU_hls_10": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_59": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_11": { + "MVAU_hls_11": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_61": { - "depth": 128 + "ram_style": "auto", + "depth": 128, + "impl_style": "rtl" }, "FMPadding_rtl_11": { "SIMD": 4 }, "StreamingFIFO_rtl_62": { - "depth": 4096 + "ram_style": "ultra", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_12": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "VVAU_hls_11": { "PE": 4, "resType": "lut" }, "StreamingFIFO_rtl_65": { - "depth": 256 + "ram_style": "auto", + "depth": 256, + "impl_style": "rtl" }, - "MVAU_rtl_12": { + "MVAU_hls_12": { "PE": 16, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "StreamingFIFO_rtl_67": { - "depth": 32 + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl" }, "FMPadding_rtl_12": { "SIMD": 8 }, "StreamingFIFO_rtl_68": { - "depth": 4096 + "ram_style": "ultra", + "depth": 4096, + "impl_style": "vivado" }, "ConvolutionInputGenerator_rtl_13": { - "SIMD": 8 + "SIMD": 8, + "ram_style": "distributed" }, "VVAU_hls_12": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_71": { - "depth": 1024 + "ram_style": "ultra", + "depth": 1024, + "impl_style": "vivado" }, - "MVAU_rtl_13": { + "MVAU_hls_13": { "PE": 32, "SIMD": 16, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "ConvolutionInputGenerator_rtl_14": { - "SIMD": 4 + "SIMD": 4, + "ram_style": "distributed" }, "Pool_hls_0": { "PE": 4 }, - "MVAU_rtl_14": { + "MVAU_hls_14": { "PE": 4, "SIMD": 4, - "resType": "dsp" + "ram_style": "block", + "mem_mode": "internal_decoupled", + "resType": "lut" }, "ChannelwiseOp_hls_0": { - "PE": 1 + "PE": 1, + "ram_style": "distributed" }, "LabelSelect_hls_0": { "PE": 1 diff --git a/build/mobilenet-v1/folding_config/U280_folding_config.json b/build/mobilenet-v1/folding_config/U280_folding_config.json index 52b52f5..fe3c3d2 100644 --- a/build/mobilenet-v1/folding_config/U280_folding_config.json +++ b/build/mobilenet-v1/folding_config/U280_folding_config.json @@ -2,9 +2,10 @@ "Defaults": {}, "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, @@ -13,20 +14,21 @@ "SIMD": 3, "ram_style": "block", "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_0": { + "FMPadding_rtl_0": { "SIMD": 32 }, "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_0": { + "VVAU_hls_0": { "PE": 32, "resType": "lut" }, @@ -37,24 +39,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_1": { + "FMPadding_rtl_1": { "SIMD": 32 }, "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_1": { + "VVAU_hls_1": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_2": { "PE": 16, @@ -63,24 +67,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_2": { + "FMPadding_rtl_2": { "SIMD": 64 }, "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_hls_2": { + "VVAU_hls_2": { "PE": 64, "resType": "lut" }, "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_3": { "PE": 32, @@ -91,26 +97,29 @@ }, "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_3": { + "FMPadding_rtl_3": { "SIMD": 16 }, "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_3": { + "VVAU_hls_3": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_4": { "PE": 16, @@ -119,24 +128,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_4": { + "FMPadding_rtl_4": { "SIMD": 32 }, "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_4": { + "VVAU_hls_4": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_5": { "PE": 32, @@ -147,26 +158,29 @@ }, "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_5": { + "FMPadding_rtl_5": { "SIMD": 8 }, "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_6": { + "ConvolutionInputGenerator_rtl_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_5": { + "VVAU_hls_5": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_6": { "PE": 16, @@ -175,24 +189,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_6": { + "FMPadding_rtl_6": { "SIMD": 16 }, "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_7": { + "ConvolutionInputGenerator_rtl_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_6": { + "VVAU_hls_6": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_7": { "PE": 32, @@ -203,26 +219,29 @@ }, "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_7": { + "FMPadding_rtl_7": { "SIMD": 16 }, "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_8": { + "ConvolutionInputGenerator_rtl_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_7": { + "VVAU_hls_7": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_8": { "PE": 32, @@ -233,26 +252,29 @@ }, "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_8": { + "FMPadding_rtl_8": { "SIMD": 16 }, "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_9": { + "ConvolutionInputGenerator_rtl_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_8": { + "VVAU_hls_8": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_9": { "PE": 32, @@ -263,26 +285,29 @@ }, "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_9": { + "FMPadding_rtl_9": { "SIMD": 16 }, "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_10": { + "ConvolutionInputGenerator_rtl_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_9": { + "VVAU_hls_9": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_10": { "PE": 32, @@ -293,26 +318,29 @@ }, "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_10": { + "FMPadding_rtl_10": { "SIMD": 16 }, "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_11": { + "ConvolutionInputGenerator_rtl_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_10": { + "VVAU_hls_10": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_11": { "PE": 32, @@ -323,26 +351,29 @@ }, "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128 + "depth": 128, + "impl_style": "rtl" }, - "FMPadding_hls_11": { + "FMPadding_rtl_11": { "SIMD": 4 }, "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096 + "depth": 4096, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_12": { + "ConvolutionInputGenerator_rtl_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_hls_11": { + "VVAU_hls_11": { "PE": 4, "resType": "lut" }, "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_12": { "PE": 16, @@ -353,26 +384,29 @@ }, "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_12": { + "FMPadding_rtl_12": { "SIMD": 8 }, "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096 + "depth": 4096, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_13": { + "ConvolutionInputGenerator_rtl_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_12": { + "VVAU_hls_12": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_13": { "PE": 32, @@ -381,7 +415,7 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "ConvolutionInputGenerator_hls_14": { + "ConvolutionInputGenerator_rtl_14": { "SIMD": 4, "ram_style": "distributed" }, diff --git a/build/mobilenet-v1/folding_config/U50_folding_config.json b/build/mobilenet-v1/folding_config/U50_folding_config.json index 52b52f5..fe3c3d2 100644 --- a/build/mobilenet-v1/folding_config/U50_folding_config.json +++ b/build/mobilenet-v1/folding_config/U50_folding_config.json @@ -2,9 +2,10 @@ "Defaults": {}, "StreamingFIFO_rtl_0": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, @@ -13,20 +14,21 @@ "SIMD": 3, "ram_style": "block", "mem_mode": "internal_decoupled", - "resType": "lut" + "resType": "dsp" }, - "FMPadding_hls_0": { + "FMPadding_rtl_0": { "SIMD": 32 }, "StreamingFIFO_rtl_3": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_0": { + "VVAU_hls_0": { "PE": 32, "resType": "lut" }, @@ -37,24 +39,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_1": { + "FMPadding_rtl_1": { "SIMD": 32 }, "StreamingFIFO_rtl_9": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_1": { + "VVAU_hls_1": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_12": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_2": { "PE": 16, @@ -63,24 +67,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_2": { + "FMPadding_rtl_2": { "SIMD": 64 }, "StreamingFIFO_rtl_15": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 64, "ram_style": "distributed" }, - "VectorVectorActivation_hls_2": { + "VVAU_hls_2": { "PE": 64, "resType": "lut" }, "StreamingFIFO_rtl_18": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_3": { "PE": 32, @@ -91,26 +97,29 @@ }, "StreamingFIFO_rtl_20": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_3": { + "FMPadding_rtl_3": { "SIMD": 16 }, "StreamingFIFO_rtl_21": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_3": { + "VVAU_hls_3": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_23": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_4": { "PE": 16, @@ -119,24 +128,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_4": { + "FMPadding_rtl_4": { "SIMD": 32 }, "StreamingFIFO_rtl_26": { "ram_style": "ultra", - "depth": 512 + "depth": 512, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, "ram_style": "distributed" }, - "VectorVectorActivation_hls_4": { + "VVAU_hls_4": { "PE": 32, "resType": "lut" }, "StreamingFIFO_rtl_29": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_5": { "PE": 32, @@ -147,26 +158,29 @@ }, "StreamingFIFO_rtl_31": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_5": { + "FMPadding_rtl_5": { "SIMD": 8 }, "StreamingFIFO_rtl_32": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_6": { + "ConvolutionInputGenerator_rtl_6": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_5": { + "VVAU_hls_5": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_35": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_6": { "PE": 16, @@ -175,24 +189,26 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "FMPadding_hls_6": { + "FMPadding_rtl_6": { "SIMD": 16 }, "StreamingFIFO_rtl_37": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_7": { + "ConvolutionInputGenerator_rtl_7": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_6": { + "VVAU_hls_6": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_39": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_7": { "PE": 32, @@ -203,26 +219,29 @@ }, "StreamingFIFO_rtl_41": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_7": { + "FMPadding_rtl_7": { "SIMD": 16 }, "StreamingFIFO_rtl_42": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_8": { + "ConvolutionInputGenerator_rtl_8": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_7": { + "VVAU_hls_7": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_44": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_8": { "PE": 32, @@ -233,26 +252,29 @@ }, "StreamingFIFO_rtl_46": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_8": { + "FMPadding_rtl_8": { "SIMD": 16 }, "StreamingFIFO_rtl_47": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_9": { + "ConvolutionInputGenerator_rtl_9": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_8": { + "VVAU_hls_8": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_49": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_9": { "PE": 32, @@ -263,26 +285,29 @@ }, "StreamingFIFO_rtl_51": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_9": { + "FMPadding_rtl_9": { "SIMD": 16 }, "StreamingFIFO_rtl_52": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_10": { + "ConvolutionInputGenerator_rtl_10": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_9": { + "VVAU_hls_9": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_54": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_10": { "PE": 32, @@ -293,26 +318,29 @@ }, "StreamingFIFO_rtl_56": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_10": { + "FMPadding_rtl_10": { "SIMD": 16 }, "StreamingFIFO_rtl_57": { "ram_style": "ultra", - "depth": 2048 + "depth": 2048, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_11": { + "ConvolutionInputGenerator_rtl_11": { "SIMD": 16, "ram_style": "distributed" }, - "VectorVectorActivation_hls_10": { + "VVAU_hls_10": { "PE": 16, "resType": "lut" }, "StreamingFIFO_rtl_59": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_11": { "PE": 32, @@ -323,26 +351,29 @@ }, "StreamingFIFO_rtl_61": { "ram_style": "auto", - "depth": 128 + "depth": 128, + "impl_style": "rtl" }, - "FMPadding_hls_11": { + "FMPadding_rtl_11": { "SIMD": 4 }, "StreamingFIFO_rtl_62": { "ram_style": "ultra", - "depth": 4096 + "depth": 4096, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_12": { + "ConvolutionInputGenerator_rtl_12": { "SIMD": 4, "ram_style": "distributed" }, - "VectorVectorActivation_hls_11": { + "VVAU_hls_11": { "PE": 4, "resType": "lut" }, "StreamingFIFO_rtl_65": { "ram_style": "auto", - "depth": 256 + "depth": 256, + "impl_style": "rtl" }, "MVAU_hls_12": { "PE": 16, @@ -353,26 +384,29 @@ }, "StreamingFIFO_rtl_67": { "ram_style": "auto", - "depth": 32 + "depth": 32, + "impl_style": "rtl" }, - "FMPadding_hls_12": { + "FMPadding_rtl_12": { "SIMD": 8 }, "StreamingFIFO_rtl_68": { "ram_style": "ultra", - "depth": 4096 + "depth": 4096, + "impl_style": "vivado" }, - "ConvolutionInputGenerator_hls_13": { + "ConvolutionInputGenerator_rtl_13": { "SIMD": 8, "ram_style": "distributed" }, - "VectorVectorActivation_hls_12": { + "VVAU_hls_12": { "PE": 8, "resType": "lut" }, "StreamingFIFO_rtl_71": { "ram_style": "ultra", - "depth": 1024 + "depth": 1024, + "impl_style": "vivado" }, "MVAU_hls_13": { "PE": 32, @@ -381,7 +415,7 @@ "mem_mode": "internal_decoupled", "resType": "lut" }, - "ConvolutionInputGenerator_hls_14": { + "ConvolutionInputGenerator_rtl_14": { "SIMD": 4, "ram_style": "distributed" }, diff --git a/build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json new file mode 100644 index 0000000..5a33106 --- /dev/null +++ b/build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json @@ -0,0 +1,180 @@ +{ + "Defaults": {}, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "rtl" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_0": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "rtl" + }, + "VVAU_0": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "rtl" + }, + "VVAU_1": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "rtl" + }, + "VVAU_2": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "rtl" + }, + "VVAU_3": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "rtl" + }, + "VVAU_4": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "rtl" + }, + "VVAU_5": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "rtl" + }, + "VVAU_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "rtl" + }, + "VVAU_7": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "rtl" + }, + "VVAU_8": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "rtl" + }, + "VVAU_9": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "rtl" + }, + "VVAU_10": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "rtl" + }, + "VVAU_11": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "rtl" + }, + "VVAU_12": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "rtl" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } + } diff --git a/build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json new file mode 100644 index 0000000..5a33106 --- /dev/null +++ b/build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json @@ -0,0 +1,180 @@ +{ + "Defaults": {}, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "rtl" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_0": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "rtl" + }, + "VVAU_0": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "rtl" + }, + "VVAU_1": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "rtl" + }, + "VVAU_2": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "rtl" + }, + "VVAU_3": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "rtl" + }, + "VVAU_4": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "rtl" + }, + "VVAU_5": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "rtl" + }, + "VVAU_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "rtl" + }, + "VVAU_7": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "rtl" + }, + "VVAU_8": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "rtl" + }, + "VVAU_9": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "rtl" + }, + "VVAU_10": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "rtl" + }, + "VVAU_11": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "rtl" + }, + "VVAU_12": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "rtl" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } + } diff --git a/build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json new file mode 100644 index 0000000..5a33106 --- /dev/null +++ b/build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json @@ -0,0 +1,180 @@ +{ + "Defaults": {}, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "rtl" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_0": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "rtl" + }, + "VVAU_0": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "rtl" + }, + "VVAU_1": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "rtl" + }, + "VVAU_2": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "rtl" + }, + "VVAU_3": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "rtl" + }, + "VVAU_4": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "rtl" + }, + "VVAU_5": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "rtl" + }, + "VVAU_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "rtl" + }, + "VVAU_7": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "rtl" + }, + "VVAU_8": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "rtl" + }, + "VVAU_9": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "rtl" + }, + "VVAU_10": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "rtl" + }, + "VVAU_11": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "rtl" + }, + "VVAU_12": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "rtl" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } + } diff --git a/build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json new file mode 100644 index 0000000..5a33106 --- /dev/null +++ b/build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json @@ -0,0 +1,180 @@ +{ + "Defaults": {}, + "ConvolutionInputGenerator_0": { + "preferred_impl_style": "rtl" + }, + "MVAU_0": { + "preferred_impl_style": "hls" + }, + "FMPadding_0": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_1": { + "preferred_impl_style": "rtl" + }, + "VVAU_0": { + "preferred_impl_style": "hls" + }, + "MVAU_1": { + "preferred_impl_style": "hls" + }, + "FMPadding_1": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_2": { + "preferred_impl_style": "rtl" + }, + "VVAU_1": { + "preferred_impl_style": "hls" + }, + "MVAU_2": { + "preferred_impl_style": "hls" + }, + "FMPadding_2": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_3": { + "preferred_impl_style": "rtl" + }, + "VVAU_2": { + "preferred_impl_style": "hls" + }, + "MVAU_3": { + "preferred_impl_style": "hls" + }, + "FMPadding_3": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_4": { + "preferred_impl_style": "rtl" + }, + "VVAU_3": { + "preferred_impl_style": "hls" + }, + "MVAU_4": { + "preferred_impl_style": "hls" + }, + "FMPadding_4": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_5": { + "preferred_impl_style": "rtl" + }, + "VVAU_4": { + "preferred_impl_style": "hls" + }, + "MVAU_5": { + "preferred_impl_style": "hls" + }, + "FMPadding_5": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_6": { + "preferred_impl_style": "rtl" + }, + "VVAU_5": { + "preferred_impl_style": "hls" + }, + "MVAU_6": { + "preferred_impl_style": "hls" + }, + "FMPadding_6": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_7": { + "preferred_impl_style": "rtl" + }, + "VVAU_6": { + "preferred_impl_style": "hls" + }, + "MVAU_7": { + "preferred_impl_style": "hls" + }, + "FMPadding_7": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_8": { + "preferred_impl_style": "rtl" + }, + "VVAU_7": { + "preferred_impl_style": "hls" + }, + "MVAU_8": { + "preferred_impl_style": "hls" + }, + "FMPadding_8": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_9": { + "preferred_impl_style": "rtl" + }, + "VVAU_8": { + "preferred_impl_style": "hls" + }, + "MVAU_9": { + "preferred_impl_style": "hls" + }, + "FMPadding_9": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_10": { + "preferred_impl_style": "rtl" + }, + "VVAU_9": { + "preferred_impl_style": "hls" + }, + "MVAU_10": { + "preferred_impl_style": "hls" + }, + "FMPadding_10": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_11": { + "preferred_impl_style": "rtl" + }, + "VVAU_10": { + "preferred_impl_style": "hls" + }, + "MVAU_11": { + "preferred_impl_style": "hls" + }, + "FMPadding_11": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_12": { + "preferred_impl_style": "rtl" + }, + "VVAU_11": { + "preferred_impl_style": "hls" + }, + "MVAU_12": { + "preferred_impl_style": "hls" + }, + "FMPadding_12": { + "preferred_impl_style": "rtl" + }, + "ConvolutionInputGenerator_13": { + "preferred_impl_style": "rtl" + }, + "VVAU_12": { + "preferred_impl_style": "hls" + }, + "MVAU_13": { + "preferred_impl_style": "hls" + }, + "ConvolutionInputGenerator_14": { + "preferred_impl_style": "rtl" + }, + "Pool_0": { + "preferred_impl_style": "hls" + }, + "MVAU_14": { + "preferred_impl_style": "hls" + }, + "ChannelwiseOp_0": { + "preferred_impl_style": "hls" + }, + "LabelSelect_0": { + "preferred_impl_style": "hls" + } + } From 70e3a14815858ae8fe32086f739ba49c230173df Mon Sep 17 00:00:00 2001 From: auphelia Date: Thu, 18 Apr 2024 19:32:22 +0100 Subject: [PATCH 21/53] [MNV1] Enable boards to be tested --- build/mobilenet-v1/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index 35ddef5..3c3e676 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -45,8 +45,8 @@ model_name = "mobilenetv1-w4a4" # which platforms to build the networks for -zynq_platforms = ["ZCU102", "ZCU104"] -alveo_platforms = ["U50", "U200", "U250", "U280"] +zynq_platforms = ["ZCU104"] # "ZCU104" +alveo_platforms = ["U250"] # "U50", "U200", "U280" platforms_to_build = zynq_platforms + alveo_platforms From e2b791bdb971b150b3dc98fdc310acfd91122c85 Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 19 Apr 2024 12:06:58 +0100 Subject: [PATCH 22/53] [GTSRB] Update folding config and build to FINN v0.10 --- build/gtsrb/build.py | 5 ++- .../cnv_gtsrb_folding_config.json | 40 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/build/gtsrb/build.py b/build/gtsrb/build.py index c6103a3..9f76689 100644 --- a/build/gtsrb/build.py +++ b/build/gtsrb/build.py @@ -1,6 +1,5 @@ import finn.builder.build_dataflow as build import finn.builder.build_dataflow_config as build_cfg -from finn.util.basic import alveo_default_platform from finn.builder.build_dataflow_config import default_build_dataflow_steps from qonnx.core.datatype import DataType import os @@ -16,6 +15,7 @@ zynq_platforms = ["Pynq-Z1"] platforms_to_build = zynq_platforms + def custom_step_add_preproc(model, cfg): # GTSRB data with raw uint8 pixels is divided by 255 prior to training # reflect this in the inference graph so we can perform inference directly @@ -40,6 +40,7 @@ def custom_step_add_preproc(model, cfg): custom_build_steps = [custom_step_add_preproc] + default_build_dataflow_steps + # determine which shell flow to use for a given platform def platform_to_shell(platform): if platform in zynq_platforms: @@ -67,6 +68,7 @@ def platform_to_shell(platform): synth_clk_period_ns=10.0, board=platform_name, steps=custom_build_steps, + folding_config_file="folding_config/cnv_gtsrb_folding_config.json", shell_flow_type=shell_flow_type, vitis_platform=vitis_platform, generate_outputs=[ @@ -75,7 +77,6 @@ def platform_to_shell(platform): build_cfg.DataflowOutputType.RTLSIM_PERFORMANCE, build_cfg.DataflowOutputType.BITFILE, ], - #stop_step="step_create_dataflow_partition", save_intermediate_models=True, ) model_file = "models/%s.onnx" % model_name diff --git a/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json b/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json index 06d02d8..d96d432 100644 --- a/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json +++ b/build/gtsrb/folding_config/cnv_gtsrb_folding_config.json @@ -1,80 +1,78 @@ { "Defaults": {}, - "Thresholding_Batch_0": { - "PE": 1, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 1 }, - "ConvolutionInputGenerator_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, - "MatrixVectorActivation_0": { + "MVAU_hls_0": { "PE": 16, "SIMD": 3, "ram_style": "auto" }, - "ConvolutionInputGenerator_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_1": { + "MVAU_hls_1": { "PE": 32, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_2": { + "MVAU_hls_2": { "PE": 16, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_3": { + "MVAU_hls_3": { "PE": 16, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_4": { + "MVAU_hls_4": { "PE": 4, "SIMD": 32, "ram_style": "auto" }, - "ConvolutionInputGenerator_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, "ram_style": "distributed" }, - "MatrixVectorActivation_5": { + "MVAU_hls_5": { "PE": 1, "SIMD": 32, "ram_style": "auto" }, - "MatrixVectorActivation_6": { + "MVAU_hls_6": { "PE": 1, "SIMD": 4, "ram_style": "auto" }, - "MatrixVectorActivation_7": { + "MVAU_hls_7": { "PE": 1, "SIMD": 8, "ram_style": "auto" }, - "MatrixVectorActivation_8": { + "MVAU_hls_8": { "PE": 4, "SIMD": 1, "ram_style": "auto" }, - "LabelSelect_Batch_0": { + "LabelSelect_hls_0": { "PE": 1 } - } - \ No newline at end of file +} From 1240fcfd07332f0eee0f9b524116308f2fee86ab Mon Sep 17 00:00:00 2001 From: jmonks-amd <57530957+jmonks-amd@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:15:40 +0100 Subject: [PATCH 23/53] Update Jenkinsfile to pull in gtsrb build --- ci/Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 60ac21d..1219b35 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -23,7 +23,8 @@ pipeline { "kws", "mobilenet-v1", "resnet50", - "vgg10-radioml"] + "vgg10-radioml", + "gtsrb"] createParallelBuilds(buildList) createReleaseArea(buildList) } From 45834c2d41e9464a0fea6081945eb24e60838789 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Fri, 19 Apr 2024 16:15:35 +0100 Subject: [PATCH 24/53] [build_cfg]: cap FIFOs --- build/bnn-pynq/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build/bnn-pynq/build.py b/build/bnn-pynq/build.py index ad4d52d..058a4c9 100644 --- a/build/bnn-pynq/build.py +++ b/build/bnn-pynq/build.py @@ -61,6 +61,7 @@ def platform_to_shell(platform): vitis_platform=vitis_platform, generate_outputs=[build_cfg.DataflowOutputType.BITFILE], save_intermediate_models=True, + default_swg_exception=True, ) model_file = "models/%s.onnx" % model_name # launch FINN compiler to build From 44c569e04dfe1f51bb18f97836cdb54da75aae4b Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Sun, 21 Apr 2024 11:19:22 +0100 Subject: [PATCH 25/53] [build]: added copyright header and doubled clk target (hold time violation U250) --- build/bnn-pynq/build.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/build/bnn-pynq/build.py b/build/bnn-pynq/build.py index 058a4c9..4746f29 100644 --- a/build/bnn-pynq/build.py +++ b/build/bnn-pynq/build.py @@ -1,3 +1,31 @@ +# Copyright (C) 2024, Advanced Micro Devices, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of FINN nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import finn.builder.build_dataflow as build import finn.builder.build_dataflow_config as build_cfg from finn.util.basic import alveo_default_platform @@ -54,8 +82,8 @@ def platform_to_shell(platform): cfg = build_cfg.DataflowBuildConfig( output_dir="output_%s_%s" % (model_name, release_platform_name), folding_config_file="folding_config/%s_folding_config.json" % model_name, - specialize_layers_config_file="specialize_layers_config.json", - synth_clk_period_ns=10.0, + # specialize_layers_config_file="specialize_layers_config.json", + synth_clk_period_ns=5.0, board=platform_name, shell_flow_type=shell_flow_type, vitis_platform=vitis_platform, From 94b270f1c39f271932847ea134e4d34fc8b706e2 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Sun, 21 Apr 2024 11:19:35 +0100 Subject: [PATCH 26/53] [config]: updated layer names --- .../folding_config/cnv-w1a1_folding_config.json | 17 ++++++++--------- .../folding_config/cnv-w1a2_folding_config.json | 17 ++++++++--------- .../folding_config/cnv-w2a2_folding_config.json | 17 ++++++++--------- .../folding_config/tfc-w1a1_folding_config.json | 5 ++--- .../folding_config/tfc-w1a2_folding_config.json | 5 ++--- .../folding_config/tfc-w2a2_folding_config.json | 5 ++--- 6 files changed, 30 insertions(+), 36 deletions(-) diff --git a/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json b/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json index f11b896..0bb17e9 100644 --- a/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w1a1_folding_config.json @@ -1,10 +1,9 @@ { "Defaults": {}, - "Thresholding_hls_0": { - "PE": 1, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 1 }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, @@ -14,7 +13,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 32, "ram_style": "distributed" }, @@ -24,7 +23,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 32, "ram_style": "distributed" }, @@ -34,7 +33,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 32, "ram_style": "distributed" }, @@ -44,7 +43,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 32, "ram_style": "distributed" }, @@ -54,7 +53,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, "ram_style": "distributed" }, diff --git a/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json b/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json index a4ca895..954de5b 100644 --- a/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w1a2_folding_config.json @@ -1,10 +1,9 @@ { "Defaults": {}, - "Thresholding_hls_0": { - "PE": 1, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 1 }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, @@ -14,7 +13,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 16, "ram_style": "distributed" }, @@ -24,7 +23,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 16, "ram_style": "distributed" }, @@ -34,7 +33,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 16, "ram_style": "distributed" }, @@ -44,7 +43,7 @@ "ram_style": "block", "resType": "lut" }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 8, "ram_style": "distributed" }, @@ -54,7 +53,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 8, "ram_style": "distributed" }, diff --git a/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json b/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json index a4ca895..954de5b 100644 --- a/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json +++ b/build/bnn-pynq/folding_config/cnv-w2a2_folding_config.json @@ -1,10 +1,9 @@ { "Defaults": {}, - "Thresholding_hls_0": { - "PE": 1, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 1 }, - "ConvolutionInputGenerator_hls_0": { + "ConvolutionInputGenerator_rtl_0": { "SIMD": 3, "ram_style": "distributed" }, @@ -14,7 +13,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_1": { + "ConvolutionInputGenerator_rtl_1": { "SIMD": 16, "ram_style": "distributed" }, @@ -24,7 +23,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_2": { + "ConvolutionInputGenerator_rtl_2": { "SIMD": 16, "ram_style": "distributed" }, @@ -34,7 +33,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 16, "ram_style": "distributed" }, @@ -44,7 +43,7 @@ "ram_style": "block", "resType": "lut" }, - "ConvolutionInputGenerator_hls_4": { + "ConvolutionInputGenerator_rtl_4": { "SIMD": 8, "ram_style": "distributed" }, @@ -54,7 +53,7 @@ "ram_style": "auto", "resType": "lut" }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 8, "ram_style": "distributed" }, diff --git a/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json b/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json index 8f5d3b6..bbaad88 100644 --- a/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w1a1_folding_config.json @@ -1,8 +1,7 @@ { "Defaults": {}, - "Thresholding_hls_0": { - "PE": 49, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 49 }, "MVAU_hls_0": { "PE": 16, diff --git a/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json b/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json index 8f5d3b6..bbaad88 100644 --- a/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w1a2_folding_config.json @@ -1,8 +1,7 @@ { "Defaults": {}, - "Thresholding_hls_0": { - "PE": 49, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 49 }, "MVAU_hls_0": { "PE": 16, diff --git a/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json b/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json index 8f5d3b6..bbaad88 100644 --- a/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json +++ b/build/bnn-pynq/folding_config/tfc-w2a2_folding_config.json @@ -1,8 +1,7 @@ { "Defaults": {}, - "Thresholding_hls_0": { - "PE": 49, - "ram_style": "distributed" + "Thresholding_rtl_0": { + "PE": 49 }, "MVAU_hls_0": { "PE": 16, From fb4f49037ba9ce17cbf99b3bc4e177bb5180e3a3 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Sun, 21 Apr 2024 11:21:34 +0100 Subject: [PATCH 27/53] [build]: added flag to cap fifos after SWG layer --- build/cybersecurity-mlp/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build/cybersecurity-mlp/build.py b/build/cybersecurity-mlp/build.py index b5fb380..56808e2 100644 --- a/build/cybersecurity-mlp/build.py +++ b/build/cybersecurity-mlp/build.py @@ -88,6 +88,7 @@ def platform_to_shell(platform): build_cfg.DataflowOutputType.DEPLOYMENT_PACKAGE, ], save_intermediate_models=True, + default_swg_exception=True, ) # Export MLP model to FINN-ONNX From f73ccfee7018127b81a9b0c23e73bbafaa0f181c Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Sun, 21 Apr 2024 11:24:00 +0100 Subject: [PATCH 28/53] [build]: added flag to cap fifos after SWG layer --- build/kws/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build/kws/build.py b/build/kws/build.py index 99a908e..8950e7b 100644 --- a/build/kws/build.py +++ b/build/kws/build.py @@ -100,6 +100,7 @@ def step_preprocess(model: ModelWrapper, cfg: DataflowBuildConfig): save_intermediate_models=True, stitched_ip_gen_dcp=True, verify_save_full_context=True, + default_swg_exception=True, ) # Build the model build.build_dataflow_cfg(model_file, cfg) From 16305909e0beeca5881d9ec1df733c3fa702c2ee Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Sun, 21 Apr 2024 11:36:28 +0100 Subject: [PATCH 29/53] [build]: added copyright header and flag to cap FIFOs after SWG layer --- build/gtsrb/build.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/build/gtsrb/build.py b/build/gtsrb/build.py index 9f76689..9b470e6 100644 --- a/build/gtsrb/build.py +++ b/build/gtsrb/build.py @@ -1,3 +1,31 @@ +# Copyright (C) 2024, Advanced Micro Devices, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of FINN nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import finn.builder.build_dataflow as build import finn.builder.build_dataflow_config as build_cfg from finn.builder.build_dataflow_config import default_build_dataflow_steps @@ -78,6 +106,7 @@ def platform_to_shell(platform): build_cfg.DataflowOutputType.BITFILE, ], save_intermediate_models=True, + default_swg_exception=True, ) model_file = "models/%s.onnx" % model_name # launch FINN compiler to build From 154c1dd729d5e8bd061bed3165b7fb2fd46234f3 Mon Sep 17 00:00:00 2001 From: johnnoel Date: Mon, 22 Apr 2024 15:09:45 +0100 Subject: [PATCH 30/53] Update gtsrb download-model.sh permissions --- build/gtsrb/models/download-model.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build/gtsrb/models/download-model.sh diff --git a/build/gtsrb/models/download-model.sh b/build/gtsrb/models/download-model.sh old mode 100644 new mode 100755 From 1d90060d724a609cafe7f9f88ea848978907ce68 Mon Sep 17 00:00:00 2001 From: auphelia Date: Mon, 22 Apr 2024 16:31:56 +0100 Subject: [PATCH 31/53] [Cybersec+GTSRB] Remove swg exception --- build/cybersecurity-mlp/build.py | 1 - build/gtsrb/build.py | 1 - 2 files changed, 2 deletions(-) diff --git a/build/cybersecurity-mlp/build.py b/build/cybersecurity-mlp/build.py index 56808e2..b5fb380 100644 --- a/build/cybersecurity-mlp/build.py +++ b/build/cybersecurity-mlp/build.py @@ -88,7 +88,6 @@ def platform_to_shell(platform): build_cfg.DataflowOutputType.DEPLOYMENT_PACKAGE, ], save_intermediate_models=True, - default_swg_exception=True, ) # Export MLP model to FINN-ONNX diff --git a/build/gtsrb/build.py b/build/gtsrb/build.py index 9b470e6..a46d766 100644 --- a/build/gtsrb/build.py +++ b/build/gtsrb/build.py @@ -106,7 +106,6 @@ def platform_to_shell(platform): build_cfg.DataflowOutputType.BITFILE, ], save_intermediate_models=True, - default_swg_exception=True, ) model_file = "models/%s.onnx" % model_name # launch FINN compiler to build From fa889216ca5ee0cf5dbf009d550a425549560c60 Mon Sep 17 00:00:00 2001 From: auphelia Date: Mon, 22 Apr 2024 17:29:20 +0100 Subject: [PATCH 32/53] [KWS] Update build flow and add folding config json --- build/kws/build.py | 3 +- .../Pynq-Z1_kws_folding_config.json | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 build/kws/folding_config/Pynq-Z1_kws_folding_config.json diff --git a/build/kws/build.py b/build/kws/build.py index 8950e7b..3a967e3 100644 --- a/build/kws/build.py +++ b/build/kws/build.py @@ -93,14 +93,13 @@ def step_preprocess(model: ModelWrapper, cfg: DataflowBuildConfig): steps=build_steps, generate_outputs=build_outputs, output_dir=last_output_dir, - target_fps=200000, + folding_config_file="folding_config/%s_kws_folding_config.json" % platform_name, synth_clk_period_ns=10.0, board=platform_name, shell_flow_type=build_cfg.ShellFlowType.VIVADO_ZYNQ, save_intermediate_models=True, stitched_ip_gen_dcp=True, verify_save_full_context=True, - default_swg_exception=True, ) # Build the model build.build_dataflow_cfg(model_file, cfg) diff --git a/build/kws/folding_config/Pynq-Z1_kws_folding_config.json b/build/kws/folding_config/Pynq-Z1_kws_folding_config.json new file mode 100644 index 0000000..932e745 --- /dev/null +++ b/build/kws/folding_config/Pynq-Z1_kws_folding_config.json @@ -0,0 +1,38 @@ +{ + "Defaults": {}, + "MVAU_hls_0": { + "PE": 32, + "SIMD": 10, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "MVAU_hls_1": { + "PE": 32, + "SIMD": 8, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "MVAU_hls_2": { + "PE": 32, + "SIMD": 8, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "MVAU_hls_3": { + "PE": 1, + "SIMD": 8, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "LabelSelect_hls_0": { + "PE": 1 + } +} From 85d4876219866607fe23b715a98a415a1678ebd7 Mon Sep 17 00:00:00 2001 From: aziz bahri Date: Tue, 23 Apr 2024 09:33:39 +0100 Subject: [PATCH 33/53] [Radio ML] update layer configs --- build/vgg10-radioml/build.py | 3 +- .../folding_config/ZCU104_folding_config.json | 1207 ++++++++++++++++- .../specialize_layers_config.json | 77 +- 3 files changed, 1186 insertions(+), 101 deletions(-) diff --git a/build/vgg10-radioml/build.py b/build/vgg10-radioml/build.py index f27b393..f8d3009 100755 --- a/build/vgg10-radioml/build.py +++ b/build/vgg10-radioml/build.py @@ -112,7 +112,8 @@ def select_build_steps(platform): folding_config_file="folding_config/%s_folding_config.json" % platform_name, specialize_layers_config_file="specialize_layers_config.json", auto_fifo_depths=True, - standalone_thresholds=False, + split_large_fifos = True, + standalone_thresholds=True, # enable extra performance optimizations (physopt) vitis_opt_strategy=build_cfg.VitisOptStrategyCfg.PERFORMANCE_BEST, generate_outputs=[ diff --git a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json index 52583f9..db03dad 100755 --- a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json +++ b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json @@ -1,136 +1,1193 @@ { "Defaults": {}, - "FMPadding_hls_0": { - "SIMD": 2 + "StreamingFIFO_rtl_0": { + "ram_style": "auto", + "depth": 339, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "FMPadding_rtl_0": { + "SIMD": 2, + "inFIFODepths": [ + 339 + ], + "outFIFODepths": [ + 1026 + ] }, - "ConvolutionInputGenerator_hls_0": { + "StreamingFIFO_rtl_1": { + "ram_style": "auto", + "depth": 1026, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "ConvolutionInputGenerator_rtl_0": { "SIMD": 2, - "ram_style": "auto" + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 1026 + ], + "outFIFODepths": [ + 3071 + ] + }, + "StreamingFIFO_rtl_2": { + "ram_style": "auto", + "depth": 3071, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_0": { + "inFIFODepths": [ + 3071 + ], + "outFIFODepths": [ + 6144 + ] + }, + "StreamingFIFO_rtl_3": { + "ram_style": "auto", + "depth": 6144, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_0": { + "PE": 1, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 6144 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_4": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_0": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 32 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 }, - "MVAU_hls_0": { - "PE": 32, - "SIMD": 6, + "StreamingFIFO_rtl_5": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 32, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_0": { + "PE": 1, + "inFIFODepths": [ + 32 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_6": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "FMPadding_hls_1": { - "SIMD": 16 + "StreamingDataWidthConverter_rtl_1": { + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_7": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "ConvolutionInputGenerator_hls_1": { + "FMPadding_rtl_1": { "SIMD": 32, - "ram_style": "auto" + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] }, - "MVAU_hls_1": { - "PE": 16, - "SIMD": 96, + "StreamingFIFO_rtl_8": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "ConvolutionInputGenerator_rtl_1": { + "SIMD": 32, + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 1151 + ] + }, + "StreamingFIFO_rtl_9": { + "ram_style": "auto", + "depth": 1151, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_2": { + "inFIFODepths": [ + 1151 + ], + "outFIFODepths": [ + 49152 + ] + }, + "StreamingFIFO_rtl_10": { + "ram_style": "auto", + "depth": 49152, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_1": { + "PE": 1, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 49152 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_11": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_1": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_12": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_1": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_13": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "FMPadding_hls_2": { - "SIMD": 8 + "StreamingDataWidthConverter_rtl_3": { + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_14": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "ConvolutionInputGenerator_hls_2": { + "FMPadding_rtl_2": { "SIMD": 32, - "ram_style": "auto" + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] }, - "MVAU_hls_2": { - "PE": 8, - "SIMD": 96, + "StreamingFIFO_rtl_15": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "ConvolutionInputGenerator_rtl_2": { + "SIMD": 32, + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 32 + ] + }, + "StreamingFIFO_rtl_16": { + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_4": { + "inFIFODepths": [ + 32 + ], + "outFIFODepths": [ + 96 + ] + }, + "StreamingFIFO_rtl_17": { + "ram_style": "auto", + "depth": 96, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_2": { + "PE": 1, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 96 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_18": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_2": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_19": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_2": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_20": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_5": { + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_21": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "FMPadding_rtl_3": { + "SIMD": 32, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] }, - "FMPadding_hls_3": { - "SIMD": 8 + "StreamingFIFO_rtl_22": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "ConvolutionInputGenerator_hls_3": { + "ConvolutionInputGenerator_rtl_3": { "SIMD": 32, - "ram_style": "auto" + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 32 + ] }, - "MVAU_hls_3": { - "PE": 4, - "SIMD": 96, + "StreamingFIFO_rtl_23": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 32, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_6": { + "inFIFODepths": [ + 32 + ], + "outFIFODepths": [ + 96 + ] + }, + "StreamingFIFO_rtl_24": { + "ram_style": "auto", + "depth": 96, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_3": { + "PE": 1, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 96 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_25": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_3": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_26": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_3": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_27": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "FMPadding_hls_4": { - "SIMD": 4 + "StreamingDataWidthConverter_rtl_7": { + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_28": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "ConvolutionInputGenerator_hls_4": { + "FMPadding_rtl_4": { "SIMD": 32, - "ram_style": "auto" + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] }, - "MVAU_hls_4": { - "PE": 2, - "SIMD": 96, + "StreamingFIFO_rtl_29": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "ConvolutionInputGenerator_rtl_4": { + "SIMD": 32, + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 32 + ] + }, + "StreamingFIFO_rtl_30": { + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_8": { + "inFIFODepths": [ + 32 + ], + "outFIFODepths": [ + 96 + ] + }, + "StreamingFIFO_rtl_31": { + "ram_style": "auto", + "depth": 96, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_4": { + "PE": 1, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 96 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_32": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_4": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_33": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_4": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_34": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_9": { + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_35": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "FMPadding_rtl_5": { + "SIMD": 32, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] }, - "FMPadding_hls_5": { - "SIMD": 2 + "StreamingFIFO_rtl_36": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "ConvolutionInputGenerator_hls_5": { + "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, - "ram_style": "auto" + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 32 + ] + }, + "StreamingFIFO_rtl_37": { + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "MVAU_hls_5": { + "StreamingDataWidthConverter_rtl_10": { + "inFIFODepths": [ + 32 + ], + "outFIFODepths": [ + 96 + ] + }, + "StreamingFIFO_rtl_38": { + "ram_style": "auto", + "depth": 96, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_5": { "PE": 1, - "SIMD": 96, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 96 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_39": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_5": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_40": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_5": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_41": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_11": { + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_42": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "FMPadding_hls_6": { - "SIMD": 1 + "FMPadding_rtl_6": { + "SIMD": 32, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_43": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "ConvolutionInputGenerator_hls_6": { + "ConvolutionInputGenerator_rtl_6": { "SIMD": 32, - "ram_style": "auto" + "parallel_window": 0, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 32 + ] + }, + "StreamingFIFO_rtl_44": { + "ram_style": "auto", + "depth": 32, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "StreamingDataWidthConverter_rtl_12": { + "inFIFODepths": [ + 32 + ], + "outFIFODepths": [ + 96 + ] }, - "MVAU_hls_6": { + "StreamingFIFO_rtl_45": { + "ram_style": "auto", + "depth": 96, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_6": { "PE": 1, - "SIMD": 96, + "SIMD": 1, "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 96 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_46": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_6": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_47": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, "StreamingMaxPool_hls_6": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] }, - "MVAU_hls_7": { - "PE": 2, - "SIMD": 32, + "StreamingFIFO_rtl_48": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "MVAU_hls_8": { + "MVAU_rtl_7": { "PE": 1, - "SIMD": 32, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_49": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_7": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_50": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "MVAU_rtl_8": { + "PE": 1, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_51": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "Thresholding_rtl_8": { + "PE": 1, + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ], + "depth_trigger_uram": 0, + "depth_trigger_bram": 0 + }, + "StreamingFIFO_rtl_52": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] }, - "MVAU_hls_9": { + "MVAU_rtl_9": { "PE": 1, - "SIMD": 8, + "SIMD": 1, + "ram_style": "auto", + "resType": "auto", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_53": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "ChannelwiseOp_hls_0": { + "PE": 1, + "ram_style": "distributed", + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_54": { + "ram_style": "auto", + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] + }, + "LabelSelect_hls_0": { + "PE": 1, + "inFIFODepths": [ + 2 + ], + "outFIFODepths": [ + 2 + ] + }, + "StreamingFIFO_rtl_55": { "ram_style": "auto", - "mem_mode": "internal_embedded", - "runtime_writeable_weights": 0 + "depth": 2, + "impl_style": "rtl", + "inFIFODepths": [ + 0 + ], + "outFIFODepths": [ + 0 + ] } -} +} \ No newline at end of file diff --git a/build/vgg10-radioml/specialize_layers_config.json b/build/vgg10-radioml/specialize_layers_config.json index 2fbeb76..386425c 100644 --- a/build/vgg10-radioml/specialize_layers_config.json +++ b/build/vgg10-radioml/specialize_layers_config.json @@ -1,100 +1,127 @@ { "Defaults": {}, "FMPadding_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_0": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_0": { "preferred_impl_style": "hls" }, "FMPadding_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_1": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_1": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_1": { "preferred_impl_style": "hls" }, "FMPadding_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_2": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_2": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_2": { "preferred_impl_style": "hls" }, "FMPadding_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_3": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_3": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_3": { "preferred_impl_style": "hls" }, "FMPadding_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_4": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_4": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_4": { "preferred_impl_style": "hls" }, "FMPadding_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_5": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_5": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_5": { "preferred_impl_style": "hls" }, "FMPadding_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ConvolutionInputGenerator_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "MVAU_6": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_6": { + "preferred_impl_style": "rtl" }, "StreamingMaxPool_6": { "preferred_impl_style": "hls" }, "MVAU_7": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_7": { + "preferred_impl_style": "rtl" }, "MVAU_8": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" + }, + "Thresholding_8": { + "preferred_impl_style": "rtl" }, "MVAU_9": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "ChannelwiseOp_0": { - "preferred_impl_style": "hls" + "preferred_impl_style": "rtl" }, "LabelSelect_0": { "preferred_impl_style": "hls" From f7914061eb076a75155cf1907981891bb201fddc Mon Sep 17 00:00:00 2001 From: aziz bahri Date: Tue, 23 Apr 2024 11:46:25 +0100 Subject: [PATCH 34/53] [Radio ML] remove auto fifosizing Signed-off-by: aziz bahri --- build/vgg10-radioml/build.py | 2 +- .../folding_config/ZCU104_folding_config.json | 870 ++---------------- 2 files changed, 90 insertions(+), 782 deletions(-) diff --git a/build/vgg10-radioml/build.py b/build/vgg10-radioml/build.py index f8d3009..53e1fc7 100755 --- a/build/vgg10-radioml/build.py +++ b/build/vgg10-radioml/build.py @@ -111,7 +111,7 @@ def select_build_steps(platform): vitis_platform=vitis_platform, folding_config_file="folding_config/%s_folding_config.json" % platform_name, specialize_layers_config_file="specialize_layers_config.json", - auto_fifo_depths=True, + auto_fifo_depths=False, split_large_fifos = True, standalone_thresholds=True, # enable extra performance optimizations (physopt) diff --git a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json index db03dad..43fab2a 100755 --- a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json +++ b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json @@ -3,74 +3,30 @@ "StreamingFIFO_rtl_0": { "ram_style": "auto", "depth": 339, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_0": { - "SIMD": 2, - "inFIFODepths": [ - 339 - ], - "outFIFODepths": [ - 1026 - ] + "SIMD": 2 }, "StreamingFIFO_rtl_1": { "ram_style": "auto", "depth": 1026, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_0": { "SIMD": 2, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 1026 - ], - "outFIFODepths": [ - 3071 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_2": { "ram_style": "auto", "depth": 3071, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_0": { - "inFIFODepths": [ - 3071 - ], - "outFIFODepths": [ - 6144 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_3": { "ram_style": "auto", "depth": 6144, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_0": { "PE": 1, @@ -78,147 +34,59 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 6144 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_4": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_0": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 32 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_5": { "ram_style": "auto", "depth": 32, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_0": { - "PE": 1, - "inFIFODepths": [ - 32 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_6": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_1": { - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_7": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_1": { - "SIMD": 32, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "SIMD": 32 }, "StreamingFIFO_rtl_8": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_1": { "SIMD": 32, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 1151 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_9": { "ram_style": "auto", "depth": 1151, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_2": { - "inFIFODepths": [ - 1151 - ], - "outFIFODepths": [ - 49152 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_10": { "ram_style": "auto", "depth": 49152, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_1": { "PE": 1, @@ -226,147 +94,59 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 49152 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_11": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_1": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_12": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_1": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_13": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_3": { - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_14": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_2": { - "SIMD": 32, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "SIMD": 32 }, "StreamingFIFO_rtl_15": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_2": { "SIMD": 32, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 32 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_16": { "ram_style": "auto", "depth": 32, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_4": { - "inFIFODepths": [ - 32 - ], - "outFIFODepths": [ - 96 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_17": { "ram_style": "auto", "depth": 96, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_2": { "PE": 1, @@ -374,147 +154,59 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 96 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_18": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_2": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_19": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_2": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_20": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_5": { - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_21": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_3": { - "SIMD": 32, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "SIMD": 32 }, "StreamingFIFO_rtl_22": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_3": { "SIMD": 32, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 32 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_23": { "ram_style": "auto", "depth": 32, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_6": { - "inFIFODepths": [ - 32 - ], - "outFIFODepths": [ - 96 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_24": { "ram_style": "auto", "depth": 96, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_3": { "PE": 1, @@ -522,147 +214,59 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 96 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_25": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_3": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_26": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_3": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_27": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_7": { - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_28": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_4": { - "SIMD": 32, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "SIMD": 32 }, "StreamingFIFO_rtl_29": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_4": { "SIMD": 32, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 32 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_30": { "ram_style": "auto", "depth": 32, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_8": { - "inFIFODepths": [ - 32 - ], - "outFIFODepths": [ - 96 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_31": { "ram_style": "auto", "depth": 96, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_4": { "PE": 1, @@ -670,147 +274,59 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 96 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_32": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_4": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_33": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_4": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_34": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_9": { - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_35": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_5": { - "SIMD": 32, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "SIMD": 32 }, "StreamingFIFO_rtl_36": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_5": { "SIMD": 32, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 32 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_37": { "ram_style": "auto", "depth": 32, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_10": { - "inFIFODepths": [ - 32 - ], - "outFIFODepths": [ - 96 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_38": { "ram_style": "auto", "depth": 96, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_5": { "PE": 1, @@ -818,147 +334,59 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 96 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_39": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_5": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_40": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_5": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_41": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_11": { - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_42": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "FMPadding_rtl_6": { - "SIMD": 32, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "SIMD": 32 }, "StreamingFIFO_rtl_43": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ConvolutionInputGenerator_rtl_6": { "SIMD": 32, "parallel_window": 0, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 32 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_44": { "ram_style": "auto", "depth": 32, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] - }, - "StreamingDataWidthConverter_rtl_12": { - "inFIFODepths": [ - 32 - ], - "outFIFODepths": [ - 96 - ] + "impl_style": "rtl" }, "StreamingFIFO_rtl_45": { "ram_style": "auto", "depth": 96, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_6": { "PE": 1, @@ -966,67 +394,31 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 96 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_46": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_6": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_47": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "StreamingMaxPool_hls_6": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_48": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_7": { "PE": 1, @@ -1034,47 +426,23 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_49": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_7": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_50": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_8": { "PE": 1, @@ -1082,47 +450,23 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_51": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "Thresholding_rtl_8": { "PE": 1, "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ], "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, "StreamingFIFO_rtl_52": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "MVAU_rtl_9": { "PE": 1, @@ -1130,64 +474,28 @@ "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "runtime_writeable_weights": 0 }, "StreamingFIFO_rtl_53": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "ChannelwiseOp_hls_0": { "PE": 1, - "ram_style": "distributed", - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "ram_style": "distributed" }, "StreamingFIFO_rtl_54": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" }, "LabelSelect_hls_0": { - "PE": 1, - "inFIFODepths": [ - 2 - ], - "outFIFODepths": [ - 2 - ] + "PE": 1 }, "StreamingFIFO_rtl_55": { "ram_style": "auto", "depth": 2, - "impl_style": "rtl", - "inFIFODepths": [ - 0 - ], - "outFIFODepths": [ - 0 - ] + "impl_style": "rtl" } } \ No newline at end of file From 8186928fbd7c4307e0b382e8b7a441d261e2a780 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Tue, 23 Apr 2024 11:51:03 +0100 Subject: [PATCH 35/53] [kws build]: add folding config to ensure LUT-based MVUs --- build/kws/build.py | 1 + .../mlp_kws_folding_config.json | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 build/kws/folding_config/mlp_kws_folding_config.json diff --git a/build/kws/build.py b/build/kws/build.py index 8950e7b..4722fc8 100644 --- a/build/kws/build.py +++ b/build/kws/build.py @@ -96,6 +96,7 @@ def step_preprocess(model: ModelWrapper, cfg: DataflowBuildConfig): target_fps=200000, synth_clk_period_ns=10.0, board=platform_name, + folding_config_file="folding_config/mlp_kws_folding_config.json", shell_flow_type=build_cfg.ShellFlowType.VIVADO_ZYNQ, save_intermediate_models=True, stitched_ip_gen_dcp=True, diff --git a/build/kws/folding_config/mlp_kws_folding_config.json b/build/kws/folding_config/mlp_kws_folding_config.json new file mode 100644 index 0000000..40f9771 --- /dev/null +++ b/build/kws/folding_config/mlp_kws_folding_config.json @@ -0,0 +1,39 @@ +{ + "Defaults": {}, + "MVAU_hls_0": { + "PE": 32, + "SIMD": 10, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "MVAU_hls_1": { + "PE": 32, + "SIMD": 8, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "MVAU_hls_2": { + "PE": 32, + "SIMD": 8, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "MVAU_hls_3": { + "PE": 1, + "SIMD": 8, + "ram_style": "auto", + "resType": "lut", + "mem_mode": "internal_decoupled", + "runtime_writeable_weights": 0 + }, + "LabelSelect_hls_0": { + "PE": 1 + } +} + \ No newline at end of file From f8f2192fe3ef493b9eaf7fcaf3696e6e7cfcef43 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Tue, 23 Apr 2024 12:06:36 +0100 Subject: [PATCH 36/53] [kws build]: fixed merge -- removed duplicate folding config --- build/kws/build.py | 1 - .../mlp_kws_folding_config.json | 39 ------------------- 2 files changed, 40 deletions(-) delete mode 100644 build/kws/folding_config/mlp_kws_folding_config.json diff --git a/build/kws/build.py b/build/kws/build.py index 2fbb37e..3a967e3 100644 --- a/build/kws/build.py +++ b/build/kws/build.py @@ -96,7 +96,6 @@ def step_preprocess(model: ModelWrapper, cfg: DataflowBuildConfig): folding_config_file="folding_config/%s_kws_folding_config.json" % platform_name, synth_clk_period_ns=10.0, board=platform_name, - folding_config_file="folding_config/mlp_kws_folding_config.json", shell_flow_type=build_cfg.ShellFlowType.VIVADO_ZYNQ, save_intermediate_models=True, stitched_ip_gen_dcp=True, diff --git a/build/kws/folding_config/mlp_kws_folding_config.json b/build/kws/folding_config/mlp_kws_folding_config.json deleted file mode 100644 index 40f9771..0000000 --- a/build/kws/folding_config/mlp_kws_folding_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Defaults": {}, - "MVAU_hls_0": { - "PE": 32, - "SIMD": 10, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0 - }, - "MVAU_hls_1": { - "PE": 32, - "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0 - }, - "MVAU_hls_2": { - "PE": 32, - "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0 - }, - "MVAU_hls_3": { - "PE": 1, - "SIMD": 8, - "ram_style": "auto", - "resType": "lut", - "mem_mode": "internal_decoupled", - "runtime_writeable_weights": 0 - }, - "LabelSelect_hls_0": { - "PE": 1 - } -} - \ No newline at end of file From 8615318c1e3816cac0c25d5e4fa62af72f44f504 Mon Sep 17 00:00:00 2001 From: aziz bahri Date: Wed, 24 Apr 2024 10:47:11 +0100 Subject: [PATCH 37/53] [RN50] use specialize config Signed-off-by: aziz bahri --- build/resnet50/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build/resnet50/build.py b/build/resnet50/build.py index 43b82ba..f79ccef 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -116,6 +116,7 @@ def platform_to_shell(platform): synth_clk_period_ns=synth_clk_period_ns, board=board, shell_flow_type=build_cfg.ShellFlowType.VITIS_ALVEO, + specialize_layers_config_file="specialize_layers_config.json", vitis_platform=vitis_platform, # throughput parameters (auto-folding) mvau_wwidth_max=24, From c2957414870f5690775d312c5401689d7603658e Mon Sep 17 00:00:00 2001 From: aziz bahri Date: Fri, 26 Apr 2024 10:38:47 +0100 Subject: [PATCH 38/53] [RN50] InferDoublePackedConv is obsolete Signed-off-by: aziz bahri --- build/resnet50/build.py | 6 - build/resnet50/custom_steps.py | 10 - .../folding_config/U250_folding_config.json | 616 ------------------ 3 files changed, 632 deletions(-) delete mode 100644 build/resnet50/folding_config/U250_folding_config.json diff --git a/build/resnet50/build.py b/build/resnet50/build.py index f79ccef..c83ad34 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -102,12 +102,6 @@ def platform_to_shell(platform): platform_dir = "release/%s" % release_platform_name os.makedirs(platform_dir, exist_ok=True) - # try: - # from finnexperimental.transformation.fpgadataflow.infer_doublepacked_dsp import InferDoublePackedConv # noqa: E501 - # folding_config_file="folding_config/U250_folding_config.json" - # print("DoublePackedConv detected") - # except: - # warn(" FINN Experimental not available. Using non-packed folded down convolution. This is 16 times slower per MHz ") # noqa: E501 folding_config_file = "folding_config/U250_folding_config_no_doublepack_pe_folded_16.json" cfg = build_cfg.DataflowBuildConfig( diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index b8121fa..c4f6006 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -191,16 +191,6 @@ def step_resnet50_streamline(model: ModelWrapper, cfg: DataflowBuildConfig): def step_resnet50_convert_to_hls(model: ModelWrapper, cfg: DataflowBuildConfig): model.set_tensor_datatype(model.graph.input[0].name, DataType["UINT8"]) model = model.transform(InferDataLayouts()) - - # try: - # from finnexperimental.transformation.fpgadataflow.infer_doublepacked_dsp import ( - # InferDoublePackedConv, - # ) - - # model = model.transform(InferDoublePackedConv([1])) - # except Exception: - # print(" FINN Experimental not available. Using non-packed convolution ") - model = model.transform(DoubleToSingleFloat()) model = model.transform(InferDataTypes()) model = model.transform(SortGraph()) diff --git a/build/resnet50/folding_config/U250_folding_config.json b/build/resnet50/folding_config/U250_folding_config.json deleted file mode 100644 index 742fe38..0000000 --- a/build/resnet50/folding_config/U250_folding_config.json +++ /dev/null @@ -1,616 +0,0 @@ -{ - "Defaults": { - "outFIFODepths":[[32],"all"], - "inFIFODepths":[[32],"all"], - "mem_mode":["internal_decoupled",["MVAU"]] - }, - "ConvDoublePacked_hls_0": { - "SIMD": 3, - "PE": 64, - "MMV": 16 - }, - "FMPadding_hls_0": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_0": { - "SIMD": 64 - }, - "Pool_hls_0": { - "PE": 64 - }, - "DuplicateStreams_hls_0": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "MVAU_hls_1": { - "PE": 32, - "SIMD": 32 - }, - "MVAU_hls_0": { - "PE": 8, - "SIMD": 32 - }, - "FMPadding_hls_1": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_1": { - "SIMD": 64 - }, - "MVAU_hls_2": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_3": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_0": { - "PE": 32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_0": { - "PE": 32 - }, - "DuplicateStreams_hls_1": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_1": { - "PE": 32 - }, - "Thresholding_hls_2": { - "PE": 32 - }, - "MVAU_hls_4": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_2": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_2": { - "SIMD": 64 - }, - "MVAU_hls_5": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_6": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_1": { - "PE": 32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_3": { - "PE": 32 - }, - "DuplicateStreams_hls_2": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_4": { - "PE": 32 - }, - "Thresholding_hls_5": { - "PE": 32 - }, - "MVAU_hls_7": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_3": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_3": { - "SIMD": 64 - }, - "MVAU_hls_8": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_9": { - "PE": 32, - "SIMD": 64 - }, - "AddStreams_hls_2": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_6": { - "PE": 32 - }, - "Thresholding_hls_7": { - "PE": 32 - }, - "DuplicateStreams_hls_3": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "DownSampler_hls_0": { - "SIMD": 64 - }, - "MVAU_hls_10": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_11": { - "PE": 32, - "SIMD": 64 - }, - "FMPadding_hls_4": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_4": { - "SIMD": 64 - }, - "MVAU_hls_12": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_13": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_3": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_8": { - "PE": 32 - }, - "DuplicateStreams_hls_4": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_9": { - "PE": 32 - }, - "Thresholding_hls_10": { - "PE": 32 - }, - "MVAU_hls_14": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_5": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_5": { - "SIMD": 64 - }, - "MVAU_hls_15": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_16": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_4": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_11": { - "PE": 32 - }, - "DuplicateStreams_hls_5": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_12": { - "PE": 32 - }, - "Thresholding_hls_13": { - "PE": 32 - }, - "MVAU_hls_17": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_6": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_6": { - "SIMD": 64 - }, - "MVAU_hls_18": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_19": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_5": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_14": { - "PE": 32 - }, - "DuplicateStreams_hls_6": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_15": { - "PE": 32 - }, - "Thresholding_hls_16": { - "PE": 32 - }, - "MVAU_hls_20": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_7": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_7": { - "SIMD": 64 - }, - "MVAU_hls_21": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_22": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_6": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_17": { - "PE": 32 - }, - "Thresholding_hls_18": { - "PE": 32 - }, - "DuplicateStreams_hls_7": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "DownSampler_hls_1": { - "SIMD": 64 - }, - "MVAU_hls_23": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_24": { - "PE": 32, - "SIMD": 64 - }, - "FMPadding_hls_8": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_8": { - "SIMD": 64 - }, - "MVAU_hls_25": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_26": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_7": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_19": { - "PE": 32 - }, - "DuplicateStreams_hls_8": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_20": { - "PE": 32 - }, - "Thresholding_hls_21": { - "PE": 32 - }, - "MVAU_hls_27": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_9": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_9": { - "SIMD": 64 - }, - "MVAU_hls_28": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_29": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_8": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_22": { - "PE": 32 - }, - "DuplicateStreams_hls_9": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_23": { - "PE": 32 - }, - "Thresholding_hls_24": { - "PE": 32 - }, - "MVAU_hls_30": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_10": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_10": { - "SIMD": 64 - }, - "MVAU_hls_31": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_32": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_9": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_25": { - "PE": 32 - }, - "DuplicateStreams_hls_10": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_26": { - "PE": 32 - }, - "Thresholding_hls_27": { - "PE": 32 - }, - "MVAU_hls_33": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_11": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_11": { - "SIMD": 64 - }, - "MVAU_hls_34": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_35": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_10": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_28": { - "PE": 32 - }, - "DuplicateStreams_hls_11": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_29": { - "PE": 32 - }, - "Thresholding_hls_30": { - "PE": 32 - }, - "MVAU_hls_36": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_12": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_12": { - "SIMD": 64 - }, - "MVAU_hls_37": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_38": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_11": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_31": { - "PE": 32 - }, - "DuplicateStreams_hls_12": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_32": { - "PE": 32 - }, - "Thresholding_hls_33": { - "PE": 32 - }, - "MVAU_hls_39": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_13": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_13": { - "SIMD": 64 - }, - "MVAU_hls_40": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_41": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_12": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_34": { - "PE": 32 - }, - "Thresholding_hls_35": { - "PE": 32 - }, - "DuplicateStreams_hls_13": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "DownSampler_hls_2": { - "SIMD": 64 - }, - "MVAU_hls_42": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_43": { - "PE": 32, - "SIMD": 64 - }, - "FMPadding_hls_14": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_14": { - "SIMD": 64 - }, - "MVAU_hls_44": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_45": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_13": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_36": { - "PE": 32 - }, - "DuplicateStreams_hls_14": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_37": { - "PE": 32 - }, - "Thresholding_hls_38": { - "PE": 32 - }, - "MVAU_hls_46": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_15": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_15": { - "SIMD": 64 - }, - "MVAU_hls_47": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_48": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_14": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_39": { - "PE": 32 - }, - "DuplicateStreams_hls_15": { - "PE": 32, - "outFIFODepths": [32, 32] - }, - "Thresholding_hls_40": { - "PE": 32 - }, - "Thresholding_hls_41": { - "PE": 32 - }, - "MVAU_hls_49": { - "PE": 32, - "SIMD": 32 - }, - "FMPadding_hls_16": { - "SIMD": 64 - }, - "ConvolutionInputGenerator_hls_16": { - "SIMD": 64 - }, - "MVAU_hls_50": { - "PE": 32, - "SIMD": 64 - }, - "MVAU_hls_51": { - "PE": 32, - "SIMD": 32 - }, - "AddStreams_hls_15": { - "PE":32, - "inFIFODepths": [32, 32] - }, - "Thresholding_hls_42": { - "PE": 32 - }, - - "ConvolutionInputGenerator_hls_17": { - "SIMD": 64 - }, - "Pool_hls_1": { - "PE": 64 - }, - "MVAU_hls_52": { - "PE": 1, - "SIMD": 64, - "mem_mode" : "external" - }, - "LabelSelect_hls_0": { - "outputDataType":"UINT16", - "PE": 1 - }, - "ChannelwiseOp_hls_0": { - "PE": 32 - }, - "ChannelwiseOp_hls_1": { - "PE": 32 - }, - "ChannelwiseOp_hls_2": { - "PE": 1 - } -} From bb6a68c5eea579c6f02f85b3eabbe5e59f3c8827 Mon Sep 17 00:00:00 2001 From: aziz bahri Date: Fri, 26 Apr 2024 14:10:55 +0100 Subject: [PATCH 39/53] [RN50]: use standard set fifo depth Signed-off-by: aziz bahri --- build/resnet50/build.py | 8 ++-- build/resnet50/custom_steps.py | 83 +++++----------------------------- 2 files changed, 16 insertions(+), 75 deletions(-) diff --git a/build/resnet50/build.py b/build/resnet50/build.py index c83ad34..6688aed 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -38,8 +38,7 @@ from custom_steps import ( step_resnet50_tidy, step_resnet50_streamline, - step_resnet50_convert_to_hls, - step_resnet50_set_fifo_depths, + step_resnet50_convert_to_hw, step_resnet50_slr_floorplan, ) @@ -52,7 +51,7 @@ resnet50_build_steps = [ step_resnet50_tidy, step_resnet50_streamline, - step_resnet50_convert_to_hls, + step_resnet50_convert_to_hw, "step_create_dataflow_partition", "step_specialize_layers", "step_apply_folding_config", @@ -60,7 +59,7 @@ "step_generate_estimate_reports", "step_hw_codegen", "step_hw_ipgen", - step_resnet50_set_fifo_depths, + "step_set_fifo_depths", step_resnet50_slr_floorplan, "step_synthesize_bitfile", "step_make_pynq_driver", @@ -110,6 +109,7 @@ def platform_to_shell(platform): synth_clk_period_ns=synth_clk_period_ns, board=board, shell_flow_type=build_cfg.ShellFlowType.VITIS_ALVEO, + split_large_fifos=True, specialize_layers_config_file="specialize_layers_config.json", vitis_platform=vitis_platform, # throughput parameters (auto-folding) diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index c4f6006..f8662b4 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -87,7 +87,7 @@ from qonnx.transformation.infer_datatypes import InferDataTypes from qonnx.transformation.infer_data_layouts import InferDataLayouts from qonnx.transformation.insert_topk import InsertTopK -import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hls +import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hw from qonnx.transformation.lower_convs_to_matmul import LowerConvsToMatMul from finn.builder.build_dataflow_config import ( @@ -188,28 +188,28 @@ def step_resnet50_streamline(model: ModelWrapper, cfg: DataflowBuildConfig): return model -def step_resnet50_convert_to_hls(model: ModelWrapper, cfg: DataflowBuildConfig): +def step_resnet50_convert_to_hw(model: ModelWrapper, cfg: DataflowBuildConfig): model.set_tensor_datatype(model.graph.input[0].name, DataType["UINT8"]) model = model.transform(InferDataLayouts()) model = model.transform(DoubleToSingleFloat()) model = model.transform(InferDataTypes()) model = model.transform(SortGraph()) - to_hls_transformations = [ - to_hls.InferAddStreamsLayer, + to_hw_transformations = [ + to_hw.InferAddStreamsLayer, LowerConvsToMatMul, - to_hls.InferChannelwiseLinearLayer, - to_hls.InferPool, + to_hw.InferChannelwiseLinearLayer, + to_hw.InferPool, AbsorbTransposeIntoMultiThreshold, RoundAndClipThresholds, - to_hls.InferQuantizedMatrixVectorActivation, - to_hls.InferThresholdingLayer, + to_hw.InferQuantizedMatrixVectorActivation, + to_hw.InferThresholdingLayer, AbsorbConsecutiveTransposes, - to_hls.InferConvInpGen, - to_hls.InferDuplicateStreamsLayer, - to_hls.InferLabelSelectLayer, + to_hw.InferConvInpGen, + to_hw.InferDuplicateStreamsLayer, + to_hw.InferLabelSelectLayer, ] - for trn in to_hls_transformations: + for trn in to_hw_transformations: model = model.transform(trn()) model = model.transform(InferDataLayouts()) model = model.transform(GiveUniqueNodeNames()) @@ -222,65 +222,6 @@ def step_resnet50_convert_to_hls(model: ModelWrapper, cfg: DataflowBuildConfig): return model - -def step_resnet50_set_fifo_depths(model: ModelWrapper, cfg: DataflowBuildConfig): - """ - Depending on the auto_fifo_depths setting, do one of the following: - * if auto_fifo_depths=True: Run the `InsertAndSetFIFODepths` transformation - to attempt to determine the FIFO sizes that provide full throughput. Involves - running stitched-IP rtlsim and may take a long time. - * if auto_fifo_depths=False: Assume the folding config file contains FIFO - sizes as well. Runs the `InsertFIFO` transformation, then - `ApplyConfig(cfg.folding_config_file)`, and finally `RemoveShallowFIFOs`. - Coherency with config file node naming is ensured by calling - `GiveUniqueNodeNames`. - """ - - if cfg.auto_fifo_depths: - model = model.transform( - InsertAndSetFIFODepths( - cfg._resolve_fpga_part(), - cfg._resolve_hls_clk_period(), - vivado_ram_style=cfg.large_fifo_mem_style.value, - ) - ) - else: - # assume folding cfg json contains FIFO sizes too - # insert DWCs, FIFOs and run ApplyConfig once more - model = model.transform(InsertDWC()) - # need to make sure all FIFOs are created so that their depth can be - # set by ApplyConfig, so create_shallow_fifos=True - model = model.transform(InsertFIFO(create_shallow_fifos=True)) - model = model.transform(GiveUniqueNodeNames()) - model = model.transform(GiveReadableTensorNames()) - if cfg.folding_config_file is not None: - model = model.transform(ApplyConfig(cfg.folding_config_file)) - # split large FIFOs into multiple FIFOs - model = model.transform(SplitLargeFIFOs()) - # remove any shallow FIFOs - model = model.transform(RemoveShallowFIFOs()) - - # extract the final configuration and save it as json - hw_attrs = [ - "PE", - "SIMD", - "ram_style", - "depth", - "impl_style", - "resType", - "mem_mode", - "runtime_writeable_weights", - ] - extract_model_config_to_json(model, cfg.output_dir + "/final_hw_config.json", hw_attrs) - - # after FIFOs are ready to go, call PrepareIP and HLSSynthIP again - # this will only run for the new nodes (e.g. FIFOs and DWCs) - model = model.transform(PrepareIP(cfg._resolve_fpga_part(), cfg._resolve_hls_clk_period())) - model = model.transform(HLSSynthIP()) - model = model.transform(ReplaceVerilogRelPaths()) - return model - - def step_resnet50_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): if cfg.shell_flow_type == ShellFlowType.VITIS_ALVEO: try: From b6b52f97927f67da6c7bf4c6b2366db2755f6e15 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Fri, 26 Apr 2024 17:27:26 +0100 Subject: [PATCH 40/53] [build]: removed OOC synthesis result and specialize_layer config file --- build/vgg10-radioml/build.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/build/vgg10-radioml/build.py b/build/vgg10-radioml/build.py index 53e1fc7..c871482 100755 --- a/build/vgg10-radioml/build.py +++ b/build/vgg10-radioml/build.py @@ -110,8 +110,6 @@ def select_build_steps(platform): shell_flow_type=shell_flow_type, vitis_platform=vitis_platform, folding_config_file="folding_config/%s_folding_config.json" % platform_name, - specialize_layers_config_file="specialize_layers_config.json", - auto_fifo_depths=False, split_large_fifos = True, standalone_thresholds=True, # enable extra performance optimizations (physopt) @@ -119,7 +117,6 @@ def select_build_steps(platform): generate_outputs=[ build_cfg.DataflowOutputType.ESTIMATE_REPORTS, build_cfg.DataflowOutputType.STITCHED_IP, - # build_cfg.DataflowOutputType.OOC_SYNTH, # build_cfg.DataflowOutputType.RTLSIM_PERFORMANCE, build_cfg.DataflowOutputType.BITFILE, build_cfg.DataflowOutputType.DEPLOYMENT_PACKAGE, From 590901eaebe83e8489a20f0326efbe4fc2d5ba35 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Fri, 26 Apr 2024 17:28:00 +0100 Subject: [PATCH 41/53] [folding]: updated folding config --- .../folding_config/ZCU104_folding_config.json | 358 ++---------------- 1 file changed, 39 insertions(+), 319 deletions(-) diff --git a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json index 43fab2a..5c4a4b4 100755 --- a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json +++ b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json @@ -1,501 +1,221 @@ { "Defaults": {}, - "StreamingFIFO_rtl_0": { - "ram_style": "auto", - "depth": 339, - "impl_style": "rtl" - }, "FMPadding_rtl_0": { "SIMD": 2 }, - "StreamingFIFO_rtl_1": { - "ram_style": "auto", - "depth": 1026, - "impl_style": "rtl" - }, "ConvolutionInputGenerator_rtl_0": { "SIMD": 2, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_2": { - "ram_style": "auto", - "depth": 3071, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_3": { - "ram_style": "auto", - "depth": 6144, - "impl_style": "rtl" - }, "MVAU_rtl_0": { - "PE": 1, - "SIMD": 1, + "PE": 16, + "SIMD": 6, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_4": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_0": { - "PE": 1, + "PE": 16, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_5": { - "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_0": { - "PE": 1 - }, - "StreamingFIFO_rtl_6": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_7": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "PE": 16 }, "FMPadding_rtl_1": { - "SIMD": 32 - }, - "StreamingFIFO_rtl_8": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "SIMD": 16 }, "ConvolutionInputGenerator_rtl_1": { - "SIMD": 32, + "SIMD": 16, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_9": { - "ram_style": "auto", - "depth": 1151, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_10": { - "ram_style": "auto", - "depth": 49152, - "impl_style": "rtl" - }, "MVAU_rtl_1": { - "PE": 1, - "SIMD": 1, + "PE": 16, + "SIMD": 48, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_11": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_1": { - "PE": 1, + "PE": 8, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_12": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_1": { - "PE": 1 - }, - "StreamingFIFO_rtl_13": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_14": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "PE": 8 }, "FMPadding_rtl_2": { - "SIMD": 32 - }, - "StreamingFIFO_rtl_15": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "SIMD": 8 }, "ConvolutionInputGenerator_rtl_2": { - "SIMD": 32, + "SIMD": 8, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_16": { - "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_17": { - "ram_style": "auto", - "depth": 96, - "impl_style": "rtl" - }, "MVAU_rtl_2": { - "PE": 1, - "SIMD": 1, + "PE": 8, + "SIMD": 48, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_18": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_2": { - "PE": 1, + "PE": 4, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_19": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_2": { - "PE": 1 - }, - "StreamingFIFO_rtl_20": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_21": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "PE": 4 }, "FMPadding_rtl_3": { - "SIMD": 32 - }, - "StreamingFIFO_rtl_22": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "SIMD": 4 }, "ConvolutionInputGenerator_rtl_3": { - "SIMD": 32, + "SIMD": 4, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_23": { - "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_24": { - "ram_style": "auto", - "depth": 96, - "impl_style": "rtl" - }, "MVAU_rtl_3": { - "PE": 1, - "SIMD": 1, + "PE": 8, + "SIMD": 24, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_25": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_3": { - "PE": 1, + "PE": 2, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_26": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_3": { - "PE": 1 - }, - "StreamingFIFO_rtl_27": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_28": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "PE": 2 }, "FMPadding_rtl_4": { - "SIMD": 32 - }, - "StreamingFIFO_rtl_29": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "SIMD": 2 }, "ConvolutionInputGenerator_rtl_4": { - "SIMD": 32, + "SIMD": 2, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_30": { - "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_31": { - "ram_style": "auto", - "depth": 96, - "impl_style": "rtl" - }, "MVAU_rtl_4": { - "PE": 1, - "SIMD": 1, + "PE": 4, + "SIMD": 24, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_32": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_4": { "PE": 1, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_33": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_4": { "PE": 1 }, - "StreamingFIFO_rtl_34": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_35": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "FMPadding_rtl_5": { - "SIMD": 32 - }, - "StreamingFIFO_rtl_36": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "SIMD": 1 }, "ConvolutionInputGenerator_rtl_5": { - "SIMD": 32, + "SIMD": 1, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_37": { - "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_38": { - "ram_style": "auto", - "depth": 96, - "impl_style": "rtl" - }, "MVAU_rtl_5": { - "PE": 1, - "SIMD": 1, + "PE": 4, + "SIMD": 12, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_39": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_5": { "PE": 1, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_40": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_5": { "PE": 1 }, - "StreamingFIFO_rtl_41": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_42": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "FMPadding_rtl_6": { - "SIMD": 32 - }, - "StreamingFIFO_rtl_43": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" + "SIMD": 1 }, "ConvolutionInputGenerator_rtl_6": { - "SIMD": 32, + "SIMD": 1, "parallel_window": 0, "ram_style": "distributed" }, - "StreamingFIFO_rtl_44": { - "ram_style": "auto", - "depth": 32, - "impl_style": "rtl" - }, - "StreamingFIFO_rtl_45": { - "ram_style": "auto", - "depth": 96, - "impl_style": "rtl" - }, "MVAU_rtl_6": { - "PE": 1, - "SIMD": 1, + "PE": 4, + "SIMD": 6, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_46": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_6": { "PE": 1, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_47": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "StreamingMaxPool_hls_6": { "PE": 1 }, - "StreamingFIFO_rtl_48": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "MVAU_rtl_7": { - "PE": 1, - "SIMD": 1, + "PE": 4, + "SIMD": 4, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_49": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_7": { "PE": 1, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_50": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "MVAU_rtl_8": { - "PE": 1, - "SIMD": 1, + "PE": 4, + "SIMD": 2, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_51": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "Thresholding_rtl_8": { "PE": 1, "runtime_writeable_weights": 0, "depth_trigger_uram": 0, "depth_trigger_bram": 0 }, - "StreamingFIFO_rtl_52": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "MVAU_rtl_9": { - "PE": 1, + "PE": 4, "SIMD": 1, "ram_style": "auto", "resType": "auto", "mem_mode": "internal_decoupled", "runtime_writeable_weights": 0 }, - "StreamingFIFO_rtl_53": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "ChannelwiseOp_hls_0": { "PE": 1, "ram_style": "distributed" }, - "StreamingFIFO_rtl_54": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" - }, "LabelSelect_hls_0": { "PE": 1 - }, - "StreamingFIFO_rtl_55": { - "ram_style": "auto", - "depth": 2, - "impl_style": "rtl" } } \ No newline at end of file From 0d685df84e312ac58329292726bff5c81526ac70 Mon Sep 17 00:00:00 2001 From: auphelia Date: Tue, 30 Apr 2024 12:42:10 +0100 Subject: [PATCH 42/53] [GTSRB] Add README and rename notebook --- build/gtsrb/README.md | 26 +++++++++++++++++++ ...=> 7_traffic_sign_recognition_gtsrb.ipynb} | 0 2 files changed, 26 insertions(+) create mode 100644 build/gtsrb/README.md rename finn_examples/notebooks/{6_traffic_sign_recognition_gtsrb.ipynb => 7_traffic_sign_recognition_gtsrb.ipynb} (100%) diff --git a/build/gtsrb/README.md b/build/gtsrb/README.md new file mode 100644 index 0000000..0d12d1b --- /dev/null +++ b/build/gtsrb/README.md @@ -0,0 +1,26 @@ +# Brevitas GTSRB example + +This is the binarized CNV topology from the paper [FINN: A Framework for Fast, Scalable Binarized Neural Network Inference](https://arxiv.org/abs/1612.07119) which is trained +on the [German Traffic Sign Recognition Benchmark (GTSRB)](https://benchmark.ini.rub.de/gtsrb_news.html) dataset. + +## Build bitfiles for GTSRB + +0. Ensure you have performed the *Setup* steps in the top-level README for setting up the FINN requirements and environment variables. + +1. Run the `download-model.sh` script under the `models` directory to download the pretrained QONNX model. You should have e.g. `gtsrb/models/cnv_1w1a_gtsrb.onnx` as a result. + +2. Launch the build as follows: +```SHELL +# update this according to where you cloned this repo: +FINN_EXAMPLES=/path/to/finn-examples +# cd into finn submodule +cd $FINN_EXAMPLES/build/finn +# launch the build on the gtsrb folder +./run-docker.sh build_custom $FINN_EXAMPLES/build/gtsrb +``` + +5. The generated outputs will be under `gtsrb/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). + +## Where did the ONNX model files come from? + +The model is part of the QONNX model zoo and gets directly downloaded from [here](https://github.com/fastmachinelearning/qonnx_model_zoo/tree/feature/gtsrb_cnv/models/GTSRB/Brevitas_CNV1W1A). diff --git a/finn_examples/notebooks/6_traffic_sign_recognition_gtsrb.ipynb b/finn_examples/notebooks/7_traffic_sign_recognition_gtsrb.ipynb similarity index 100% rename from finn_examples/notebooks/6_traffic_sign_recognition_gtsrb.ipynb rename to finn_examples/notebooks/7_traffic_sign_recognition_gtsrb.ipynb From e0f4bb30ea58bdde8ac6e6c7699e80652a6a4f1e Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 10:26:06 +0100 Subject: [PATCH 43/53] [GTSRB+VGG] Cleanup readme for build --- build/gtsrb/README.md | 4 ++-- build/vgg10-radioml/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/gtsrb/README.md b/build/gtsrb/README.md index 0d12d1b..f5179a1 100644 --- a/build/gtsrb/README.md +++ b/build/gtsrb/README.md @@ -7,7 +7,7 @@ on the [German Traffic Sign Recognition Benchmark (GTSRB)](https://benchmark.ini 0. Ensure you have performed the *Setup* steps in the top-level README for setting up the FINN requirements and environment variables. -1. Run the `download-model.sh` script under the `models` directory to download the pretrained QONNX model. You should have e.g. `gtsrb/models/cnv_1w1a_gtsrb.onnx` as a result. +1. Run the `download-model.sh` script under the `models` directory to download the pretrained QONNX model. You should have `gtsrb/models/cnv_1w1a_gtsrb.onnx` as a result. 2. Launch the build as follows: ```SHELL @@ -19,7 +19,7 @@ cd $FINN_EXAMPLES/build/finn ./run-docker.sh build_custom $FINN_EXAMPLES/build/gtsrb ``` -5. The generated outputs will be under `gtsrb/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). +3. The generated outputs will be under `gtsrb/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). ## Where did the ONNX model files come from? diff --git a/build/vgg10-radioml/README.md b/build/vgg10-radioml/README.md index 17a4524..18df19d 100755 --- a/build/vgg10-radioml/README.md +++ b/build/vgg10-radioml/README.md @@ -12,7 +12,7 @@ Due to the 1-dimensional topology in VGG10 we use a specialized build script tha 0. Ensure you have performed the *Setup* steps in the top-level README for setting up the FINN requirements and environment variables. -1. Run the `download_vgg10.sh` script under the `models` directory to download the pretrained VGG10 ONNX model. You should have e.g. `vgg10-radioml/models/radioml_w4a4_small_tidy.onnx` as a result. +1. Run the `download_vgg10.sh` script under the `models` directory to download the pretrained VGG10 ONNX model. You should have `vgg10-radioml/models/radioml_w4a4_small_tidy.onnx` as a result. 2. Launch the build as follows: ```SHELL @@ -24,7 +24,7 @@ cd $FINN_EXAMPLES/build/finn ./run-docker.sh build_custom $FINN_EXAMPLES/build/vgg10 ``` -5. The generated outputs will be under `vgg10-radioml/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). +3. The generated outputs will be under `vgg10-radioml/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). ## Where did the ONNX model files come from? From c670721fd4a4c2015f8ae55958314a0d12aa27f8 Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 10:52:10 +0100 Subject: [PATCH 44/53] Run pre-commit --- build/bnn-pynq/specialize_layers_config.json | 2 +- build/gtsrb/models/download-model.sh | 2 +- build/resnet50/custom_steps.py | 19 +++---------------- build/resnet50/specialize_layers_config.json | 2 +- build/vgg10-radioml/build.py | 2 +- .../folding_config/ZCU104_folding_config.json | 2 +- .../specialize_layers_config.json | 2 +- finn_examples/models.py | 5 ++++- 8 files changed, 13 insertions(+), 23 deletions(-) diff --git a/build/bnn-pynq/specialize_layers_config.json b/build/bnn-pynq/specialize_layers_config.json index 65d09a3..a2f5033 100644 --- a/build/bnn-pynq/specialize_layers_config.json +++ b/build/bnn-pynq/specialize_layers_config.json @@ -57,4 +57,4 @@ "LabelSelect_0": { "preferred_impl_style": "hls" } -} \ No newline at end of file +} diff --git a/build/gtsrb/models/download-model.sh b/build/gtsrb/models/download-model.sh index 79359df..b4b07c6 100755 --- a/build/gtsrb/models/download-model.sh +++ b/build/gtsrb/models/download-model.sh @@ -1,2 +1,2 @@ #!/bin/bash -wget https://github.com/fastmachinelearning/qonnx_model_zoo/raw/feature/gtsrb_cnv/models/GTSRB/Brevitas_CNV1W1A/cnv_1w1a_gtsrb.onnx \ No newline at end of file +wget https://github.com/fastmachinelearning/qonnx_model_zoo/raw/feature/gtsrb_cnv/models/GTSRB/Brevitas_CNV1W1A/cnv_1w1a_gtsrb.onnx diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index f8662b4..5e59514 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -1,4 +1,5 @@ -# Copyright (c) 2020, Xilinx +# Copyright (C) 2020-2022, Xilinx, Inc. +# Copyright (C) 2022-2024, Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -95,23 +96,8 @@ ShellFlowType, ) -from finn.transformation.fpgadataflow.prepare_ip import PrepareIP -from finn.transformation.fpgadataflow.hlssynth_ip import HLSSynthIP -from finn.transformation.fpgadataflow.replace_verilog_relpaths import ( - ReplaceVerilogRelPaths, -) - from finn.transformation.move_reshape import RemoveCNVtoFCFlatten -from qonnx.util.config import extract_model_config_to_json -from finn.transformation.fpgadataflow.set_fifo_depths import ( - InsertAndSetFIFODepths, - RemoveShallowFIFOs, - SplitLargeFIFOs, -) -from finn.transformation.fpgadataflow.insert_dwc import InsertDWC -from finn.transformation.fpgadataflow.insert_fifo import InsertFIFO - def step_resnet50_tidy(model: ModelWrapper, cfg: DataflowBuildConfig): model = model.transform(GiveUniqueParameterTensors()) @@ -222,6 +208,7 @@ def step_resnet50_convert_to_hw(model: ModelWrapper, cfg: DataflowBuildConfig): return model + def step_resnet50_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): if cfg.shell_flow_type == ShellFlowType.VITIS_ALVEO: try: diff --git a/build/resnet50/specialize_layers_config.json b/build/resnet50/specialize_layers_config.json index a3cc5e6..2fb4afe 100644 --- a/build/resnet50/specialize_layers_config.json +++ b/build/resnet50/specialize_layers_config.json @@ -525,4 +525,4 @@ "LabelSelect_0": { "preferred_impl_style": "hls" } -} \ No newline at end of file +} diff --git a/build/vgg10-radioml/build.py b/build/vgg10-radioml/build.py index c871482..0567763 100755 --- a/build/vgg10-radioml/build.py +++ b/build/vgg10-radioml/build.py @@ -110,7 +110,7 @@ def select_build_steps(platform): shell_flow_type=shell_flow_type, vitis_platform=vitis_platform, folding_config_file="folding_config/%s_folding_config.json" % platform_name, - split_large_fifos = True, + split_large_fifos=True, standalone_thresholds=True, # enable extra performance optimizations (physopt) vitis_opt_strategy=build_cfg.VitisOptStrategyCfg.PERFORMANCE_BEST, diff --git a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json index 5c4a4b4..44fced1 100755 --- a/build/vgg10-radioml/folding_config/ZCU104_folding_config.json +++ b/build/vgg10-radioml/folding_config/ZCU104_folding_config.json @@ -218,4 +218,4 @@ "LabelSelect_hls_0": { "PE": 1 } -} \ No newline at end of file +} diff --git a/build/vgg10-radioml/specialize_layers_config.json b/build/vgg10-radioml/specialize_layers_config.json index 386425c..04279b2 100644 --- a/build/vgg10-radioml/specialize_layers_config.json +++ b/build/vgg10-radioml/specialize_layers_config.json @@ -126,4 +126,4 @@ "LabelSelect_0": { "preferred_impl_style": "hls" } -} \ No newline at end of file +} diff --git a/finn_examples/models.py b/finn_examples/models.py index c22e190..3411f7b 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -363,6 +363,7 @@ def resnet50_w1a2_imagenet(target_platform=None): runtime_weight_dir=runtime_weight_dir, ) + def vgg10_w4a4_radioml(target_platform=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() @@ -376,6 +377,7 @@ def vgg10_w4a4_radioml(target_platform=None): fclk_mhz=fclk_mhz, ) + def mlp_w2a2_unsw_nb15(target_platform=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() @@ -386,9 +388,10 @@ def mlp_w2a2_unsw_nb15(target_platform=None): filename, driver_mode, _unsw_nb15_mlp_io_shape_dict, fclk_mhz=fclk_mhz ) + def cnv_w1a1_gtsrb(target_platform=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "cnv-gtsrb-w1a1" filename = find_bitfile(model_name, target_platform) - return FINNExampleOverlay(filename, driver_mode, _gtsrb_cnv_io_shape_dict) \ No newline at end of file + return FINNExampleOverlay(filename, driver_mode, _gtsrb_cnv_io_shape_dict) From 7072f8f2ab441d8943c5606041c21849480f2605 Mon Sep 17 00:00:00 2001 From: mmrahorovic Date: Fri, 3 May 2024 10:54:38 +0100 Subject: [PATCH 45/53] [models]: add argument to provide path to bitfile --- finn_examples/models.py | 91 +++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/finn_examples/models.py b/finn_examples/models.py index c22e190..dfc7dcd 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -190,24 +190,27 @@ def get_edge_or_pcie(): raise OSError("Platform is not supported.") -def find_bitfile(model_name, target_platform): - bitfile_exts = {"edge": "bit", "pcie": "xclbin"} - bitfile_ext = bitfile_exts[get_edge_or_pcie()] - bitfile_name = "%s.%s" % (model_name, bitfile_ext) - bitfile_candidates = [ - pk.resource_filename("finn_examples", "bitfiles/%s/%s" % (target_platform, bitfile_name)), - pk.resource_filename( - "finn_examples", - "bitfiles/bitfiles.zip.d/%s/%s" % (target_platform, bitfile_name), - ), - ] - for candidate in bitfile_candidates: - if os.path.isfile(candidate): - return candidate - raise Exception( - "Bitfile for model = %s target platform = %s not found. Looked in: %s" - % (model_name, target_platform, str(bitfile_candidates)) - ) +def find_bitfile(model_name, target_platform, bitfile_path): + if bitfile_path is not None: + return bitfile_path + else: + bitfile_exts = {"edge": "bit", "pcie": "xclbin"} + bitfile_ext = bitfile_exts[get_edge_or_pcie()] + bitfile_name = "%s.%s" % (model_name, bitfile_ext) + bitfile_candidates = [ + pk.resource_filename("finn_examples", "bitfiles/%s/%s" % (target_platform, bitfile_name)), + pk.resource_filename( + "finn_examples", + "bitfiles/bitfiles.zip.d/%s/%s" % (target_platform, bitfile_name), + ), + ] + for candidate in bitfile_candidates: + if os.path.isfile(candidate): + return candidate + raise Exception( + "Bitfile for model = %s target platform = %s not found. Looked in: %s" + % (model_name, target_platform, str(bitfile_candidates)) + ) def find_runtime_weights(model_name, target_platform): @@ -266,75 +269,75 @@ def resolve_target_platform(target_platform): return check_platform_is_valid(platform) -def kws_mlp(target_platform=None): +def kws_mlp(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "kwsmlp-w3a3" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _gscv2_mlp_io_shape_dict) -def tfc_w1a1_mnist(target_platform=None): +def tfc_w1a1_mnist(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "tfc-w1a1" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _mnist_fc_io_shape_dict) -def tfc_w1a2_mnist(target_platform=None): +def tfc_w1a2_mnist(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "tfc-w1a2" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _mnist_fc_io_shape_dict) -def tfc_w2a2_mnist(target_platform=None): +def tfc_w2a2_mnist(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "tfc-w2a2" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _mnist_fc_io_shape_dict) -def cnv_w1a1_cifar10(target_platform=None): +def cnv_w1a1_cifar10(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "cnv-w1a1" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _cifar10_cnv_io_shape_dict) -def cnv_w1a2_cifar10(target_platform=None): +def cnv_w1a2_cifar10(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "cnv-w1a2" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _cifar10_cnv_io_shape_dict) -def cnv_w2a2_cifar10(target_platform=None): +def cnv_w2a2_cifar10(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "cnv-w2a2" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _cifar10_cnv_io_shape_dict) -def bincop_cnv(target_platform=None): +def bincop_cnv(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "bincop-cnv" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _bincop_cnv_io_shape_dict) -def mobilenetv1_w4a4_imagenet(target_platform=None): +def mobilenetv1_w4a4_imagenet(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "mobilenetv1-w4a4" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) if target_platform in ["ZCU104"]: runtime_weight_dir = find_runtime_weights(model_name, target_platform) else: @@ -350,11 +353,11 @@ def mobilenetv1_w4a4_imagenet(target_platform=None): ) -def resnet50_w1a2_imagenet(target_platform=None): +def resnet50_w1a2_imagenet(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "resnet50-w1a2" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) runtime_weight_dir = find_runtime_weights(model_name, target_platform) return FINNExampleOverlay( filename, @@ -363,11 +366,11 @@ def resnet50_w1a2_imagenet(target_platform=None): runtime_weight_dir=runtime_weight_dir, ) -def vgg10_w4a4_radioml(target_platform=None): +def vgg10_w4a4_radioml(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "radioml_w4a4_small_tidy" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) fclk_mhz = 250.0 return FINNExampleOverlay( filename, @@ -376,19 +379,19 @@ def vgg10_w4a4_radioml(target_platform=None): fclk_mhz=fclk_mhz, ) -def mlp_w2a2_unsw_nb15(target_platform=None): +def mlp_w2a2_unsw_nb15(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "unsw_nb15-mlp-w2a2" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) fclk_mhz = 100.0 return FINNExampleOverlay( filename, driver_mode, _unsw_nb15_mlp_io_shape_dict, fclk_mhz=fclk_mhz ) -def cnv_w1a1_gtsrb(target_platform=None): +def cnv_w1a1_gtsrb(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() model_name = "cnv-gtsrb-w1a1" - filename = find_bitfile(model_name, target_platform) + filename = find_bitfile(model_name, target_platform, bitfile_path) return FINNExampleOverlay(filename, driver_mode, _gtsrb_cnv_io_shape_dict) \ No newline at end of file From 1e947f815dadf3019e1bee70dd4ed3b58d8bc700 Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 11:00:10 +0100 Subject: [PATCH 46/53] Run pre-commit --- finn_examples/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/finn_examples/models.py b/finn_examples/models.py index ce9dd9b..bcacabf 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -198,7 +198,9 @@ def find_bitfile(model_name, target_platform, bitfile_path): bitfile_ext = bitfile_exts[get_edge_or_pcie()] bitfile_name = "%s.%s" % (model_name, bitfile_ext) bitfile_candidates = [ - pk.resource_filename("finn_examples", "bitfiles/%s/%s" % (target_platform, bitfile_name)), + pk.resource_filename( + "finn_examples", "bitfiles/%s/%s" % (target_platform, bitfile_name) + ), pk.resource_filename( "finn_examples", "bitfiles/bitfiles.zip.d/%s/%s" % (target_platform, bitfile_name), @@ -366,6 +368,7 @@ def resnet50_w1a2_imagenet(target_platform=None, bitfile_path=None): runtime_weight_dir=runtime_weight_dir, ) + def vgg10_w4a4_radioml(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() @@ -379,6 +382,7 @@ def vgg10_w4a4_radioml(target_platform=None, bitfile_path=None): fclk_mhz=fclk_mhz, ) + def mlp_w2a2_unsw_nb15(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() @@ -389,6 +393,7 @@ def mlp_w2a2_unsw_nb15(target_platform=None, bitfile_path=None): filename, driver_mode, _unsw_nb15_mlp_io_shape_dict, fclk_mhz=fclk_mhz ) + def cnv_w1a1_gtsrb(target_platform=None, bitfile_path=None): target_platform = resolve_target_platform(target_platform) driver_mode = get_driver_mode() From 4d49e567290d3ae91314bb43ff8b5dfc08947801 Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 11:09:13 +0100 Subject: [PATCH 47/53] [NBs] Cleanup notebooks --- .../notebooks/2_imagenet_with_cnns.ipynb | 41 +--- .../notebooks/4_keyword_spotting.ipynb | 4 +- .../7_traffic_sign_recognition_gtsrb.ipynb | 207 ++---------------- 3 files changed, 26 insertions(+), 226 deletions(-) diff --git a/finn_examples/notebooks/2_imagenet_with_cnns.ipynb b/finn_examples/notebooks/2_imagenet_with_cnns.ipynb index a30607e..3ed5f3d 100755 --- a/finn_examples/notebooks/2_imagenet_with_cnns.ipynb +++ b/finn_examples/notebooks/2_imagenet_with_cnns.ipynb @@ -21,46 +21,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/javascript": [ - "\n", - "try {\n", - "require(['notebook/js/codecell'], function(codecell) {\n", - " codecell.CodeCell.options_default.highlight_modes[\n", - " 'magic_text/x-csrc'] = {'reg':[/^%%microblaze/]};\n", - " Jupyter.notebook.events.one('kernel_ready.Kernel', function(){\n", - " Jupyter.notebook.get_cells().map(function(cell){\n", - " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", - " });\n", - "});\n", - "} catch (e) {};\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": [ - "\n", - "try {\n", - "require(['notebook/js/codecell'], function(codecell) {\n", - " codecell.CodeCell.options_default.highlight_modes[\n", - " 'magic_text/x-csrc'] = {'reg':[/^%%pybind11/]};\n", - " Jupyter.notebook.events.one('kernel_ready.Kernel', function(){\n", - " Jupyter.notebook.get_cells().map(function(cell){\n", - " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", - " });\n", - "});\n", - "} catch (e) {};\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "#mobilenetv1_w4a4 is available on U250 and ZCU104\n", "accel = models.mobilenetv1_w4a4_imagenet()\n", diff --git a/finn_examples/notebooks/4_keyword_spotting.ipynb b/finn_examples/notebooks/4_keyword_spotting.ipynb index 914b372..7f903b0 100644 --- a/finn_examples/notebooks/4_keyword_spotting.ipynb +++ b/finn_examples/notebooks/4_keyword_spotting.ipynb @@ -18,7 +18,7 @@ "\n", "\n", "\n", - "A more in-depth explenation of MFCC features can be found on wikipedia: https://en.wikipedia.org/wiki/Mel-frequency_cepstrum\n", + "A more in-depth explanation of MFCC features can be found on wikipedia: https://en.wikipedia.org/wiki/Mel-frequency_cepstrum\n", "\n", "For this concrete case we used the python library [python_speech_features](https://github.com/jameslyons/python_speech_features) to produce these features.\n", "\n", @@ -194,7 +194,7 @@ "### Using the built-in performance benchmark\n", "\n", "To measure the performance of indivudual components of the PYNQ stack and the FINN accelerator on the FPGA,\n", - "FINN comes with a buit-in benchmark. This benchmark computes the throughput of the FINN accelerator as seen on the FPGA." + "FINN comes with a built-in benchmark. This benchmark computes the throughput of the FINN accelerator as seen on the FPGA." ] }, { diff --git a/finn_examples/notebooks/7_traffic_sign_recognition_gtsrb.ipynb b/finn_examples/notebooks/7_traffic_sign_recognition_gtsrb.ipynb index f512b3e..8d938d5 100644 --- a/finn_examples/notebooks/7_traffic_sign_recognition_gtsrb.ipynb +++ b/finn_examples/notebooks/7_traffic_sign_recognition_gtsrb.ipynb @@ -9,48 +9,9 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/javascript": [ - "\n", - "try {\n", - "require(['notebook/js/codecell'], function(codecell) {\n", - " codecell.CodeCell.options_default.highlight_modes[\n", - " 'magic_text/x-csrc'] = {'reg':[/^%%microblaze/]};\n", - " Jupyter.notebook.events.one('kernel_ready.Kernel', function(){\n", - " Jupyter.notebook.get_cells().map(function(cell){\n", - " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", - " });\n", - "});\n", - "} catch (e) {};\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": [ - "\n", - "try {\n", - "require(['notebook/js/codecell'], function(codecell) {\n", - " codecell.CodeCell.options_default.highlight_modes[\n", - " 'magic_text/x-csrc'] = {'reg':[/^%%pybind11/]};\n", - " Jupyter.notebook.events.one('kernel_ready.Kernel', function(){\n", - " Jupyter.notebook.get_cells().map(function(cell){\n", - " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", - " });\n", - "});\n", - "} catch (e) {};\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "from finn_examples import models\n", "accel = models.cnv_w1a1_gtsrb()" @@ -58,18 +19,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Expected input shape and datatype: (1, 32, 32, 3) UINT8\n", - "Expected output shape and datatype: (1, 44) INT16\n" - ] - } - ], + "outputs": [], "source": [ "print(\"Expected input shape and datatype: %s %s\" % (str(accel.ishape_normal), str(accel.idt)))\n", "print(\"Expected output shape and datatype: %s %s\" % (str(accel.oshape_normal), str(accel.odt)))" @@ -84,7 +36,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -104,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -158,17 +110,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dataset shape is (12630, 32, 32, 3)\n" - ] - } - ], + "outputs": [], "source": [ "print(\"Dataset shape is \" + str(testx.shape))" ] @@ -182,7 +126,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -192,20 +136,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAHRlJREFUeJztnVuMXNd1pv91TlU1+8Jbs0mqeRGpmy1rZJmSO4pvMewECRTDgOzBwLAfDD0YYTCIgRjIPAgeYOwB5sGZiW34IXBAj4QoA8eX+AIrE2NiR/CMknFGFmVJlChaskSREqkmmxS7ye5ms7vrnDUPVXRa9PlXF/tSTWX/H0Cweq/aZ+/addY5VfuvtZa5O4QQ6ZGt9QSEEGuDnF+IRJHzC5Eocn4hEkXOL0SiyPmFSBQ5vxCJIucXIlHk/EIkSm05nc3sHgBfAZAD+O/u/oXo+b39G3zj4LZq45J+aWiBrYu/XPQyMHKbZXV+yHjAwLSE123BOvp80DG6d7BjRmMFJi+WMBY/ZHTmhPMIjM0mX6s8565Gjxm8L2VRvR7TkxOYnZkOX95lluz8ZpYD+HMAvwvgBIDHzexhd3+O9dk4uA2f/OP/Vm0s+ZubkUVw5MEMm9RSBmN5eHKSN6mcC+ZxkVp6erdTW+HBG1/y1+blTGV7Frwss15qa86forbM1lFbSd6b3Bp8IgWf5Pz8BT5Wyc+Dsqy+QGXGndgLfsGeL3i/iYnXqG3DhiFqaxbV76f3cPecmhivbP+H7/wF7XMly/nYfzeAF939qLvPAfgmgHuXcTwhRBdZjvPvBPDqgr9PtNuEEG8CVn3Dz8z2m9lBMzt4cYp/dBNCdJflOP9JALsX/L2r3fYG3P2Au4+4+0jfwIZlDCeEWEmW4/yPA7jFzG4wswaAjwN4eGWmJYRYbZa82+/uTTP7NIC/R0vqe9DdDy/aLyfXm2iTnez2l2SXtNWJ7+jXavxlF01+zIJsmefBMhoGqA3Od6kjxS6PrtlZ9Q58qGIEMlTNruP9Sr4rnjOFxvhrthp/XX29XJGwQBIrvPqYHkmwxucRvddbd+6mtrn54FzNqudigSq1fbD6ffnHHq7AXMmydH53/yGAHy7nGEKItUG/8BMiUeT8QiSKnF+IRJHzC5Eocn4hEmVZu/1LIWMRcEHkSUEkj1oQ12PBSyuC4AzL+EFrdIpBkEgYoBMEMwX9oiA8FgQVvGQaIdYejVuCtSrJ+2xBBKTlgfQZyG9RoFNOAnjK4OTJAjmyLIP1COTDLDi/mfyZBetREnlwkXjFNx6/42cKIf5VIecXIlHk/EIkipxfiESR8wuRKF3d7TcAGdkZjwJPMpY9KwjsybMePo9gxzlfQhavIOtTGEASBe9kwWW5GWzdO3lt5fws7VPOBbaCpyjLLNjdJsFTeY2n8crq/D1DjQf2hPIHs5XBGkYpviJlJ7BFwUJG+kXn6ZJyJF6B7vxCJIqcX4hEkfMLkShyfiESRc4vRKLI+YVIlK5Kfe5OZap6HgS5kEtUAV7uqhmoJPVAz1tKkEsUCNIMcgIy2RMA5qd5pZ9L56urtQDA+dFXK9vHT75E+0xN/FrS5V/RnJ+mNgSSWF6vftO2bdtB++zc+2+obWDrHj7WBp4V2tdV26Lzw5i2jEUqm4Vlw7hkyoKg8kCOzOtEMu1c6dOdX4hUkfMLkShyfiESRc4vRKLI+YVIFDm/EImyLKnPzI4BmARQAGi6+0jcgafq8yjnXrNafnOax4zn/WtNI8gjF8o1JB9cM5BxZnnE3JmxM9R26pdPUNu5Y89Qm02fq2zPAwkzih7jeQsBC0Mgq5vPjp2lXcYO89dVG+BRfdvewuXDPfs+XNnev2Uv7XMpkNgQ5I0EglJvUb7GvFqytqAcWuQvnbISOv8H3Z2/o0KIaxJ97BciUZbr/A7gR2b2hJntX4kJCSG6w3I/9r/P3U+a2TYAPzazX7j7owuf0L4o7AeADZuGljmcEGKlWNad391Ptv8fA/B9AHdXPOeAu4+4+0jvAP8NthCiuyzZ+c2s38zWX34M4PcAPLtSExNCrC7L+di/HcD3rRXmVAPw1+7+v8IeDjiRnOYCdaV+9TkYYVFyySAKD4G8QhRHTI3zCLyzR7l8dfb5g9RWnBultnqQjLOluv4685EqFySXDKPEoqgzkp00LGkVSI7Nc5eo7fjjXGyaPnu+sn3nre+mfba8ldusj396bUbnY3SfpSXAllbqrVOW7PzufhTAO5Y9AyHEmiCpT4hEkfMLkShyfiESRc4vRKLI+YVIlK4m8AS4qpEHElCTXKOiyKYs4xFWpQcSivOkoNNnq6PwRl94mvY5+9w/Uls2xSWqPIgQswa/Zvdv3FLdvvtm2mdg805q6+sPpK1A6ps883pl+4VTp2mfC2M8kahfeo3agtyvGD/6cmV7Ocnl2XKWJy0dvuP91OaNQWorAum5JOd+oBzSmoweFYC8At35hUgUOb8QiSLnFyJR5PxCJIqcX4hE6W65Ljic7GwWwXWoTnY2y2C3uQx3V/lYF89PUdtrLx2pbD/3i8doH5s6xW0+T20btw9T23W33M773XRbZXttyy7aJ69vorZo77gMalcNWvWpZaRcGwCcP8V3+1959p+p7dRhHiDVP1sd2DN1Zoz2OR2MVevhLjP0tg9S21y+jtqY+JSTIC0AMK8+h6+iWpfu/EKkipxfiESR8wuRKHJ+IRJFzi9Eosj5hUiUrkp9ZoY8q77eRPnPSlYmK5DzIomqOcPLa42/8iK1nX+hWlIqJ7lEVc/5TIb37qG2Hbe/l9rWXc+zp3kPke0ynrcwklnNArkpWH8QGdMaPHBq026+Huu37Ka2wWEetPTCT/+usr0xzgOFJsaqg5IAID/8U2rbtI0HSGVD1RIsAHiduGFUco7mmlRgjxBiEeT8QiSKnF+IRJHzC5Eocn4hEkXOL0SiLCr1mdmDAD4MYMzdb2+3DQL4FoC9AI4B+Ji7j3cyoJG4o3pQMorlJbOwXBePmJs6Vx3pBQCvv3iI2pqvv1LZ3hPkC9y8k1cmHn47l/P6rr+T2ooGz6tXEkkvC+O9gnyBgURoQdkzJkVFJ1wzmEc+wOe//a2/wY9ZNirbj/6f79A+jRkeiXl+lJ87oy/8b2q7boDLgGW9eo4erD0KIvV1rvR1dOf/SwD3XNF2P4BH3P0WAI+0/xZCvIlY1Pnd/VEA565ovhfAQ+3HDwH4yArPSwixyiz1O/92d79cRvYUWhV7hRBvIpa94eetL+T0m4aZ7Tezg2Z2cGbqwnKHE0KsEEt1/tNmNgwA7f9pTiR3P+DuI+4+0jvAN6qEEN1lqc7/MID72o/vA/CDlZmOEKJbdCL1fQPABwAMmdkJAJ8D8AUA3zazTwE4DuBjnQ1nVB4q5iO5qVrm8SDBYTHHpaGJU9WSHQBcOn2U2upldXLPjZs30j7Dt95FbX27uZw3W+ujtixInFkS/bNZcOkzD47X5N3gzte/RqTbIki6Gt6KghJr+ToeXbh17x2V7RdOczlv4pkfUVsxxyP+Tr10nNo27akuGwYA9b7qT8Ru1RIgAJSsXBft8ess6vzu/gli+p2rGEcIcY2hX/gJkShyfiESRc4vRKLI+YVIFDm/EInS1QSecIcTqcdyfh0qSYRYAR71NDPFa+6df+1VarOZaWqrk+E27riO9tmw663U1uzppTZkPNFlEcheMxerk5OeHOUS5vzF56ltdprXmOup8zn29FT3y2v8eLUal7YaNf5e9zS4LNpDJNOhG3nSz4vHX6C2udcnqG1mfJbbzrxEbfXrbiKGQdoniqjsFN35hUgUOb8QiSLnFyJR5PxCJIqcX4hEkfMLkSjdlfoAACQaKUhW6ETqmw9Czi5NXeK2idPUVi+5XNM7UC0b1bfzOnJlz1ZqOz8+SW0XJs9Q2xyJLgSAmamZyvZjY1dmYvsXXnryJ9TWW3BZMb5zEEk3TNQa1QzkI9VJ/UcA2Ll9oLL9He/5t7TPuiGedHVmnMuRtSY/dy6+zus5bpivfj9zVncRAEhC1midrkR3fiESRc4vRKLI+YVIFDm/EIki5xciUbq+208De4Icc2ySRbC1OT/Fd9JthpdcKo3npWtsqA60yDfw3eGpIJdgeZGnMm/M8uvyky/wwJP+rFoZmZmqDvgBgKzgATooqtUDIEyrh4zswDvJPQfEO9VFwbPT1VnpKgD5peod+N6Snx99g5upbaJWrR4AAGa5wjQ7yc85zFavcdnHz0XPe6rbw7Jsb0R3fiESRc4vRKLI+YVIFDm/EIki5xciUeT8QiRKJ+W6HgTwYQBj7n57u+3zAP4AwOXok8+6+w87GTAjUkQQPwIvqyWPMpB45oJcfMU8l2RqpNwVANRJzromyVcHAFMzfCwveD44C/K39YIHl2C+WjbysO4Wt0XyW3znIFJfVFDKuS0LAoKMBH4BQC2vXqtag8ub2QDPrehZYKMWYG6Or3FB3hsmiwNAHqxHp3RyhL8EcE9F+5fdfV/7X0eOL4S4dljU+d39UQA8HlQI8aZkOZ8dPm1mh8zsQTPjP4kSQlyTLNX5vwrgJgD7AIwC+CJ7opntN7ODZnZwZpr/nFUI0V2W5PzuftrdC2/9UPtrAO4OnnvA3UfcfaS3v7oOuRCi+yzJ+c1seMGfHwXw7MpMRwjRLTqR+r4B4AMAhszsBIDPAfiAme1DS904BuAPOx2wJNpRGcg8TH1zkg8QiGVAC/pFx2QlxaYDSeb4KC8NdvQwz51XTnOJMK9z2eiGbTurj5dxedAb/B4wO8dPkSh3XuNqksn9aiKBdBucH3k9kAEb1fMvg5yRlvG5W9QvjKgL7rPkteXB+jLL1az6os7v7p+oaH7gKsYQQlyD6Bd+QiSKnF+IRJHzC5Eocn4hEkXOL0SidDWBpwOYIxFYjUBCKYl+4eAJDkGiuQDAAwklDDprVht9nktURVmdaBEASue/it61o5/3mw/KfE1Xr+PmDdton7138pJiWRAx5x4kmCQ2FqEJAEUQ+TY916Q2NHn5svUbyCle4+tbzPBoS3c+Dw/kzXo9KEdHIvQi2a4sq+fhgSR6JbrzC5Eocn4hEkXOL0SiyPmFSBQ5vxCJIucXIlG6Xqsvy4gUEUhKRiQUVg8OAOrruJSDeh+3BUsyN10tsW0squvBAcC2wd3UNrphPbW9NnaI2m7awqW5uY3ViT+np0dpnxMTPIKw2eS2ouSvu6e3+rXN8rcZPXN8rL51PElqZlx+mzUS1ef83Jmb5NKhB7Iii1gFgFr/RmrL+6rXqpbxc7EomDyoWn1CiEWQ8wuRKHJ+IRJFzi9Eosj5hUiULu/2O4wEHhRR7jwnu/3Btat/A9/Rt0AJKCf4MS9NV+/0bp1+nfbZe/Od1DY5s4/a5rZwJeCdu3dR28DO66sNwWsOwqPQDHIhRkFQ46fOV7Y/+fJh2mfuxM+o7S17ePmyXXvfS23ZQHXw1NR5rixcPPsatVmTl4EzXgEM9Y08sKrMq8/VggSStQbrPICHoTu/EIki5xciUeT8QiSKnF+IRJHzC5Eocn4hEqWTcl27AfwVgO1oiTsH3P0rZjYI4FsA9qJVsutj7j6+yNEAElARlcnKiKxRM95nXT8PBFkXyC5zY8epbWZuprL9wivHaJ+bbhijtvfccSu1NfFWaqsF5aRA8sHlwXU+DzS7eh7kVgxEwm3Xb6ps/8DwEO3TnOPr0cj5a27U+Ps5P1+dQ3Hstcdon7lxXmKt7jzP4Lp+njdyy3Ye4GV5tUZIYncAADn1l5XN4dcE8CfufhuAdwH4IzO7DcD9AB5x91sAPNL+WwjxJmFR53f3UXf/efvxJIAjAHYCuBfAQ+2nPQTgI6s1SSHEynNV3/nNbC+AOwE8BmC7u18OEj+F1tcCIcSbhI6d38wGAHwXwGfc/cJCm7eShVd+2TCz/WZ20MwOzkxfqHqKEGIN6Mj5zayOluN/3d2/124+bWbDbfswgMqdLXc/4O4j7j7S279hJeYshFgBFnV+a+XQegDAEXf/0gLTwwDuaz++D8APVn56QojVopOovvcC+CSAZ8zsqXbbZwF8AcC3zexTAI4D+NjihzKA5CXLSi6hsNJPlgc5/Pq41Ldxx03UdvrEL6itOVX9tWV89BQ/3vNcUtpxF5e9vKdaKgMANy6/sXyHzSC3mweBe6F0FElRVv2eNWo89G1dvoPajEiYAFAW/DR+/US1dDt1lOdILKa5PNuo83XcvHOY99vMIzHLevW56kHkXlmS0nG0x6+zqPO7+z+Blw37nasYSwhxDaFf+AmRKHJ+IRJFzi9Eosj5hUgUOb8QidLVBJ4Gh5FopKjIEFWigpJLyLh+NbhzL7Wdu24PtTVfPlfZfnGKl3A6eeRpamv0X0dtg2+5m9rmenhyTyclzEje1DaBDBh1K3k/okSF0YUejOa8Ihdef+U0tY0erpZaZ079kvbJUR29CQA9m3ki0aEb305t6OORh0VJ3DA6vVmpus6rdenOL0SqyPmFSBQ5vxCJIucXIlHk/EIkipxfiETpcq0+gAl3QdAWrGBRbDy6La9xbaixnkeWDd82Qm3HzlVHe5XjL9M+F85epLajT/wttc3P8ijHHbe/h9ouNQYq251E+wGARQlBnSelNONrnJPkqvNlkKh1licEPXPsJLW9+tw/U9vk8Scr2+sFf19qffw1b7vlZmrrH76D2soajzKtUdmOOwVfqc61Pt35hUgUOb8QiSLnFyJR5PxCJIqcX4hE6epufyu/d3XwBstJBgAZy9VX8j3P0rkSUG/wHdFN26+nth1vf3dl+8kneSBIOcnz+50f4zv6k//3x9R27Pn/R203v/O3KtuHdr+T9mn08qzKpV8KbNSEYr7aOD7Gg3BOHqnemQeAs6/wAKn582eprYfkf8wafPK73/Y2ahu6+V3Ulq/fSm1UsAKQgZwHGVcdyiCoqlN05xciUeT8QiSKnF+IRJHzC5Eocn4hEkXOL0SiLCr1mdluAH+FVgluB3DA3b9iZp8H8AcAzrSf+ll3/2F4LPCwAw+Ui4LUk8qjDHNlFHTCB6v38MCTzbv3Vhv8g7TPa8/+lNqaE9WlpACgdmmO2i6ePENth8f+rtrQz4Nf6n3VwUAAUO/pobZmwddqdqZa/vRpnu/QL/Fgm6icW0/G3+uegeogrutvvYv22fq236S2xtBeaivrXJqLcig2mWwXyHn0eFdRr6sTnb8J4E/c/edmth7AE2Z2WYT+srv/WefDCSGuFTqp1TcKYLT9eNLMjgDYudoTE0KsLlf1nd/M9gK4E8DlfMifNrNDZvagmW1e4bkJIVaRjp3fzAYAfBfAZ9z9AoCvArgJwD60Phl8kfTbb2YHzezgxenqEtdCiO7TkfObWR0tx/+6u38PANz9tLsX7l4C+BqAyioT7n7A3UfcfaSvn/+GXAjRXRZ1fjMzAA8AOOLuX1rQPrzgaR8F8OzKT08IsVp0stv/XgCfBPCMmT3VbvssgE+Y2T60xIVjAP5wsQM5HE5CwcpAfmO6RknyxAGA1YJSUkUgoeQ8/Kp3U7Uk1tv7FtpnwyDfCnnhMS6/4dwRamrOTVNbOV8te9kElweLwMYFRyAL8sUZ0Zws0LwKXpgNWZ2P1Res8Z7bf6Oyff0Nd/KxBvl+drPGXaaMyp4ZP68yY+c37UL7XE25rk52+/+JHDLU9IUQ1zb6hZ8QiSLnFyJR5PxCJIqcX4hEkfMLkShdTeBpMC4PBdFIVL0I+rBEoYt1zEP5qlqKqvXyaK7Gnhup7a4gWeiZlx+nttO/OExtxenqBJnW5ElGveRJOmMFlktzrGOtwctW9Q9tp7ahvXupbeuNt1BbvnlPZbs3+A/Oiixwi+ici0qRsZJcAEpyXkWRrsEsOn6m7vxCJIqcX4hEkfMLkShyfiESRc4vRKLI+YVIlK5KfQCQ5dX6RRkkgzQiGxVB2FOW85dWM17jr4iUkrL6WlkGkYBByUD01KuTSwLAriDB5LYb9lHb9PnxyvaL4ydpn7lLE9RWNnnizFrOF2vduurEn30bttA+fRt5rbtGP+9njV5qQ1b9BrCgOABhDUhjdSMBFIHMVgbHdCL1ZbwLjEQJXo06qDu/EIki5xciUeT8QiSKnF+IRJHzC5Eocn4hEqXLUp8DJBIsc65rsCuUB5FS7oEtiL7yIMGkEdkIWSA5BtpLHl171wX18+q8Nt2m/uqouaEd19E+LNkmALjzU8SNp/ckii5Q4/ImwHXRMng/m0H4m1n1WtWyYB7B8eaDGpBZkKQzWmNqCs5FJiFfRak+3fmFSBU5vxCJIucXIlHk/EIkipxfiERZdLffzNYBeBRAT/v533H3z5nZDQC+CWALgCcAfNLdo+pOAPhuugdTaTard+etFgRLRIEUwQ42sqCcVDFb3cX48bJoB7sIAkiMX5ejMlkZCTwpSJk0AMiXqJqU4DvmLLAqjKcJdtLj+1SQS5AM6HnQZwlBZgBQBiqSBfkOSzLJWlCOjgcRrWwOv1kAv+3u70CrHPc9ZvYuAH8K4MvufjOAcQCf6nhUIcSas6jze4up9p/19j8H8NsAvtNufwjAR1ZlhkKIVaGj7/xmlrcr9I4B+DGAlwBMuPvlz2knAPDSpkKIa46OnN/dC3ffB2AXgLsB3NrpAGa238wOmtnBi9OTS5ymEGKluardfnefAPATAO8GsMnsVztduwBUpopx9wPuPuLuI33965c1WSHEyrGo85vZVjPb1H7cC+B3ARxB6yLw79pPuw/AD1ZrkkKIlaeTwJ5hAA9ZK2lYBuDb7v4/zew5AN80s/8C4EkADyx2IAcPwijBZa9eMksP5LD5SP4JErgVYYARCUoKxvJgLI9qYUVlsoLchU0iN1kQYVQGcqQF888Cqa9okn7B7YblpWuxhMAYABkxNgOZNSO5GlvGQII1nu8wkgGzGnvdgQRL16rzLH6LOr+7HwJwZ0X7UbS+/wsh3oToF35CJIqcX4hEkfMLkShyfiESRc4vRKJYlLNuxQczOwPgePvPIQBnuzY4R/N4I5rHG3mzzWOPu/O6ZwvoqvO/YWCzg+4+siaDax6ah+ahj/1CpIqcX4hEWUvnP7CGYy9E83gjmscb+Vc7jzX7zi+EWFv0sV+IRFkT5zeze8zseTN70czuX4s5tOdxzMyeMbOnzOxgF8d90MzGzOzZBW2DZvZjM/tl+//NazSPz5vZyfaaPGVmH+rCPHab2U/M7DkzO2xmf9xu7+qaBPPo6pqY2Toz+5mZPd2ex39ut99gZo+1/eZbZtZY1kDu3tV/aBVkewnAjQAaAJ4GcFu359GeyzEAQ2sw7vsB3AXg2QVt/xXA/e3H9wP40zWax+cB/Icur8cwgLvaj9cDeAHAbd1ek2AeXV0TtOJyB9qP6wAeA/AuAN8G8PF2+18A+PfLGWct7vx3A3jR3Y96K9X3NwHcuwbzWDPc/VEA565ovhetRKhAlxKiknl0HXcfdfeftx9PopUsZie6vCbBPLqKt1j1pLlr4fw7Aby64O+1TP7pAH5kZk+Y2f41msNltrv7aPvxKQDb13AunzazQ+2vBav+9WMhZrYXrfwRj2EN1+SKeQBdXpNuJM1NfcPvfe5+F4DfB/BHZvb+tZ4Q0Lry4+qqLa8kXwVwE1o1GkYBfLFbA5vZAIDvAviMu19YaOvmmlTMo+tr4stImtspa+H8JwHsXvA3Tf652rj7yfb/YwC+j7XNTHTazIYBoP3/2FpMwt1Pt0+8EsDX0KU1MbM6Wg73dXf/Xru562tSNY+1WpP22FedNLdT1sL5HwdwS3vnsgHg4wAe7vYkzKzfzNZffgzg9wA8G/daVR5GKxEqsIYJUS87W5uPogtrYq0aWA8AOOLuX1pg6uqasHl0e026ljS3WzuYV+xmfgitndSXAPzHNZrDjWgpDU8DONzNeQD4BlofH+fR+u72KbRqHj4C4JcA/gHA4BrN438AeAbAIbScb7gL83gfWh/pDwF4qv3vQ91ek2AeXV0TAHeglRT3EFoXmv+04Jz9GYAXAfwNgJ7ljKNf+AmRKKlv+AmRLHJ+IRJFzi9Eosj5hUgUOb8QiSLnFyJR5PxCJIqcX4hE+f/v3sRbPjbpNQAAAABJRU5ErkJggg==\n", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "%matplotlib inline\n", "from matplotlib import pyplot as plt\n", @@ -216,36 +149,18 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Expected class is:\n", - "Prohibited for vehicles with a permitted gross weight over 3.5t including their trailers, and for tractors except passenger cars and buses\n" - ] - } - ], + "outputs": [], "source": [ "print(\"Expected class is:\\n%s\" % (gtsrb_classes[test_single_y]))" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Accelerator result is:\n", - "Prohibited for vehicles with a permitted gross weight over 3.5t including their trailers, and for tractors except passenger cars and buses\n" - ] - } - ], + "outputs": [], "source": [ "accel_y = accel.execute(test_single_x.reshape(accel.ishape_normal))\n", "print(\"Accelerator result is:\\n%s\" % (gtsrb_classes[np.argmax(accel_y)]))" @@ -260,18 +175,9 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Ready to run validation, test images tensor has shape (30, 421, 3072)\n", - "Accelerator buffer shapes are (421, 1, 32, 32, 3, 1) for input, (421, 11, 8) for output\n" - ] - } - ], + "outputs": [], "source": [ "batch_size = 421\n", "total = testx.shape[0]\n", @@ -287,46 +193,9 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "batch 0 / 30 : total OK 401 NOK 20\n", - "batch 1 / 30 : total OK 798 NOK 44\n", - "batch 2 / 30 : total OK 1203 NOK 60\n", - "batch 3 / 30 : total OK 1605 NOK 79\n", - "batch 4 / 30 : total OK 2003 NOK 102\n", - "batch 5 / 30 : total OK 2404 NOK 122\n", - "batch 6 / 30 : total OK 2806 NOK 141\n", - "batch 7 / 30 : total OK 3210 NOK 158\n", - "batch 8 / 30 : total OK 3609 NOK 180\n", - "batch 9 / 30 : total OK 4009 NOK 201\n", - "batch 10 / 30 : total OK 4404 NOK 227\n", - "batch 11 / 30 : total OK 4805 NOK 247\n", - "batch 12 / 30 : total OK 5205 NOK 268\n", - "batch 13 / 30 : total OK 5605 NOK 289\n", - "batch 14 / 30 : total OK 5996 NOK 319\n", - "batch 15 / 30 : total OK 6403 NOK 333\n", - "batch 16 / 30 : total OK 6796 NOK 361\n", - "batch 17 / 30 : total OK 7200 NOK 378\n", - "batch 18 / 30 : total OK 7596 NOK 403\n", - "batch 19 / 30 : total OK 7994 NOK 426\n", - "batch 20 / 30 : total OK 8397 NOK 444\n", - "batch 21 / 30 : total OK 8804 NOK 458\n", - "batch 22 / 30 : total OK 9213 NOK 470\n", - "batch 23 / 30 : total OK 9616 NOK 488\n", - "batch 24 / 30 : total OK 10010 NOK 515\n", - "batch 25 / 30 : total OK 10414 NOK 532\n", - "batch 26 / 30 : total OK 10817 NOK 550\n", - "batch 27 / 30 : total OK 11218 NOK 570\n", - "batch 28 / 30 : total OK 11619 NOK 590\n", - "batch 29 / 30 : total OK 12021 NOK 609\n" - ] - } - ], + "outputs": [], "source": [ "ok = 0\n", "nok = 0\n", @@ -354,17 +223,9 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Final accuracy: 95.17814726840855%\n" - ] - } - ], + "outputs": [], "source": [ "acc = 100.0 * ok / (total)\n", "print(\"Final accuracy: {}%\".format(acc))" @@ -379,31 +240,9 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'DRAM_in_bandwidth[MB/s]': 8.867975173609915,\n", - " 'DRAM_out_bandwidth[MB/s]': 0.25403053882736737,\n", - " 'batch_size': 100,\n", - " 'copy_input_data_to_device[ms]': 2.284526824951172,\n", - " 'copy_output_data_from_device[ms]': 0.20766258239746094,\n", - " 'fclk[mhz]': 100.0,\n", - " 'fold_input[ms]': 0.14352798461914062,\n", - " 'pack_input[ms]': 0.10251998901367188,\n", - " 'runtime[ms]': 34.64150428771973,\n", - " 'throughput[images/s]': 2886.7106684928112,\n", - " 'unfold_output[ms]': 0.0762939453125,\n", - " 'unpack_output[ms]': 1504.5325756072998}" - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "accel.batch_size = 100\n", "accel.throughput_test()" From 432669f87683e35d4701bcd03119ffe964e16cc5 Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 11:26:17 +0100 Subject: [PATCH 48/53] Update license agreements and list of contributors --- ...nse-agreement-for-non-commercial-models.md | 2 +- AUTHORS.rst | 10 +++++++++- LICENSE | 20 ++++++++++--------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/AMD-license-agreement-for-non-commercial-models.md b/AMD-license-agreement-for-non-commercial-models.md index b598532..8a384de 100644 --- a/AMD-license-agreement-for-non-commercial-models.md +++ b/AMD-license-agreement-for-non-commercial-models.md @@ -3,7 +3,7 @@ LICENSE AGREEMENT FOR NON-COMMERCIAL MODELS Trained Models: -bincop-cnv, cnv-w1a1, cnv-w1a2, cnv-w2a2, kwsmlp-w3a3, mobilenetv1-w4a4, resnet50-w1a2, tfc-w1a1, tfc-w1a2, tfc-w2a2, unsw_nb15-mlp-w2a2, vgg10-radioml-w4a4 +bincop-cnv, cnv-w1a1, cnv-w1a2, cnv-w2a2, kwsmlp-w3a3, mobilenetv1-w4a4, resnet50-w1a2, tfc-w1a1, tfc-w1a2, tfc-w2a2, unsw_nb15-mlp-w2a2, vgg10-radioml-w4a4, cnv_1w1a_gtsrb.onnx This License Agreement for Non-Commercial Models (“Agreement”) is a legal agreement between you (either an individual or an entity) and Advanced Micro Devices, Inc. on behalf of itself and its subsidiaries and affiliates (collectively “AMD”). DO NOT USE THE TRAINED MODELS IDENTIFIED ABOVE UNTIL YOU HAVE CAREFULLY READ THIS AGREEMENT. BY USING, INSTALLING, MODIFYING, COPYING, TRAINING, BENCHMARKING, OR DISTRIBUTING THE TRAINED MODELS, YOU AGREE TO AND ACCEPT ALL TERMS AND CONDITIONS OF THIS AGREEMENT. If you do not accept these terms, do not use the Trained Models. diff --git a/AUTHORS.rst b/AUTHORS.rst index ba06e5d..f7616fa 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -2,9 +2,17 @@ Contributors ============ -* Yaman Umuroglu (@maltanar) (maintainer) +* Mirza Mrahorovic (@mmrahorovic) (maintainer) * Jakoba Petri-Koenig (@auphelia) +* Yaman Umuroglu (@maltanar) * Lucian Petrica (@quetric) * Tobias Alonso (@Tobi-Alonso) * Hendrik Borras (@HenniOVP) * Felix Paul Jentzsch (@felixpj) +* Aziz Bahri (@azizb-xlnx) +* John Monks (@jmonks-amd) +* Fionn O'Donohoe (@fionnodonohoe-xlnx) +* Radoslav Pitoňák (@rpitonak) +* Matthias Gehre (@mgehre-amd) +* NaelF (@NaelF) +* Tim Paine (@timkpaine) diff --git a/LICENSE b/LICENSE index 66e9909..788d4c6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,22 @@ BSD 3-Clause License -Copyright (c) 2023, Xilinx +Copyright (C) 2020-2022, Xilinx, Inc. +Copyright (C) 2022-2024, Advanced Micro Devices, Inc. +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. +* Neither the name of FINN nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From 275f703c59d767e4d8f64a2d513191d8f1d6fe67 Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 12:48:16 +0100 Subject: [PATCH 49/53] [BNN-PYNQ] Remove specialize layer config --- build/bnn-pynq/build.py | 1 - build/bnn-pynq/specialize_layers_config.json | 60 -------------------- 2 files changed, 61 deletions(-) delete mode 100644 build/bnn-pynq/specialize_layers_config.json diff --git a/build/bnn-pynq/build.py b/build/bnn-pynq/build.py index 4746f29..867410c 100644 --- a/build/bnn-pynq/build.py +++ b/build/bnn-pynq/build.py @@ -82,7 +82,6 @@ def platform_to_shell(platform): cfg = build_cfg.DataflowBuildConfig( output_dir="output_%s_%s" % (model_name, release_platform_name), folding_config_file="folding_config/%s_folding_config.json" % model_name, - # specialize_layers_config_file="specialize_layers_config.json", synth_clk_period_ns=5.0, board=platform_name, shell_flow_type=shell_flow_type, diff --git a/build/bnn-pynq/specialize_layers_config.json b/build/bnn-pynq/specialize_layers_config.json deleted file mode 100644 index a2f5033..0000000 --- a/build/bnn-pynq/specialize_layers_config.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "Defaults": {}, - "Thresholding_0": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "hls" - }, - "MVAU_0": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "hls" - }, - "MVAU_1": { - "preferred_impl_style": "hls" - }, - "StreamingMaxPool_0": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "hls" - }, - "MVAU_2": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "hls" - }, - "MVAU_3": { - "preferred_impl_style": "hls" - }, - "StreamingMaxPool_1": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "hls" - }, - "MVAU_4": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "hls" - }, - "MVAU_5": { - "preferred_impl_style": "hls" - }, - "MVAU_6": { - "preferred_impl_style": "hls" - }, - "MVAU_7": { - "preferred_impl_style": "hls" - }, - "MVAU_8": { - "preferred_impl_style": "hls" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } -} From 2675f946f96e1e2bebdaf293e57b399dcc6c23fc Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 12:54:11 +0100 Subject: [PATCH 50/53] [Deps] Update finn commit hash --- build/get-finn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/get-finn.sh b/build/get-finn.sh index 7feef2c..de796a1 100755 --- a/build/get-finn.sh +++ b/build/get-finn.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (C) 2020-2022, Xilinx -# Copyright (C) 2023, Advanced Micro Devices, Inc. +# Copyright (C) 2022-2024, Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ # URL for git repo to be cloned REPO_URL=https://github.com/Xilinx/finn # commit hash for repo -REPO_COMMIT=e3087ad9fbabcc35f21164d415ababec4f462e9f +REPO_COMMIT=39fb8859fec0e47276ffadcafe43092d1b10af7e # directory (under the same folder as this script) to clone to REPO_DIR=finn From 2115ebf0df1554d188c4e7ad4c4091c4d684562c Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 13:08:53 +0100 Subject: [PATCH 51/53] [VGG, MNV1] Rename hls to hw and enable MNV1 ZCU102 build --- build/mobilenet-v1/build.py | 2 +- build/vgg10-radioml/custom_steps.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index 3c3e676..c2d3821 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -45,7 +45,7 @@ model_name = "mobilenetv1-w4a4" # which platforms to build the networks for -zynq_platforms = ["ZCU104"] # "ZCU104" +zynq_platforms = ["ZCU104", "ZCU102"] alveo_platforms = ["U250"] # "U50", "U200", "U280" platforms_to_build = zynq_platforms + alveo_platforms diff --git a/build/vgg10-radioml/custom_steps.py b/build/vgg10-radioml/custom_steps.py index 8e747f7..509efbc 100755 --- a/build/vgg10-radioml/custom_steps.py +++ b/build/vgg10-radioml/custom_steps.py @@ -29,7 +29,7 @@ from finn.builder.build_dataflow_config import DataflowBuildConfig from qonnx.transformation.change_3d_tensors_to_4d import Change3DTo4DTensors from qonnx.transformation.general import GiveUniqueNodeNames -import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hls +import finn.transformation.fpgadataflow.convert_to_hw_layers as to_hw import finn.transformation.streamline.absorb as absorb @@ -40,7 +40,7 @@ def step_pre_streamline(model: ModelWrapper, cfg: DataflowBuildConfig): def step_convert_final_layers(model: ModelWrapper, cfg: DataflowBuildConfig): - model = model.transform(to_hls.InferChannelwiseLinearLayer()) - model = model.transform(to_hls.InferLabelSelectLayer()) + model = model.transform(to_hw.InferChannelwiseLinearLayer()) + model = model.transform(to_hw.InferLabelSelectLayer()) model = model.transform(GiveUniqueNodeNames()) return model From 073f79110ae0d9060156fa4fc99fe96704e81b8c Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 13:25:21 +0100 Subject: [PATCH 52/53] Update readme files --- build/README.md | 2 +- build/bnn-pynq/README.md | 2 +- build/kws/README.md | 6 +++--- build/mobilenet-v1/README.md | 4 ++-- build/resnet50/README.md | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/README.md b/build/README.md index e284deb..7cdac19 100644 --- a/build/README.md +++ b/build/README.md @@ -16,7 +16,7 @@ to do this again in the future when the `finn-examples` repo gets updated and re Docker community edition `docker-ce`. 3. Set up the environment variables to point to your Vivado/Vitis installation, depending on your target platform(s): - * For Zynq platforms you'll need to set `VIVADO_PATH`, e.g. `VIVADO_PATH=/opt/xilinx/Vivado/2019.1/` + * For Zynq platforms you'll need to set `VIVADO_PATH`, e.g. `VIVADO_PATH=/opt/xilinx/Vivado/2022.2/` * For Alveo platforms you'll need to set `VITIS_PATH`, `PLATFORM_REPO_PATHS` and `XILINX_XRT` ## Build bitfiles diff --git a/build/bnn-pynq/README.md b/build/bnn-pynq/README.md index 0c2b65a..3ccb705 100644 --- a/build/bnn-pynq/README.md +++ b/build/bnn-pynq/README.md @@ -42,7 +42,7 @@ cd $FINN_EXAMPLES/build/finn The BNN-PYNQ networks are part of the [Brevitas examples](https://github.com/Xilinx/brevitas/tree/master/src/brevitas_examples/bnn_pynq). You can find the details on quantization, accuracy, layers used in the Brevitas repo, as well as the training scripts if you'd like to retrain them yourself. -Subsequently, those trained networks are [exported to ONNX](https://github.com/Xilinx/finn/blob/master/notebooks/basics/1_brevitas_network_import.ipynb). In addition, the particular versions +Subsequently, those trained networks are [exported to ONNX](https://github.com/Xilinx/finn/blob/main/notebooks/basics/1_brevitas_network_import_via_QONNX.ipynb). In addition, the particular versions used here have two additions, as described in the "Adding Pre- and Postprocessing" section of [this notebook](https://github.com/Xilinx/finn/blob/master/notebooks/end2end_example/bnn-pynq/tfc_end2end_example.ipynb): * A divide-by-255 node is added at the input, and the input is marked as 8-bit (to directly accept 8-bit images as input) diff --git a/build/kws/README.md b/build/kws/README.md index c683701..40cb024 100644 --- a/build/kws/README.md +++ b/build/kws/README.md @@ -1,8 +1,8 @@ -# The KWS example +# The keyword spotting (KWS) example The KWS example includes an MLP for the Google SpeechCommandsV2 dataset. -## Build bitfiles for BNN-PYNQ examples +## Build bitfiles for KWS examples The build is currently configured for the PYNQ-Z1 board and a throughput of 200k FPS at a clock frequency of 100 MHz. @@ -18,7 +18,7 @@ cd $FINN_EXAMPLES/build/finn bash run-docker.sh build_custom $FINN_EXAMPLES/build/kws ``` -3. The generated outputs will be under `kws/_output__`. +3. The generated outputs will be under `kws/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). The folder will additionally include the quantized inputs for verification (`all_validation_KWS_data_inputs_len_10102.npy`) and the expected outputs (`all_validation_KWS_data_outputs_len_10102.npy`). When running the network on hardware the validation should achieve an accuracy of 89.78 % with 9070 of the 10102 samples being classified correctly. diff --git a/build/mobilenet-v1/README.md b/build/mobilenet-v1/README.md index f31ad57..3746108 100644 --- a/build/mobilenet-v1/README.md +++ b/build/mobilenet-v1/README.md @@ -36,13 +36,13 @@ cd $FINN_EXAMPLES/build/finn ./run-docker.sh build_custom $FINN_EXAMPLES/build/mobilenet-v1 ``` -5. The generated outputs will be under `mobilenet-v1/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). +3. The generated outputs will be under `mobilenet-v1/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). ## Where did the ONNX model files come from? The 4-bit quantized MobileNet-v1 is part of the [Brevitas examples](https://github.com/Xilinx/brevitas/tree/master/src/brevitas_examples/imagenet_classification). -Subsequently, the trained networks is [exported to ONNX](https://github.com/Xilinx/finn/blob/master/notebooks/basics/1_brevitas_network_import.ipynb). In addition, the particular version used here has two additions for pre- and postprocessing: +Subsequently, the trained networks is [exported to ONNX](https://github.com/Xilinx/finn/blob/main/notebooks/basics/1_brevitas_network_import_via_QONNX.ipynb). In addition, the particular version used here has two additions for pre- and postprocessing: * A divide-by-255 node is added at the input, and the input is marked as 8-bit (to directly accept 8-bit images as input) * Normalization is added at the input with `mean = [0.485, 0.456, 0.406]` and `std = 0.226`. Note that the `std` is global and not per-channel to facilitate its removal via the [streamlining transform](https://arxiv.org/pdf/1709.04060). diff --git a/build/resnet50/README.md b/build/resnet50/README.md index 3eab06f..8300f27 100644 --- a/build/resnet50/README.md +++ b/build/resnet50/README.md @@ -28,6 +28,6 @@ cd $FINN_EXAMPLES/build/finn ./run-docker.sh build_custom $FINN_EXAMPLES/build/resnet50 ``` -5. The generated outputs will be under `resnet50/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). +3. The generated outputs will be under `resnet50/output__`. You can find a description of the generated files [here](https://finn-dev.readthedocs.io/en/latest/command_line.html#simple-dataflow-build-mode). From e4e1c965d7d11da4e75856ae8cc4b34e034971ee Mon Sep 17 00:00:00 2001 From: auphelia Date: Fri, 3 May 2024 15:21:14 +0100 Subject: [PATCH 53/53] [MNV1,RN18,VGG] Cleanup specialize layer and folding configs --- build/mobilenet-v1/build.py | 9 +- .../U200_specialize_layers_config.json | 180 ------------ .../U250_specialize_layers_config.json | 180 ------------ .../U280_specialize_layers_config.json | 180 ------------ .../U50_specialize_layers_config.json | 180 ------------ .../ZCU102_specialize_layers_config.json | 261 ------------------ build/resnet50/build.py | 2 +- ...olded_16.json => U250_folding_config.json} | 0 .../specialize_layers_config.json | 129 --------- 9 files changed, 8 insertions(+), 1113 deletions(-) delete mode 100644 build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json delete mode 100644 build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json delete mode 100644 build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json delete mode 100644 build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json delete mode 100644 build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json rename build/resnet50/folding_config/{U250_folding_config_no_doublepack_pe_folded_16.json => U250_folding_config.json} (100%) delete mode 100644 build/vgg10-radioml/specialize_layers_config.json diff --git a/build/mobilenet-v1/build.py b/build/mobilenet-v1/build.py index c2d3821..711a603 100644 --- a/build/mobilenet-v1/build.py +++ b/build/mobilenet-v1/build.py @@ -124,6 +124,12 @@ def select_build_steps(platform): # for Zynq, use the board name as the release name # e.g. ZCU104 release_platform_name = platform_name + # for ZCU104 we provide a specialize layer json + specialize_layer_file = ( + "specialize_layers_config/ZCU104_specialize_layers_config.json" + if platform_name == "ZCU104" + else None + ) platform_dir = "release/%s" % release_platform_name os.makedirs(platform_dir, exist_ok=True) @@ -131,8 +137,7 @@ def select_build_steps(platform): steps=select_build_steps(platform_name), output_dir="output_%s_%s" % (model_name, release_platform_name), folding_config_file="folding_config/%s_folding_config.json" % platform_name, - specialize_layers_config_file="specialize_layers_config/%s_specialize_layers_config.json" - % platform_name, + specialize_layers_config_file=specialize_layer_file, synth_clk_period_ns=select_clk_period(platform_name), board=platform_name, shell_flow_type=shell_flow_type, diff --git a/build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json deleted file mode 100644 index 5a33106..0000000 --- a/build/mobilenet-v1/specialize_layers_config/U200_specialize_layers_config.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "Defaults": {}, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "rtl" - }, - "MVAU_0": { - "preferred_impl_style": "hls" - }, - "FMPadding_0": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "rtl" - }, - "VVAU_0": { - "preferred_impl_style": "hls" - }, - "MVAU_1": { - "preferred_impl_style": "hls" - }, - "FMPadding_1": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "rtl" - }, - "VVAU_1": { - "preferred_impl_style": "hls" - }, - "MVAU_2": { - "preferred_impl_style": "hls" - }, - "FMPadding_2": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "rtl" - }, - "VVAU_2": { - "preferred_impl_style": "hls" - }, - "MVAU_3": { - "preferred_impl_style": "hls" - }, - "FMPadding_3": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "rtl" - }, - "VVAU_3": { - "preferred_impl_style": "hls" - }, - "MVAU_4": { - "preferred_impl_style": "hls" - }, - "FMPadding_4": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "rtl" - }, - "VVAU_4": { - "preferred_impl_style": "hls" - }, - "MVAU_5": { - "preferred_impl_style": "hls" - }, - "FMPadding_5": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_6": { - "preferred_impl_style": "rtl" - }, - "VVAU_5": { - "preferred_impl_style": "hls" - }, - "MVAU_6": { - "preferred_impl_style": "hls" - }, - "FMPadding_6": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_7": { - "preferred_impl_style": "rtl" - }, - "VVAU_6": { - "preferred_impl_style": "hls" - }, - "MVAU_7": { - "preferred_impl_style": "hls" - }, - "FMPadding_7": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_8": { - "preferred_impl_style": "rtl" - }, - "VVAU_7": { - "preferred_impl_style": "hls" - }, - "MVAU_8": { - "preferred_impl_style": "hls" - }, - "FMPadding_8": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_9": { - "preferred_impl_style": "rtl" - }, - "VVAU_8": { - "preferred_impl_style": "hls" - }, - "MVAU_9": { - "preferred_impl_style": "hls" - }, - "FMPadding_9": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_10": { - "preferred_impl_style": "rtl" - }, - "VVAU_9": { - "preferred_impl_style": "hls" - }, - "MVAU_10": { - "preferred_impl_style": "hls" - }, - "FMPadding_10": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_11": { - "preferred_impl_style": "rtl" - }, - "VVAU_10": { - "preferred_impl_style": "hls" - }, - "MVAU_11": { - "preferred_impl_style": "hls" - }, - "FMPadding_11": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_12": { - "preferred_impl_style": "rtl" - }, - "VVAU_11": { - "preferred_impl_style": "hls" - }, - "MVAU_12": { - "preferred_impl_style": "hls" - }, - "FMPadding_12": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_13": { - "preferred_impl_style": "rtl" - }, - "VVAU_12": { - "preferred_impl_style": "hls" - }, - "MVAU_13": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { - "preferred_impl_style": "rtl" - }, - "Pool_0": { - "preferred_impl_style": "hls" - }, - "MVAU_14": { - "preferred_impl_style": "hls" - }, - "ChannelwiseOp_0": { - "preferred_impl_style": "hls" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } - } diff --git a/build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json deleted file mode 100644 index 5a33106..0000000 --- a/build/mobilenet-v1/specialize_layers_config/U250_specialize_layers_config.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "Defaults": {}, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "rtl" - }, - "MVAU_0": { - "preferred_impl_style": "hls" - }, - "FMPadding_0": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "rtl" - }, - "VVAU_0": { - "preferred_impl_style": "hls" - }, - "MVAU_1": { - "preferred_impl_style": "hls" - }, - "FMPadding_1": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "rtl" - }, - "VVAU_1": { - "preferred_impl_style": "hls" - }, - "MVAU_2": { - "preferred_impl_style": "hls" - }, - "FMPadding_2": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "rtl" - }, - "VVAU_2": { - "preferred_impl_style": "hls" - }, - "MVAU_3": { - "preferred_impl_style": "hls" - }, - "FMPadding_3": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "rtl" - }, - "VVAU_3": { - "preferred_impl_style": "hls" - }, - "MVAU_4": { - "preferred_impl_style": "hls" - }, - "FMPadding_4": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "rtl" - }, - "VVAU_4": { - "preferred_impl_style": "hls" - }, - "MVAU_5": { - "preferred_impl_style": "hls" - }, - "FMPadding_5": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_6": { - "preferred_impl_style": "rtl" - }, - "VVAU_5": { - "preferred_impl_style": "hls" - }, - "MVAU_6": { - "preferred_impl_style": "hls" - }, - "FMPadding_6": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_7": { - "preferred_impl_style": "rtl" - }, - "VVAU_6": { - "preferred_impl_style": "hls" - }, - "MVAU_7": { - "preferred_impl_style": "hls" - }, - "FMPadding_7": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_8": { - "preferred_impl_style": "rtl" - }, - "VVAU_7": { - "preferred_impl_style": "hls" - }, - "MVAU_8": { - "preferred_impl_style": "hls" - }, - "FMPadding_8": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_9": { - "preferred_impl_style": "rtl" - }, - "VVAU_8": { - "preferred_impl_style": "hls" - }, - "MVAU_9": { - "preferred_impl_style": "hls" - }, - "FMPadding_9": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_10": { - "preferred_impl_style": "rtl" - }, - "VVAU_9": { - "preferred_impl_style": "hls" - }, - "MVAU_10": { - "preferred_impl_style": "hls" - }, - "FMPadding_10": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_11": { - "preferred_impl_style": "rtl" - }, - "VVAU_10": { - "preferred_impl_style": "hls" - }, - "MVAU_11": { - "preferred_impl_style": "hls" - }, - "FMPadding_11": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_12": { - "preferred_impl_style": "rtl" - }, - "VVAU_11": { - "preferred_impl_style": "hls" - }, - "MVAU_12": { - "preferred_impl_style": "hls" - }, - "FMPadding_12": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_13": { - "preferred_impl_style": "rtl" - }, - "VVAU_12": { - "preferred_impl_style": "hls" - }, - "MVAU_13": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { - "preferred_impl_style": "rtl" - }, - "Pool_0": { - "preferred_impl_style": "hls" - }, - "MVAU_14": { - "preferred_impl_style": "hls" - }, - "ChannelwiseOp_0": { - "preferred_impl_style": "hls" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } - } diff --git a/build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json deleted file mode 100644 index 5a33106..0000000 --- a/build/mobilenet-v1/specialize_layers_config/U280_specialize_layers_config.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "Defaults": {}, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "rtl" - }, - "MVAU_0": { - "preferred_impl_style": "hls" - }, - "FMPadding_0": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "rtl" - }, - "VVAU_0": { - "preferred_impl_style": "hls" - }, - "MVAU_1": { - "preferred_impl_style": "hls" - }, - "FMPadding_1": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "rtl" - }, - "VVAU_1": { - "preferred_impl_style": "hls" - }, - "MVAU_2": { - "preferred_impl_style": "hls" - }, - "FMPadding_2": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "rtl" - }, - "VVAU_2": { - "preferred_impl_style": "hls" - }, - "MVAU_3": { - "preferred_impl_style": "hls" - }, - "FMPadding_3": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "rtl" - }, - "VVAU_3": { - "preferred_impl_style": "hls" - }, - "MVAU_4": { - "preferred_impl_style": "hls" - }, - "FMPadding_4": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "rtl" - }, - "VVAU_4": { - "preferred_impl_style": "hls" - }, - "MVAU_5": { - "preferred_impl_style": "hls" - }, - "FMPadding_5": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_6": { - "preferred_impl_style": "rtl" - }, - "VVAU_5": { - "preferred_impl_style": "hls" - }, - "MVAU_6": { - "preferred_impl_style": "hls" - }, - "FMPadding_6": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_7": { - "preferred_impl_style": "rtl" - }, - "VVAU_6": { - "preferred_impl_style": "hls" - }, - "MVAU_7": { - "preferred_impl_style": "hls" - }, - "FMPadding_7": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_8": { - "preferred_impl_style": "rtl" - }, - "VVAU_7": { - "preferred_impl_style": "hls" - }, - "MVAU_8": { - "preferred_impl_style": "hls" - }, - "FMPadding_8": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_9": { - "preferred_impl_style": "rtl" - }, - "VVAU_8": { - "preferred_impl_style": "hls" - }, - "MVAU_9": { - "preferred_impl_style": "hls" - }, - "FMPadding_9": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_10": { - "preferred_impl_style": "rtl" - }, - "VVAU_9": { - "preferred_impl_style": "hls" - }, - "MVAU_10": { - "preferred_impl_style": "hls" - }, - "FMPadding_10": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_11": { - "preferred_impl_style": "rtl" - }, - "VVAU_10": { - "preferred_impl_style": "hls" - }, - "MVAU_11": { - "preferred_impl_style": "hls" - }, - "FMPadding_11": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_12": { - "preferred_impl_style": "rtl" - }, - "VVAU_11": { - "preferred_impl_style": "hls" - }, - "MVAU_12": { - "preferred_impl_style": "hls" - }, - "FMPadding_12": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_13": { - "preferred_impl_style": "rtl" - }, - "VVAU_12": { - "preferred_impl_style": "hls" - }, - "MVAU_13": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { - "preferred_impl_style": "rtl" - }, - "Pool_0": { - "preferred_impl_style": "hls" - }, - "MVAU_14": { - "preferred_impl_style": "hls" - }, - "ChannelwiseOp_0": { - "preferred_impl_style": "hls" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } - } diff --git a/build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json deleted file mode 100644 index 5a33106..0000000 --- a/build/mobilenet-v1/specialize_layers_config/U50_specialize_layers_config.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "Defaults": {}, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "rtl" - }, - "MVAU_0": { - "preferred_impl_style": "hls" - }, - "FMPadding_0": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "rtl" - }, - "VVAU_0": { - "preferred_impl_style": "hls" - }, - "MVAU_1": { - "preferred_impl_style": "hls" - }, - "FMPadding_1": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "rtl" - }, - "VVAU_1": { - "preferred_impl_style": "hls" - }, - "MVAU_2": { - "preferred_impl_style": "hls" - }, - "FMPadding_2": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "rtl" - }, - "VVAU_2": { - "preferred_impl_style": "hls" - }, - "MVAU_3": { - "preferred_impl_style": "hls" - }, - "FMPadding_3": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "rtl" - }, - "VVAU_3": { - "preferred_impl_style": "hls" - }, - "MVAU_4": { - "preferred_impl_style": "hls" - }, - "FMPadding_4": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "rtl" - }, - "VVAU_4": { - "preferred_impl_style": "hls" - }, - "MVAU_5": { - "preferred_impl_style": "hls" - }, - "FMPadding_5": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_6": { - "preferred_impl_style": "rtl" - }, - "VVAU_5": { - "preferred_impl_style": "hls" - }, - "MVAU_6": { - "preferred_impl_style": "hls" - }, - "FMPadding_6": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_7": { - "preferred_impl_style": "rtl" - }, - "VVAU_6": { - "preferred_impl_style": "hls" - }, - "MVAU_7": { - "preferred_impl_style": "hls" - }, - "FMPadding_7": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_8": { - "preferred_impl_style": "rtl" - }, - "VVAU_7": { - "preferred_impl_style": "hls" - }, - "MVAU_8": { - "preferred_impl_style": "hls" - }, - "FMPadding_8": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_9": { - "preferred_impl_style": "rtl" - }, - "VVAU_8": { - "preferred_impl_style": "hls" - }, - "MVAU_9": { - "preferred_impl_style": "hls" - }, - "FMPadding_9": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_10": { - "preferred_impl_style": "rtl" - }, - "VVAU_9": { - "preferred_impl_style": "hls" - }, - "MVAU_10": { - "preferred_impl_style": "hls" - }, - "FMPadding_10": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_11": { - "preferred_impl_style": "rtl" - }, - "VVAU_10": { - "preferred_impl_style": "hls" - }, - "MVAU_11": { - "preferred_impl_style": "hls" - }, - "FMPadding_11": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_12": { - "preferred_impl_style": "rtl" - }, - "VVAU_11": { - "preferred_impl_style": "hls" - }, - "MVAU_12": { - "preferred_impl_style": "hls" - }, - "FMPadding_12": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_13": { - "preferred_impl_style": "rtl" - }, - "VVAU_12": { - "preferred_impl_style": "hls" - }, - "MVAU_13": { - "preferred_impl_style": "hls" - }, - "ConvolutionInputGenerator_14": { - "preferred_impl_style": "rtl" - }, - "Pool_0": { - "preferred_impl_style": "hls" - }, - "MVAU_14": { - "preferred_impl_style": "hls" - }, - "ChannelwiseOp_0": { - "preferred_impl_style": "hls" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } - } diff --git a/build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json b/build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json deleted file mode 100644 index 640b16a..0000000 --- a/build/mobilenet-v1/specialize_layers_config/ZCU102_specialize_layers_config.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "Defaults": {}, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "rtl" - }, - "MVAU_0": { - "preferred_impl_style": "rtl" - }, - "Thresholding_0": { - "preferred_impl_style": "rtl" - }, - "FMPadding_0": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "rtl" - }, - "VVAU_0": { - "preferred_impl_style": "hls" - }, - "Thresholding_1": { - "preferred_impl_style": "rtl" - }, - "MVAU_1": { - "preferred_impl_style": "rtl" - }, - "Thresholding_2": { - "preferred_impl_style": "rtl" - }, - "FMPadding_1": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "rtl" - }, - "VVAU_1": { - "preferred_impl_style": "hls" - }, - "Thresholding_3": { - "preferred_impl_style": "rtl" - }, - "MVAU_2": { - "preferred_impl_style": "rtl" - }, - "Thresholding_4": { - "preferred_impl_style": "rtl" - }, - "FMPadding_2": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "rtl" - }, - "VVAU_2": { - "preferred_impl_style": "hls" - }, - "Thresholding_5": { - "preferred_impl_style": "rtl" - }, - "MVAU_3": { - "preferred_impl_style": "rtl" - }, - "Thresholding_6": { - "preferred_impl_style": "rtl" - }, - "FMPadding_3": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "rtl" - }, - "VVAU_3": { - "preferred_impl_style": "hls" - }, - "Thresholding_7": { - "preferred_impl_style": "rtl" - }, - "MVAU_4": { - "preferred_impl_style": "rtl" - }, - "Thresholding_8": { - "preferred_impl_style": "rtl" - }, - "FMPadding_4": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "rtl" - }, - "VVAU_4": { - "preferred_impl_style": "hls" - }, - "Thresholding_9": { - "preferred_impl_style": "rtl" - }, - "MVAU_5": { - "preferred_impl_style": "rtl" - }, - "Thresholding_10": { - "preferred_impl_style": "rtl" - }, - "FMPadding_5": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_6": { - "preferred_impl_style": "rtl" - }, - "VVAU_5": { - "preferred_impl_style": "hls" - }, - "Thresholding_11": { - "preferred_impl_style": "rtl" - }, - "MVAU_6": { - "preferred_impl_style": "rtl" - }, - "Thresholding_12": { - "preferred_impl_style": "rtl" - }, - "FMPadding_6": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_7": { - "preferred_impl_style": "rtl" - }, - "VVAU_6": { - "preferred_impl_style": "hls" - }, - "Thresholding_13": { - "preferred_impl_style": "rtl" - }, - "MVAU_7": { - "preferred_impl_style": "rtl" - }, - "Thresholding_14": { - "preferred_impl_style": "rtl" - }, - "FMPadding_7": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_8": { - "preferred_impl_style": "rtl" - }, - "VVAU_7": { - "preferred_impl_style": "hls" - }, - "Thresholding_15": { - "preferred_impl_style": "rtl" - }, - "MVAU_8": { - "preferred_impl_style": "rtl" - }, - "Thresholding_16": { - "preferred_impl_style": "rtl" - }, - "FMPadding_8": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_9": { - "preferred_impl_style": "rtl" - }, - "VVAU_8": { - "preferred_impl_style": "hls" - }, - "Thresholding_17": { - "preferred_impl_style": "rtl" - }, - "MVAU_9": { - "preferred_impl_style": "rtl" - }, - "Thresholding_18": { - "preferred_impl_style": "rtl" - }, - "FMPadding_9": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_10": { - "preferred_impl_style": "rtl" - }, - "VVAU_9": { - "preferred_impl_style": "hls" - }, - "Thresholding_19": { - "preferred_impl_style": "rtl" - }, - "MVAU_10": { - "preferred_impl_style": "rtl" - }, - "Thresholding_20": { - "preferred_impl_style": "rtl" - }, - "FMPadding_10": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_11": { - "preferred_impl_style": "rtl" - }, - "VVAU_10": { - "preferred_impl_style": "hls" - }, - "Thresholding_21": { - "preferred_impl_style": "rtl" - }, - "MVAU_11": { - "preferred_impl_style": "rtl" - }, - "Thresholding_22": { - "preferred_impl_style": "rtl" - }, - "FMPadding_11": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_12": { - "preferred_impl_style": "rtl" - }, - "VVAU_11": { - "preferred_impl_style": "hls" - }, - "Thresholding_23": { - "preferred_impl_style": "rtl" - }, - "MVAU_12": { - "preferred_impl_style": "rtl" - }, - "Thresholding_24": { - "preferred_impl_style": "rtl" - }, - "FMPadding_12": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_13": { - "preferred_impl_style": "rtl" - }, - "VVAU_12": { - "preferred_impl_style": "hls" - }, - "Thresholding_25": { - "preferred_impl_style": "rtl" - }, - "MVAU_13": { - "preferred_impl_style": "rtl" - }, - "Thresholding_26": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_14": { - "preferred_impl_style": "rtl" - }, - "Pool_0": { - "preferred_impl_style": "hls" - }, - "MVAU_14": { - "preferred_impl_style": "rtl" - }, - "ChannelwiseOp_0": { - "preferred_impl_style": "hls" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } - } diff --git a/build/resnet50/build.py b/build/resnet50/build.py index 6688aed..6f0dfc8 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -101,7 +101,7 @@ def platform_to_shell(platform): platform_dir = "release/%s" % release_platform_name os.makedirs(platform_dir, exist_ok=True) - folding_config_file = "folding_config/U250_folding_config_no_doublepack_pe_folded_16.json" + folding_config_file = "folding_config/U250_folding_config.json" cfg = build_cfg.DataflowBuildConfig( steps=resnet50_build_steps, diff --git a/build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json b/build/resnet50/folding_config/U250_folding_config.json similarity index 100% rename from build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json rename to build/resnet50/folding_config/U250_folding_config.json diff --git a/build/vgg10-radioml/specialize_layers_config.json b/build/vgg10-radioml/specialize_layers_config.json deleted file mode 100644 index 04279b2..0000000 --- a/build/vgg10-radioml/specialize_layers_config.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "Defaults": {}, - "FMPadding_0": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_0": { - "preferred_impl_style": "rtl" - }, - "MVAU_0": { - "preferred_impl_style": "rtl" - }, - "Thresholding_0": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_0": { - "preferred_impl_style": "hls" - }, - "FMPadding_1": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_1": { - "preferred_impl_style": "rtl" - }, - "MVAU_1": { - "preferred_impl_style": "rtl" - }, - "Thresholding_1": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_1": { - "preferred_impl_style": "hls" - }, - "FMPadding_2": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_2": { - "preferred_impl_style": "rtl" - }, - "MVAU_2": { - "preferred_impl_style": "rtl" - }, - "Thresholding_2": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_2": { - "preferred_impl_style": "hls" - }, - "FMPadding_3": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_3": { - "preferred_impl_style": "rtl" - }, - "MVAU_3": { - "preferred_impl_style": "rtl" - }, - "Thresholding_3": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_3": { - "preferred_impl_style": "hls" - }, - "FMPadding_4": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_4": { - "preferred_impl_style": "rtl" - }, - "MVAU_4": { - "preferred_impl_style": "rtl" - }, - "Thresholding_4": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_4": { - "preferred_impl_style": "hls" - }, - "FMPadding_5": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_5": { - "preferred_impl_style": "rtl" - }, - "MVAU_5": { - "preferred_impl_style": "rtl" - }, - "Thresholding_5": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_5": { - "preferred_impl_style": "hls" - }, - "FMPadding_6": { - "preferred_impl_style": "rtl" - }, - "ConvolutionInputGenerator_6": { - "preferred_impl_style": "rtl" - }, - "MVAU_6": { - "preferred_impl_style": "rtl" - }, - "Thresholding_6": { - "preferred_impl_style": "rtl" - }, - "StreamingMaxPool_6": { - "preferred_impl_style": "hls" - }, - "MVAU_7": { - "preferred_impl_style": "rtl" - }, - "Thresholding_7": { - "preferred_impl_style": "rtl" - }, - "MVAU_8": { - "preferred_impl_style": "rtl" - }, - "Thresholding_8": { - "preferred_impl_style": "rtl" - }, - "MVAU_9": { - "preferred_impl_style": "rtl" - }, - "ChannelwiseOp_0": { - "preferred_impl_style": "rtl" - }, - "LabelSelect_0": { - "preferred_impl_style": "hls" - } -}