From f03f9ab89bfad15cc12b14023762c69ff5611fea Mon Sep 17 00:00:00 2001 From: Lucian Petrica Date: Mon, 18 Jan 2021 13:07:40 +0000 Subject: [PATCH 01/11] First commit of rn50 --- build/resnet50/README.md | 0 build/resnet50/build.py | 81 +++ build/resnet50/custom_steps.py | 247 ++++++++ .../folding_config/U250_folding_config.json | 584 ++++++++++++++++++ build/resnet50/models/download_resnet50.sh | 4 + 5 files changed, 916 insertions(+) create mode 100644 build/resnet50/README.md create mode 100644 build/resnet50/build.py create mode 100644 build/resnet50/custom_steps.py create mode 100644 build/resnet50/folding_config/U250_folding_config.json create mode 100755 build/resnet50/models/download_resnet50.sh diff --git a/build/resnet50/README.md b/build/resnet50/README.md new file mode 100644 index 0000000..e69de29 diff --git a/build/resnet50/build.py b/build/resnet50/build.py new file mode 100644 index 0000000..40d1475 --- /dev/null +++ b/build/resnet50/build.py @@ -0,0 +1,81 @@ +# Copyright (c) 2020, Xilinx +# 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 + +# custom steps for resnet50v1.5 +from custom_steps import ( + step_resnet50_tidy, + step_resnet50_streamline, + step_resnet50_convert_to_hls +) + +model_name = "resnet50-w1a2" +board = "U250" +vitis_platform = "xilinx_u250_xdma_201830_2" +synth_clk_period_ns = 4.0 +target_fps = 300 + +mobilenet_build_steps = [ + step_resnet50_tidy, + step_resnet50_streamline, + step_resnet50_convert_to_hls, + "step_create_dataflow_partition", + "step_apply_folding_config", + "step_generate_estimate_reports", + "step_hls_ipgen", + "step_set_fifo_depths", + "step_create_stitched_ip", + "step_make_pynq_driver", + "step_synthesize_bitfile", + "step_deployment_package", +] + + +cfg = build_cfg.DataflowBuildConfig( + steps=mobilenet_build_steps, + output_dir="output_%s_%s" % (model_name, board), + synth_clk_period_ns=synth_clk_period_ns, + board=board, + shell_flow_type=build_cfg.ShellFlowType.VITIS_ALVEO, + vitis_platform=vitis_platform, + # throughput parameters (auto-folding) + mvau_wwidth_max = 24, + target_fps = target_fps, + # enable extra performance optimizations (physopt) + vitis_opt_strategy=build_cfg.VitisOptStrategyCfg.PERFORMANCE_BEST, + generate_outputs=[ + build_cfg.DataflowOutputType.PYNQ_DRIVER, + build_cfg.DataflowOutputType.ESTIMATE_REPORTS, + build_cfg.DataflowOutputType.BITFILE, + build_cfg.DataflowOutputType.DEPLOYMENT_PACKAGE, + ], +) +model_file = "models/%s_export.onnx" % model_name +build.build_dataflow_cfg(model_file, cfg) diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py new file mode 100644 index 0000000..1fab67a --- /dev/null +++ b/build/resnet50/custom_steps.py @@ -0,0 +1,247 @@ +# Copyright (c) 2020, Xilinx +# 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. + +# from finn.core.modelwrapper import ModelWrapper +import numpy as np +import copy + +from finn.transformation.fold_constants import FoldConstants + +from finn.transformation.infer_datatypes import InferDataTypes +from finn.transformation.general import ( + ConvertSubToAdd, + ConvertDivToMul, + GiveReadableTensorNames, + GiveUniqueNodeNames, + SortGraph, + RemoveUnusedTensors, + GiveUniqueParameterTensors, + RemoveStaticGraphInputs +) + +from finn.transformation.streamline.absorb import ( + AbsorbScalarMulAddIntoTopK, + AbsorbAddIntoMultiThreshold, + AbsorbMulIntoMultiThreshold, + FactorOutMulSignMagnitude, + Absorb1BitMulIntoMatMul, + Absorb1BitMulIntoConv, +) + +from finn.transformation.streamline.collapse_repeated import ( + CollapseRepeatedAdd, + CollapseRepeatedMul, +) + +from finn.transformation.streamline.reorder import ( + MoveAddPastMul, + MoveScalarMulPastMatMul, + MoveScalarAddPastMatMul, + MoveAddPastConv, + MoveScalarMulPastConv, + MoveScalarLinearPastInvariants, + MoveMaxPoolPastMultiThreshold +) + +from finn.transformation.streamline.round_thresholds import RoundAndClipThresholds +from finn.transformation.streamline.sign_to_thres import ConvertSignToThres +from finn.transformation.batchnorm_to_affine import BatchNormToAffine + +## just for not linear +from finn.transformation.streamline.reorder import ( + MoveLinearPastEltwiseAdd, + MoveLinearPastFork, + ) + +from finn.transformation.double_to_single_float import DoubleToSingleFloat +from finn.transformation.streamline.remove import RemoveIdentityOps +from finn.core.datatype import DataType + +from finn.transformation.infer_shapes import InferShapes +from finn.transformation.infer_datatypes import InferDataTypes +from finn.transformation.infer_data_layouts import InferDataLayouts +from finn.transformation.general import ( + GiveReadableTensorNames, + GiveUniqueNodeNames, + SortGraph, + RemoveUnusedTensors +) + + +from finn.transformation.streamline.absorb import ( + AbsorbConsecutiveTransposes, + AbsorbTransposeIntoMultiThreshold, +) + +from finn.transformation.streamline.collapse_repeated import ( + CollapseRepeatedAdd, + CollapseRepeatedMul, +) + +from finn.transformation.streamline.reorder import ( + MoveScalarLinearPastInvariants, + MoveAddPastMul, + MoveScalarMulPastMatMul, + MoveScalarAddPastMatMul, +) + +from finn.transformation.insert_topk import InsertTopK +from finn.transformation.streamline.round_thresholds import RoundAndClipThresholds +from finn.transformation.double_to_single_float import DoubleToSingleFloat +import finn.transformation.fpgadataflow.convert_to_hls_layers as to_hls +from finn.transformation.lower_convs_to_matmul import LowerConvsToMatMul + +from finn.core.modelwrapper import ModelWrapper +from finn.custom_op.registry import getCustomOp +from finn.builder.build_dataflow_config import DataflowBuildConfig + +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 + + +def step_resnet50_tidy(model: ModelWrapper, cfg: DataflowBuildConfig): + model = model.transform(GiveUniqueParameterTensors()) + model = model.transform(InferShapes()) + model = model.transform(FoldConstants()) + model = model.transform(RemoveStaticGraphInputs()) + model = model.transform(GiveUniqueNodeNames()) + model = model.transform(GiveReadableTensorNames()) + model = model.transform(InferDataTypes()) + model = model.transform(InsertTopK()) + model = model.transform(InferShapes()) + model = model.transform(GiveUniqueNodeNames()) + model = model.transform(GiveReadableTensorNames()) + model = model.transform(InferDataTypes()) + return model + +def step_resnet50_streamline_linear(model: ModelWrapper, cfg: DataflowBuildConfig): + streamline_transformations = [ + AbsorbScalarMulAddIntoTopK(), # before MoveAddPastMul to avoid int->float + ConvertSubToAdd(), + ConvertDivToMul(), + RemoveIdentityOps(), + CollapseRepeatedMul(), + BatchNormToAffine(), + ConvertSignToThres(), + MoveAddPastMul(), + MoveScalarAddPastMatMul(), + MoveAddPastConv(), + MoveScalarMulPastMatMul(), + MoveScalarMulPastConv(), + MoveScalarLinearPastInvariants(), + MoveAddPastMul(), + CollapseRepeatedAdd(), + CollapseRepeatedMul(), + AbsorbAddIntoMultiThreshold(), + FactorOutMulSignMagnitude(), + MoveMaxPoolPastMultiThreshold(), + AbsorbMulIntoMultiThreshold(), + Absorb1BitMulIntoMatMul(), + Absorb1BitMulIntoConv(), + ] + for trn in streamline_transformations: + model = model.transform(trn) + model = model.transform(GiveUniqueNodeNames()) + return model + +def step_resnet50_streamline_nonlinear(model: ModelWrapper, cfg: DataflowBuildConfig): + streamline_transformations = [ + MoveLinearPastEltwiseAdd(), + MoveLinearPastFork(), + ] + for trn in streamline_transformations: + model = model.transform(trn) + model = model.transform(GiveUniqueNodeNames()) + return model + + +def step_resnet50_streamline(model: ModelWrapper, cfg: DataflowBuildConfig): + + for iter_id in range(4): + model = step_resnet50_streamline_linear(model, cfg) + model = step_resnet50_streamline_nonlinear(model, cfg) + + # big loop tidy up + model = model.transform(RemoveUnusedTensors()) + model = model.transform(GiveReadableTensorNames()) + model = model.transform(InferDataTypes()) + model = model.transform(SortGraph()) + + model = model.transform(DoubleToSingleFloat()) + + return model + + +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 finn.transformation.experimental.infer_doublepacked_dsp import InferDoublePackedConv + model = model.transform(InferDoublePackedConv([1])) + except: + print(" FINN Experimental not available. Using non-packed convolution ") + + + model = model.transform(DoubleToSingleFloat()) + model = model.transform(InferDataTypes()) + model = model.transform(SortGraph()) + + to_hls_transformations = [ + to_hls.InferAddStreamsLayer, + LowerConvsToMatMul, + to_hls.InferChannelwiseLinearLayer, + to_hls.InferPool_Batch, + AbsorbTransposeIntoMultiThreshold, + RoundAndClipThresholds, + to_hls.InferQuantizedStreamingFCLayer, + to_hls.InferThresholdingLayer, + AbsorbConsecutiveTransposes, + to_hls.InferConvInpGen, + to_hls.InferDuplicateStreamsLayer, + to_hls.InferLabelSelectLayer, + + ] + for trn in to_hls_transformations: + model = model.transform(trn()) + model = model.transform(InferDataLayouts()) + model = model.transform(GiveUniqueNodeNames()) + model = model.transform(InferDataTypes()) + + model = model.transform(RemoveCNVtoFCFlatten()) + model = model.transform(GiveReadableTensorNames()) + model = model.transform(RemoveUnusedTensors()) + model = model.transform(SortGraph()) + + return model + + diff --git a/build/resnet50/folding_config/U250_folding_config.json b/build/resnet50/folding_config/U250_folding_config.json new file mode 100644 index 0000000..ca7ef37 --- /dev/null +++ b/build/resnet50/folding_config/U250_folding_config.json @@ -0,0 +1,584 @@ +{ + "Defaults": { + "outFIFODepth":[32,"all"], + "inFIFODepth":[32,"all"], + "mem_mode":["decoupled",["StreamingFCLayer_Batch"]] + }, + "ConvDoublePacked_Batch_0": { + "SIMD": 3, + "PE": 64, + "MMV": 16 + }, + "FMPadding_Batch_0": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_0": { + "SIMD": 64 + }, + "Pool_Batch_0": { + "PE": 64 + }, + "DuplicateStreams_Batch_0": { + "PE": 32 + }, + "StreamingFCLayer_Batch_1": { + "PE": 32, + "SIMD": 32 + }, + "StreamingFCLayer_Batch_0": { + "PE": 8, + "SIMD": 32 + }, + "FMPadding_Batch_1": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_1": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_2": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_3": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_0": { + "PE": 32 + }, + "Thresholding_Batch_0": { + "PE": 32 + }, + "DuplicateStreams_Batch_1": { + "PE": 32 + }, + "Thresholding_Batch_1": { + "PE": 32 + }, + "Thresholding_Batch_2": { + "PE": 32 + }, + "StreamingFCLayer_Batch_4": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_2": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_2": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_5": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_6": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_1": { + "PE": 32 + }, + "Thresholding_Batch_3": { + "PE": 32 + }, + "DuplicateStreams_Batch_2": { + "PE": 32 + }, + "Thresholding_Batch_4": { + "PE": 32 + }, + "Thresholding_Batch_5": { + "PE": 32 + }, + "StreamingFCLayer_Batch_7": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_3": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_3": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_8": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_9": { + "PE": 32, + "SIMD": 64 + }, + "AddStreams_Batch_2": { + "PE":32 + }, + "Thresholding_Batch_6": { + "PE": 32 + }, + "Thresholding_Batch_7": { + "PE": 32 + }, + "DuplicateStreams_Batch_3": { + "PE": 32 + }, + "DownSampler_0": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_10": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_11": { + "PE": 32, + "SIMD": 64 + }, + "FMPadding_Batch_4": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_4": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_12": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_13": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_3": { + "PE":32 + }, + "Thresholding_Batch_8": { + "PE": 32 + }, + "DuplicateStreams_Batch_4": { + "PE": 32 + }, + "Thresholding_Batch_9": { + "PE": 32 + }, + "Thresholding_Batch_10": { + "PE": 32 + }, + "StreamingFCLayer_Batch_14": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_5": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_5": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_15": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_16": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_4": { + "PE":32 + }, + "Thresholding_Batch_11": { + "PE": 32 + }, + "DuplicateStreams_Batch_5": { + "PE": 32 + }, + "Thresholding_Batch_12": { + "PE": 32 + }, + "Thresholding_Batch_13": { + "PE": 32 + }, + "StreamingFCLayer_Batch_17": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_6": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_6": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_18": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_19": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_5": { + "PE":32 + }, + "Thresholding_Batch_14": { + "PE": 32 + }, + "DuplicateStreams_Batch_6": { + "PE": 32 + }, + "Thresholding_Batch_15": { + "PE": 32 + }, + "Thresholding_Batch_16": { + "PE": 32 + }, + "StreamingFCLayer_Batch_20": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_7": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_7": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_21": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_22": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_6": { + "PE":32 + }, + "Thresholding_Batch_17": { + "PE": 32 + }, + "Thresholding_Batch_18": { + "PE": 32 + }, + "DuplicateStreams_Batch_7": { + "PE": 32 + }, + "DownSampler_1": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_23": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_24": { + "PE": 32, + "SIMD": 64 + }, + "FMPadding_Batch_8": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_8": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_25": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_26": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_7": { + "PE":32 + }, + "Thresholding_Batch_19": { + "PE": 32 + }, + "DuplicateStreams_Batch_8": { + "PE": 32 + }, + "Thresholding_Batch_20": { + "PE": 32 + }, + "Thresholding_Batch_21": { + "PE": 32 + }, + "StreamingFCLayer_Batch_27": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_9": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_9": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_28": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_29": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_8": { + "PE":32 + }, + "Thresholding_Batch_22": { + "PE": 32 + }, + "DuplicateStreams_Batch_9": { + "PE": 32 + }, + "Thresholding_Batch_23": { + "PE": 32 + }, + "Thresholding_Batch_24": { + "PE": 32 + }, + "StreamingFCLayer_Batch_30": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_10": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_10": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_31": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_32": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_9": { + "PE":32 + }, + "Thresholding_Batch_25": { + "PE": 32 + }, + "DuplicateStreams_Batch_10": { + "PE": 32 + }, + "Thresholding_Batch_26": { + "PE": 32 + }, + "Thresholding_Batch_27": { + "PE": 32 + }, + "StreamingFCLayer_Batch_33": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_11": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_11": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_34": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_35": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_10": { + "PE":32 + }, + "Thresholding_Batch_28": { + "PE": 32 + }, + "DuplicateStreams_Batch_11": { + "PE": 32 + }, + "Thresholding_Batch_29": { + "PE": 32 + }, + "Thresholding_Batch_30": { + "PE": 32 + }, + "StreamingFCLayer_Batch_36": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_12": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_12": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_37": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_38": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_11": { + "PE":32 + }, + "Thresholding_Batch_31": { + "PE": 32 + }, + "DuplicateStreams_Batch_12": { + "PE": 32 + }, + "Thresholding_Batch_32": { + "PE": 32 + }, + "Thresholding_Batch_33": { + "PE": 32 + }, + "StreamingFCLayer_Batch_39": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_13": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_13": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_40": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_41": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_12": { + "PE":32 + }, + "Thresholding_Batch_34": { + "PE": 32 + }, + "Thresholding_Batch_35": { + "PE": 32 + }, + "DuplicateStreams_Batch_13": { + "PE": 32 + }, + "DownSampler_2": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_42": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_43": { + "PE": 32, + "SIMD": 64 + }, + "FMPadding_Batch_14": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_14": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_44": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_45": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_13": { + "PE":32 + }, + "Thresholding_Batch_36": { + "PE": 32 + }, + "DuplicateStreams_Batch_14": { + "PE": 32 + }, + "Thresholding_Batch_37": { + "PE": 32 + }, + "Thresholding_Batch_38": { + "PE": 32 + }, + "StreamingFCLayer_Batch_46": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_15": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_15": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_47": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_48": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_14": { + "PE":32 + }, + "Thresholding_Batch_39": { + "PE": 32 + }, + "DuplicateStreams_Batch_15": { + "PE": 32 + }, + "Thresholding_Batch_40": { + "PE": 32 + }, + "Thresholding_Batch_41": { + "PE": 32 + }, + "StreamingFCLayer_Batch_49": { + "PE": 32, + "SIMD": 32 + }, + "FMPadding_Batch_16": { + "SIMD": 64 + }, + "ConvolutionInputGenerator_16": { + "SIMD": 64 + }, + "StreamingFCLayer_Batch_50": { + "PE": 32, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_51": { + "PE": 32, + "SIMD": 32 + }, + "AddStreams_Batch_15": { + "PE":32 + }, + "Thresholding_Batch_42": { + "PE": 32 + }, + + "ConvolutionInputGenerator_17": { + "SIMD": 64 + }, + "Pool_Batch_1": { + "PE": 64 + }, + "StreamingFCLayer_Batch_52": { + "PE": 1, + "SIMD": 64, + "mem_mode" : "external" + }, + "LabelSelect_Batch_0": { + "outputDataType":"UINT16", + "PE": 1 + }, + "ChannelwiseOp_Batch_0": { + "PE": 32 + }, + "ChannelwiseOp_Batch_1": { + "PE": 32 + }, + "ChannelwiseOp_Batch_2": { + "PE": 1 + } +} diff --git a/build/resnet50/models/download_resnet50.sh b/build/resnet50/models/download_resnet50.sh new file mode 100755 index 0000000..9be13c8 --- /dev/null +++ b/build/resnet50/models/download_resnet50.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.1a/onnx-models-resnet50v1.5.zip +unzip onnx-models-resnet50v1.5.zip From 333fa3ca983b99d4b4800ea662b811b95daeca39 Mon Sep 17 00:00:00 2001 From: Tobi-Alonso Date: Thu, 4 Mar 2021 17:20:09 +0000 Subject: [PATCH 02/11] Rn50 build tested until step_resnet50_set_fifo_depths with and without DoublePackedConv --- build/resnet50/build.py | 31 +- build/resnet50/custom_steps.py | 64 +- ...ing_config_no_doublepack_pe_folded_16.json | 599 ++++++++++++++++++ build/resnet50/models/download_resnet50.sh | 4 +- 4 files changed, 684 insertions(+), 14 deletions(-) create mode 100644 build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json diff --git a/build/resnet50/build.py b/build/resnet50/build.py index 40d1475..f64fd60 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -28,38 +28,46 @@ import finn.builder.build_dataflow as build import finn.builder.build_dataflow_config as build_cfg - +from warnings import warn # custom steps for resnet50v1.5 from custom_steps import ( step_resnet50_tidy, step_resnet50_streamline, - step_resnet50_convert_to_hls + step_resnet50_convert_to_hls, + step_resnet50_set_fifo_depths ) -model_name = "resnet50-w1a2" +model_name = "resnet50_w1a2" board = "U250" vitis_platform = "xilinx_u250_xdma_201830_2" synth_clk_period_ns = 4.0 target_fps = 300 -mobilenet_build_steps = [ +resnet50_build_steps = [ step_resnet50_tidy, step_resnet50_streamline, step_resnet50_convert_to_hls, "step_create_dataflow_partition", "step_apply_folding_config", "step_generate_estimate_reports", - "step_hls_ipgen", - "step_set_fifo_depths", - "step_create_stitched_ip", - "step_make_pynq_driver", + # "step_hls_ipgen", + step_resnet50_set_fifo_depths, # "step_set_fifo_depths", + # "step_create_stitched_ip", "step_synthesize_bitfile", + "step_make_pynq_driver", "step_deployment_package", ] +try: + from finn.transformation.fpgadataflow.infer_doublepacked_dsp import InferDoublePackedConv + 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 ") + folding_config_file="folding_config/U250_folding_config_no_doublepack_pe_folded_16.json" cfg = build_cfg.DataflowBuildConfig( - steps=mobilenet_build_steps, + steps=resnet50_build_steps, output_dir="output_%s_%s" % (model_name, board), synth_clk_period_ns=synth_clk_period_ns, board=board, @@ -68,6 +76,8 @@ # throughput parameters (auto-folding) mvau_wwidth_max = 24, target_fps = target_fps, + folding_config_file = folding_config_file, + auto_fifo_depths=False, # enable extra performance optimizations (physopt) vitis_opt_strategy=build_cfg.VitisOptStrategyCfg.PERFORMANCE_BEST, generate_outputs=[ @@ -77,5 +87,6 @@ build_cfg.DataflowOutputType.DEPLOYMENT_PACKAGE, ], ) -model_file = "models/%s_export.onnx" % model_name + +model_file = "models/%s_exported.onnx" % model_name build.build_dataflow_cfg(model_file, cfg) diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index 1fab67a..a6dee59 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -41,7 +41,8 @@ SortGraph, RemoveUnusedTensors, GiveUniqueParameterTensors, - RemoveStaticGraphInputs + RemoveStaticGraphInputs, + ApplyConfig, ) from finn.transformation.streamline.absorb import ( @@ -127,6 +128,13 @@ from finn.transformation.move_reshape import RemoveCNVtoFCFlatten +from finn.util.config import extract_model_config_to_json +from finn.transformation.fpgadataflow.set_fifo_depths import ( + InsertAndSetFIFODepths, + RemoveShallowFIFOs, +) +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()) @@ -206,7 +214,7 @@ def step_resnet50_convert_to_hls(model: ModelWrapper, cfg: DataflowBuildConfig): model = model.transform(InferDataLayouts()) try: - from finn.transformation.experimental.infer_doublepacked_dsp import InferDoublePackedConv + from finn.transformation.fpgadataflow.infer_doublepacked_dsp import InferDoublePackedConv model = model.transform(InferDoublePackedConv([1])) except: print(" FINN Experimental not available. Using non-packed convolution ") @@ -245,3 +253,55 @@ 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)) + # 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 + ) + + return model 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 new file mode 100644 index 0000000..3f9b330 --- /dev/null +++ b/build/resnet50/folding_config/U250_folding_config_no_doublepack_pe_folded_16.json @@ -0,0 +1,599 @@ +{ + "Defaults": { + "outFIFODepth": [ + 32, + "all" + ], + "inFIFODepth": [ + 32, + "all" + ], + "mem_mode": [ + "decoupled", + [ + "StreamingFCLayer_Batch" + ] + ] + }, + "FMPadding_Batch_0": { + "SIMD": 3 + }, + "ConvolutionInputGenerator_0": { + "SIMD": 3 + }, + "StreamingFCLayer_Batch_0": { + "SIMD": 3, + "PE": 64 + }, + "FMPadding_Batch_1": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_1": { + "SIMD": 4 + }, + "Pool_Batch_0": { + "PE": 4 + }, + "DuplicateStreams_Batch_0": { + "PE": 2 + }, + "StreamingFCLayer_Batch_2": { + "PE": 2, + "SIMD": 32 + }, + "StreamingFCLayer_Batch_1": { + "PE": 1, + "SIMD": 16 + }, + "FMPadding_Batch_2": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_2": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_3": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_4": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_0": { + "PE": 2 + }, + "Thresholding_Batch_0": { + "PE": 2 + }, + "DuplicateStreams_Batch_1": { + "PE": 2 + }, + "Thresholding_Batch_1": { + "PE": 2 + }, + "Thresholding_Batch_2": { + "PE": 2 + }, + "StreamingFCLayer_Batch_5": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_3": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_3": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_6": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_7": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_1": { + "PE": 2 + }, + "Thresholding_Batch_3": { + "PE": 2 + }, + "DuplicateStreams_Batch_2": { + "PE": 2 + }, + "Thresholding_Batch_4": { + "PE": 2 + }, + "Thresholding_Batch_5": { + "PE": 2 + }, + "StreamingFCLayer_Batch_8": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_4": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_4": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_9": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_10": { + "PE": 2, + "SIMD": 64 + }, + "AddStreams_Batch_2": { + "PE": 2 + }, + "Thresholding_Batch_6": { + "PE": 2 + }, + "Thresholding_Batch_7": { + "PE": 2 + }, + "DuplicateStreams_Batch_3": { + "PE": 2 + }, + "DownSampler_0": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_11": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_12": { + "PE": 2, + "SIMD": 64 + }, + "FMPadding_Batch_5": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_5": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_13": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_14": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_3": { + "PE": 2 + }, + "Thresholding_Batch_8": { + "PE": 2 + }, + "DuplicateStreams_Batch_4": { + "PE": 2 + }, + "Thresholding_Batch_9": { + "PE": 2 + }, + "Thresholding_Batch_10": { + "PE": 2 + }, + "StreamingFCLayer_Batch_15": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_6": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_6": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_16": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_17": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_4": { + "PE": 2 + }, + "Thresholding_Batch_11": { + "PE": 2 + }, + "DuplicateStreams_Batch_5": { + "PE": 2 + }, + "Thresholding_Batch_12": { + "PE": 2 + }, + "Thresholding_Batch_13": { + "PE": 2 + }, + "StreamingFCLayer_Batch_18": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_7": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_7": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_19": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_20": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_5": { + "PE": 2 + }, + "Thresholding_Batch_14": { + "PE": 2 + }, + "DuplicateStreams_Batch_6": { + "PE": 2 + }, + "Thresholding_Batch_15": { + "PE": 2 + }, + "Thresholding_Batch_16": { + "PE": 2 + }, + "StreamingFCLayer_Batch_21": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_8": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_8": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_22": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_23": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_6": { + "PE": 2 + }, + "Thresholding_Batch_17": { + "PE": 2 + }, + "Thresholding_Batch_18": { + "PE": 2 + }, + "DuplicateStreams_Batch_7": { + "PE": 2 + }, + "DownSampler_1": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_24": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_25": { + "PE": 2, + "SIMD": 64 + }, + "FMPadding_Batch_9": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_9": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_26": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_27": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_7": { + "PE": 2 + }, + "Thresholding_Batch_19": { + "PE": 2 + }, + "DuplicateStreams_Batch_8": { + "PE": 2 + }, + "Thresholding_Batch_20": { + "PE": 2 + }, + "Thresholding_Batch_21": { + "PE": 2 + }, + "StreamingFCLayer_Batch_28": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_10": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_10": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_29": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_30": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_8": { + "PE": 2 + }, + "Thresholding_Batch_22": { + "PE": 2 + }, + "DuplicateStreams_Batch_9": { + "PE": 2 + }, + "Thresholding_Batch_23": { + "PE": 2 + }, + "Thresholding_Batch_24": { + "PE": 2 + }, + "StreamingFCLayer_Batch_31": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_11": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_11": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_32": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_33": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_9": { + "PE": 2 + }, + "Thresholding_Batch_25": { + "PE": 2 + }, + "DuplicateStreams_Batch_10": { + "PE": 2 + }, + "Thresholding_Batch_26": { + "PE": 2 + }, + "Thresholding_Batch_27": { + "PE": 2 + }, + "StreamingFCLayer_Batch_34": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_12": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_12": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_35": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_36": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_10": { + "PE": 2 + }, + "Thresholding_Batch_28": { + "PE": 2 + }, + "DuplicateStreams_Batch_11": { + "PE": 2 + }, + "Thresholding_Batch_29": { + "PE": 2 + }, + "Thresholding_Batch_30": { + "PE": 2 + }, + "StreamingFCLayer_Batch_37": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_13": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_13": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_38": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_39": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_11": { + "PE": 2 + }, + "Thresholding_Batch_31": { + "PE": 2 + }, + "DuplicateStreams_Batch_12": { + "PE": 2 + }, + "Thresholding_Batch_32": { + "PE": 2 + }, + "Thresholding_Batch_33": { + "PE": 2 + }, + "StreamingFCLayer_Batch_40": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_14": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_14": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_41": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_42": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_12": { + "PE": 2 + }, + "Thresholding_Batch_34": { + "PE": 2 + }, + "Thresholding_Batch_35": { + "PE": 2 + }, + "DuplicateStreams_Batch_13": { + "PE": 2 + }, + "DownSampler_2": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_43": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_44": { + "PE": 2, + "SIMD": 64 + }, + "FMPadding_Batch_15": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_15": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_45": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_46": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_13": { + "PE": 2 + }, + "Thresholding_Batch_36": { + "PE": 2 + }, + "DuplicateStreams_Batch_14": { + "PE": 2 + }, + "Thresholding_Batch_37": { + "PE": 2 + }, + "Thresholding_Batch_38": { + "PE": 2 + }, + "StreamingFCLayer_Batch_47": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_16": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_16": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_48": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_49": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_14": { + "PE": 2 + }, + "Thresholding_Batch_39": { + "PE": 2 + }, + "DuplicateStreams_Batch_15": { + "PE": 2 + }, + "Thresholding_Batch_40": { + "PE": 2 + }, + "Thresholding_Batch_41": { + "PE": 2 + }, + "StreamingFCLayer_Batch_50": { + "PE": 2, + "SIMD": 32 + }, + "FMPadding_Batch_17": { + "SIMD": 4 + }, + "ConvolutionInputGenerator_17": { + "SIMD": 4 + }, + "StreamingFCLayer_Batch_51": { + "PE": 2, + "SIMD": 64 + }, + "StreamingFCLayer_Batch_52": { + "PE": 2, + "SIMD": 32 + }, + "AddStreams_Batch_15": { + "PE": 2 + }, + "Thresholding_Batch_42": { + "PE": 2 + }, + "ConvolutionInputGenerator_18": { + "SIMD": 4 + }, + "Pool_Batch_1": { + "PE": 4 + }, + "StreamingFCLayer_Batch_53": { + "PE": 1, + "SIMD": 4, + "mem_mode": "external" + }, + "LabelSelect_Batch_0": { + "outputDataType": "UINT16", + "PE": 1 + }, + "ChannelwiseOp_Batch_0": { + "PE": 2 + }, + "ChannelwiseOp_Batch_1": { + "PE": 2 + }, + "ChannelwiseOp_Batch_2": { + "PE": 1 + } +} \ No newline at end of file diff --git a/build/resnet50/models/download_resnet50.sh b/build/resnet50/models/download_resnet50.sh index 9be13c8..0521649 100755 --- a/build/resnet50/models/download_resnet50.sh +++ b/build/resnet50/models/download_resnet50.sh @@ -1,4 +1,4 @@ #!/bin/sh -wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.1a/onnx-models-resnet50v1.5.zip -unzip onnx-models-resnet50v1.5.zip +wget https://github.com/Xilinx/finn-examples/releases/download/v0.0.1a/onnx-models-resnet50.zip +unzip onnx-models-resnet50.zip From e2f8a6040c2ab3581a1eef215ae0881af037ef67 Mon Sep 17 00:00:00 2001 From: Tobi-Alonso Date: Fri, 5 Mar 2021 15:02:46 +0000 Subject: [PATCH 03/11] Enable auto_set_fifos as JSON doesn't set bypass fifo sizes --- build/resnet50/build.py | 1 - 1 file changed, 1 deletion(-) diff --git a/build/resnet50/build.py b/build/resnet50/build.py index f64fd60..f420989 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -77,7 +77,6 @@ mvau_wwidth_max = 24, target_fps = target_fps, folding_config_file = folding_config_file, - auto_fifo_depths=False, # enable extra performance optimizations (physopt) vitis_opt_strategy=build_cfg.VitisOptStrategyCfg.PERFORMANCE_BEST, generate_outputs=[ From d30f16bbe7b7e58995210125f3ad208fecf13a8c Mon Sep 17 00:00:00 2001 From: tobi Date: Wed, 17 Mar 2021 10:33:56 +0100 Subject: [PATCH 04/11] Add Instructions to Readme --- build/resnet50/README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/build/resnet50/README.md b/build/resnet50/README.md index e69de29..afd98e3 100644 --- a/build/resnet50/README.md +++ b/build/resnet50/README.md @@ -0,0 +1,33 @@ +# Resnet 50 + +Implementation of a binary ResNet50 FINN-style dataflow accelerator targeting Alveo boards. + +## Build bitfiles for Resnet 50 + +We use a specialized build script that replaces a few of the standard steps +in FINN with custom ones. + +To add support for two MAC per DSP per cycle install [ +finn-experimental](https://github.com/Xilinx/finn-experimental). This allows 16x more FPS per MHz (Alveo U250 implementation). + +**Resnet 50 is currently only supported on Alveo U250.** + +0. Ensure you have performed the *Setup* steps in the top-level README for setting up the FINN requirements and environment variables. + +1. Download the pretrained Resnet 50 ONNX model from the releases page, and extract +the zipfile under `resnet50/models`. You should have e.g. `resnet50/models∕resnet50_w1a2_exported.onnx` as a result. +You can use the provided `resnet50/models/download_resnet50.sh` script for this. + +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 resnet50 folder +./run-docker.sh build_custom /path/to/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). + + From 546d92cf4cf625ded4afbd625d6dceae84630c8b Mon Sep 17 00:00:00 2001 From: Lucian Petrica Date: Wed, 9 Jun 2021 08:31:28 +0100 Subject: [PATCH 05/11] Functional rn50 floorplanning --- build/resnet50/build.py | 13 ++++++++----- build/resnet50/custom_steps.py | 23 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/build/resnet50/build.py b/build/resnet50/build.py index f420989..6649d95 100644 --- a/build/resnet50/build.py +++ b/build/resnet50/build.py @@ -28,18 +28,20 @@ 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 warnings import warn # custom steps for resnet50v1.5 from custom_steps import ( step_resnet50_tidy, step_resnet50_streamline, step_resnet50_convert_to_hls, - step_resnet50_set_fifo_depths + step_resnet50_set_fifo_depths, + step_resnet50_slr_floorplan ) model_name = "resnet50_w1a2" board = "U250" -vitis_platform = "xilinx_u250_xdma_201830_2" +vitis_platform = alveo_default_platform[board] synth_clk_period_ns = 4.0 target_fps = 300 @@ -50,9 +52,10 @@ "step_create_dataflow_partition", "step_apply_folding_config", "step_generate_estimate_reports", - # "step_hls_ipgen", - step_resnet50_set_fifo_depths, # "step_set_fifo_depths", - # "step_create_stitched_ip", + "step_hls_codegen", + "step_hls_ipgen", + step_resnet50_set_fifo_depths, + step_resnet50_slr_floorplan, "step_synthesize_bitfile", "step_make_pynq_driver", "step_deployment_package", diff --git a/build/resnet50/custom_steps.py b/build/resnet50/custom_steps.py index a6dee59..518554c 100644 --- a/build/resnet50/custom_steps.py +++ b/build/resnet50/custom_steps.py @@ -119,7 +119,10 @@ from finn.core.modelwrapper import ModelWrapper from finn.custom_op.registry import getCustomOp -from finn.builder.build_dataflow_config import DataflowBuildConfig +from finn.builder.build_dataflow_config import ( + DataflowBuildConfig, + ShellFlowType, +) from finn.transformation.fpgadataflow.prepare_ip import PrepareIP from finn.transformation.fpgadataflow.hlssynth_ip import HLSSynthIP @@ -305,3 +308,21 @@ def step_resnet50_set_fifo_depths(model: ModelWrapper, cfg: DataflowBuildConfig) ) return model + + +def step_resnet50_slr_floorplan(model: ModelWrapper, cfg: DataflowBuildConfig): + if cfg.shell_flow_type == ShellFlowType.VITIS_ALVEO: + try: + from finn.analysis.partitioning import partition + # apply partitioning of the model, restricting the first and last layers to SLR0 + default_slr = 0 + abs_anchors = [(0,[default_slr]),(-1,[default_slr])] + #increase resource limits to make partitioning feasible, except for SLR0 which also has DDR subsystem + limits = np.array([[0.75,.5,.7,.6,.6],[1,.7,.9,.8,.8],[1,.7,.9,.8,.8],[1,.7,.9,.8,.8]]) + floorplan = partition(model, cfg.synth_clk_period_ns, cfg.board, abs_anchors=abs_anchors, multivariant=False, linear_cuts=True, limits=limits)[0] + # apply floorplan to model + model = model.transform(ApplyConfig(floorplan)) + print("SLR floorplanning applied") + except: + print("No SLR floorplanning applied") + return model From 5c4fb71f170260ee7a1e83df75871a1b76f34a19 Mon Sep 17 00:00:00 2001 From: Lucian Petrica Date: Mon, 14 Jun 2021 17:06:49 +0100 Subject: [PATCH 06/11] Updated finn to commit with resource estimate fix --- 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 016a69c..b178262 100755 --- a/build/get-finn.sh +++ b/build/get-finn.sh @@ -30,7 +30,7 @@ # URL for git repo to be cloned REPO_URL=https://github.com/Xilinx/finn # commit hash for repo -REPO_COMMIT=e5da788bdc74fc9c234bb0176521ad51e830c22e +REPO_COMMIT=c8be5048a7f1647f7c72be7c7cd158e851d47a86 # directory (under the same folder as this script) to clone to REPO_DIR=finn From 7bd1de95cec535dc7c36721b399a98e83e365959 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Tue, 15 Jun 2021 09:14:18 +0100 Subject: [PATCH 07/11] [Driver] use empty path instead of None for non-existing rt weights --- finn_examples/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finn_examples/models.py b/finn_examples/models.py index 6e6e147..f8365b1 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -195,7 +195,7 @@ def mobilenetv1_w4a4_imagenet(target_platform=None): if target_platform in ["ZCU104"]: runtime_weight_dir = find_runtime_weights(model_name, target_platform) else: - runtime_weight_dir = None + runtime_weight_dir = "" # target 185 MHz for Zynq (this is ignored for Alveo) fclk_mhz = 185.0 return FINNExampleOverlay( From 1a7920647a9499fc405edbcae3947d5e0c996380 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Tue, 15 Jun 2021 09:48:45 +0100 Subject: [PATCH 08/11] [Driver] updates for ResNet-50 --- finn_examples/models.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/finn_examples/models.py b/finn_examples/models.py index f8365b1..9dd69aa 100644 --- a/finn_examples/models.py +++ b/finn_examples/models.py @@ -68,6 +68,22 @@ "oshape_packed": (1, 1, 1, 1, 10), } +# resnet50 uses a different io_shape_dict due to +# external weights for last layer +_imagenet_resnet50_top5inds_io_shape_dict = { + "idt" : DataType.UINT8, + "odt" : DataType.UINT16, + "ishape_normal" : (1, 224, 224, 3), + "oshape_normal" : (1, 5), + "ishape_folded" : (1, 224, 224, 3), + "oshape_folded" : (1, 5, 1), + "ishape_packed" : (1, 224, 224, 3), + "oshape_packed" : (1, 5, 2), + "input_dma_name" : 'idma1', + "number_of_external_weights": 1 +} + + # from https://github.com/Xilinx/PYNQ-HelloWorld/blob/master/setup.py # get current platform: either edge or pcie @@ -205,3 +221,17 @@ def mobilenetv1_w4a4_imagenet(target_platform=None): runtime_weight_dir=runtime_weight_dir, fclk_mhz=fclk_mhz, ) + +def resnet50_w1a2_imagenet(target_platform=None): + target_platform = resolve_target_platform(target_platform) + driver_mode = get_driver_mode() + model_name = "resnet50-w1a2" + filename = find_bitfile(model_name, target_platform) + runtime_weight_dir = find_runtime_weights(model_name, target_platform) + return FINNExampleOverlay( + filename, + driver_mode, + _imagenet_resnet50_top5inds_io_shape_dict, + runtime_weight_dir=runtime_weight_dir, + ) + From 04ca40dbe6d41ddafa5fd3f65ecd3f2151ad9846 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Tue, 15 Jun 2021 09:49:07 +0100 Subject: [PATCH 09/11] [Notebook] generalize ImageNet notebook to both MNv1 and RN50 --- ...et_v1.ipynb => 2_imagenet_with_cnns.ipynb} | 1048 +++++++++-------- 1 file changed, 526 insertions(+), 522 deletions(-) rename finn_examples/notebooks/{2_imagenet_with_mobilenet_v1.ipynb => 2_imagenet_with_cnns.ipynb} (87%) diff --git a/finn_examples/notebooks/2_imagenet_with_mobilenet_v1.ipynb b/finn_examples/notebooks/2_imagenet_with_cnns.ipynb similarity index 87% rename from finn_examples/notebooks/2_imagenet_with_mobilenet_v1.ipynb rename to finn_examples/notebooks/2_imagenet_with_cnns.ipynb index 4574435..164f1ef 100755 --- a/finn_examples/notebooks/2_imagenet_with_mobilenet_v1.ipynb +++ b/finn_examples/notebooks/2_imagenet_with_cnns.ipynb @@ -54,7 +54,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "['_imagenet_top5inds_io_shape_dict', 'mobilenetv1_w4a4_imagenet']\n" + "['_imagenet_resnet50_top5inds_io_shape_dict', '_imagenet_top5inds_io_shape_dict', 'mobilenetv1_w4a4_imagenet', 'resnet50_w1a2_imagenet']\n" ] } ], @@ -69,8 +69,11 @@ "metadata": {}, "outputs": [], "source": [ - "accel = models.mobilenetv1_w4a4_imagenet()\n", - "#some systems might require a manual platform setting:\n", + "#mobilenetv1_w4a4 is available on U250 and ZCU104\n", + "#accel = models.mobilenetv1_w4a4_imagenet()\n", + "#resnet50_w1a2 is available on U250 only\n", + "accel = models.resnet50_w1a2_imagenet()\n", + "#some systems with custom builds might require a manual platform setting:\n", "#accel = models.mobilenetv1_w4a4_imagenet(\"ZCU102\")" ] }, @@ -84,7 +87,7 @@ "output_type": "stream", "text": [ "Expected input shape and datatype: (1, 224, 224, 3) DataType.UINT8\n", - "Expected output shape and datatype: (1, 1, 1, 5) DataType.UINT16\n" + "Expected output shape and datatype: (1, 5) DataType.UINT16\n" ] } ], @@ -276,7 +279,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Top-5 classes predicted by the accelerator: [[[[391. 0. 395. 394. 48.]]]]\n" + "Top-5 classes predicted by the accelerator: [[ 0. 390. 391. 48. 394.]]\n" ] } ], @@ -293,7 +296,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2.18 ms ± 6.29 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n" + "2 ms ± 4.22 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n" ] } ], @@ -318,7 +321,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Accelerator buffer shapes are (100, 224, 224, 1, 3) for input, (100, 1, 1, 1, 10) for output\n" + "Accelerator buffer shapes are (100, 224, 224, 3) for input, (100, 5, 2) for output\n" ] } ], @@ -339,518 +342,518 @@ "name": "stdout", "output_type": "stream", "text": [ - "batch 1 : total OK 88 NOK 12\n", - "batch 2 : total OK 164 NOK 36\n", - "batch 3 : total OK 241 NOK 59\n", - "batch 4 : total OK 311 NOK 89\n", - "batch 5 : total OK 403 NOK 97\n", - "batch 6 : total OK 491 NOK 109\n", - "batch 7 : total OK 580 NOK 120\n", - "batch 8 : total OK 670 NOK 130\n", - "batch 9 : total OK 757 NOK 143\n", - "batch 10 : total OK 846 NOK 154\n", - "batch 11 : total OK 927 NOK 173\n", - "batch 12 : total OK 1018 NOK 182\n", - "batch 13 : total OK 1110 NOK 190\n", - "batch 14 : total OK 1180 NOK 220\n", - "batch 15 : total OK 1262 NOK 238\n", - "batch 16 : total OK 1337 NOK 263\n", - "batch 17 : total OK 1395 NOK 305\n", - "batch 18 : total OK 1454 NOK 346\n", - "batch 19 : total OK 1521 NOK 379\n", - "batch 20 : total OK 1590 NOK 410\n", - "batch 21 : total OK 1650 NOK 450\n", - "batch 22 : total OK 1728 NOK 472\n", - "batch 23 : total OK 1798 NOK 502\n", - "batch 24 : total OK 1861 NOK 539\n", - "batch 25 : total OK 1933 NOK 567\n", - "batch 26 : total OK 2019 NOK 581\n", - "batch 27 : total OK 2093 NOK 607\n", - "batch 28 : total OK 2145 NOK 655\n", - "batch 29 : total OK 2225 NOK 675\n", - "batch 30 : total OK 2294 NOK 706\n", - "batch 31 : total OK 2352 NOK 748\n", - "batch 32 : total OK 2412 NOK 788\n", - "batch 33 : total OK 2474 NOK 826\n", - "batch 34 : total OK 2529 NOK 871\n", - "batch 35 : total OK 2593 NOK 907\n", - "batch 36 : total OK 2677 NOK 923\n", - "batch 37 : total OK 2750 NOK 950\n", - "batch 38 : total OK 2817 NOK 983\n", - "batch 39 : total OK 2895 NOK 1005\n", - "batch 40 : total OK 2965 NOK 1035\n", - "batch 41 : total OK 3051 NOK 1049\n", - "batch 42 : total OK 3138 NOK 1062\n", - "batch 43 : total OK 3226 NOK 1074\n", - "batch 44 : total OK 3310 NOK 1090\n", - "batch 45 : total OK 3402 NOK 1098\n", - "batch 46 : total OK 3491 NOK 1109\n", - "batch 47 : total OK 3580 NOK 1120\n", - "batch 48 : total OK 3672 NOK 1128\n", - "batch 49 : total OK 3756 NOK 1144\n", - "batch 50 : total OK 3836 NOK 1164\n", - "batch 51 : total OK 3915 NOK 1185\n", - "batch 52 : total OK 3997 NOK 1203\n", - "batch 53 : total OK 4079 NOK 1221\n", - "batch 54 : total OK 4154 NOK 1246\n", - "batch 55 : total OK 4230 NOK 1270\n", - "batch 56 : total OK 4309 NOK 1291\n", - "batch 57 : total OK 4383 NOK 1317\n", - "batch 58 : total OK 4458 NOK 1342\n", - "batch 59 : total OK 4538 NOK 1362\n", - "batch 60 : total OK 4606 NOK 1394\n", - "batch 61 : total OK 4677 NOK 1423\n", - "batch 62 : total OK 4756 NOK 1444\n", - "batch 63 : total OK 4817 NOK 1483\n", - "batch 64 : total OK 4891 NOK 1509\n", - "batch 65 : total OK 4978 NOK 1522\n", - "batch 66 : total OK 5067 NOK 1533\n", - "batch 67 : total OK 5152 NOK 1548\n", - "batch 68 : total OK 5235 NOK 1565\n", - "batch 69 : total OK 5326 NOK 1574\n", - "batch 70 : total OK 5418 NOK 1582\n", - "batch 71 : total OK 5503 NOK 1597\n", - "batch 72 : total OK 5589 NOK 1611\n", - "batch 73 : total OK 5678 NOK 1622\n", - "batch 74 : total OK 5763 NOK 1637\n", - "batch 75 : total OK 5853 NOK 1647\n", - "batch 76 : total OK 5923 NOK 1677\n", - "batch 77 : total OK 6000 NOK 1700\n", - "batch 78 : total OK 6081 NOK 1719\n", - "batch 79 : total OK 6172 NOK 1728\n", - "batch 80 : total OK 6231 NOK 1769\n", - "batch 81 : total OK 6314 NOK 1786\n", - "batch 82 : total OK 6374 NOK 1826\n", - "batch 83 : total OK 6441 NOK 1859\n", - "batch 84 : total OK 6490 NOK 1910\n", - "batch 85 : total OK 6570 NOK 1930\n", - "batch 86 : total OK 6638 NOK 1962\n", - "batch 87 : total OK 6709 NOK 1991\n", - "batch 88 : total OK 6779 NOK 2021\n", - "batch 89 : total OK 6858 NOK 2042\n", - "batch 90 : total OK 6934 NOK 2066\n", - "batch 91 : total OK 7007 NOK 2093\n", - "batch 92 : total OK 7086 NOK 2114\n", - "batch 93 : total OK 7158 NOK 2142\n", - "batch 94 : total OK 7224 NOK 2176\n", - "batch 95 : total OK 7290 NOK 2210\n", - "batch 96 : total OK 7368 NOK 2232\n", - "batch 97 : total OK 7426 NOK 2274\n", - "batch 98 : total OK 7510 NOK 2290\n", - "batch 99 : total OK 7581 NOK 2319\n", - "batch 100 : total OK 7661 NOK 2339\n", - "batch 101 : total OK 7720 NOK 2380\n", - "batch 102 : total OK 7805 NOK 2395\n", - "batch 103 : total OK 7874 NOK 2426\n", - "batch 104 : total OK 7957 NOK 2443\n", - "batch 105 : total OK 8038 NOK 2462\n", - "batch 106 : total OK 8111 NOK 2489\n", - "batch 107 : total OK 8185 NOK 2515\n", - "batch 108 : total OK 8269 NOK 2531\n", - "batch 109 : total OK 8358 NOK 2542\n", - "batch 110 : total OK 8439 NOK 2561\n", - "batch 111 : total OK 8514 NOK 2586\n", - "batch 112 : total OK 8585 NOK 2615\n", - "batch 113 : total OK 8666 NOK 2634\n", - "batch 114 : total OK 8722 NOK 2678\n", - "batch 115 : total OK 8808 NOK 2692\n", - "batch 116 : total OK 8868 NOK 2732\n", - "batch 117 : total OK 8939 NOK 2761\n", - "batch 118 : total OK 9022 NOK 2778\n", - "batch 119 : total OK 9094 NOK 2806\n", - "batch 120 : total OK 9165 NOK 2835\n", - "batch 121 : total OK 9213 NOK 2887\n", - "batch 122 : total OK 9287 NOK 2913\n", - "batch 123 : total OK 9376 NOK 2924\n", - "batch 124 : total OK 9446 NOK 2954\n", - "batch 125 : total OK 9510 NOK 2990\n", - "batch 126 : total OK 9579 NOK 3021\n", - "batch 127 : total OK 9659 NOK 3041\n", - "batch 128 : total OK 9757 NOK 3043\n", - "batch 129 : total OK 9832 NOK 3068\n", - "batch 130 : total OK 9926 NOK 3074\n", - "batch 131 : total OK 10010 NOK 3090\n", - "batch 132 : total OK 10097 NOK 3103\n", - "batch 133 : total OK 10153 NOK 3147\n", - "batch 134 : total OK 10212 NOK 3188\n", - "batch 135 : total OK 10292 NOK 3208\n", - "batch 136 : total OK 10353 NOK 3247\n", - "batch 137 : total OK 10423 NOK 3277\n", - "batch 138 : total OK 10516 NOK 3284\n", - "batch 139 : total OK 10588 NOK 3312\n", - "batch 140 : total OK 10666 NOK 3334\n", - "batch 141 : total OK 10731 NOK 3369\n", - "batch 142 : total OK 10790 NOK 3410\n", - "batch 143 : total OK 10860 NOK 3440\n", - "batch 144 : total OK 10938 NOK 3462\n", - "batch 145 : total OK 11025 NOK 3475\n", - "batch 146 : total OK 11106 NOK 3494\n", - "batch 147 : total OK 11197 NOK 3503\n", - "batch 148 : total OK 11283 NOK 3517\n", - "batch 149 : total OK 11363 NOK 3537\n", - "batch 150 : total OK 11439 NOK 3561\n", - "batch 151 : total OK 11522 NOK 3578\n", - "batch 152 : total OK 11585 NOK 3615\n", - "batch 153 : total OK 11658 NOK 3642\n", - "batch 154 : total OK 11745 NOK 3655\n", - "batch 155 : total OK 11824 NOK 3676\n", - "batch 156 : total OK 11889 NOK 3711\n", - "batch 157 : total OK 11950 NOK 3750\n", - "batch 158 : total OK 12010 NOK 3790\n", - "batch 159 : total OK 12098 NOK 3802\n", - "batch 160 : total OK 12177 NOK 3823\n", - "batch 161 : total OK 12270 NOK 3830\n", - "batch 162 : total OK 12359 NOK 3841\n", - "batch 163 : total OK 12450 NOK 3850\n", - "batch 164 : total OK 12540 NOK 3860\n", - "batch 165 : total OK 12613 NOK 3887\n", - "batch 166 : total OK 12695 NOK 3905\n", - "batch 167 : total OK 12789 NOK 3911\n", - "batch 168 : total OK 12871 NOK 3929\n", - "batch 169 : total OK 12955 NOK 3945\n", - "batch 170 : total OK 13047 NOK 3953\n", - "batch 171 : total OK 13119 NOK 3981\n", - "batch 172 : total OK 13202 NOK 3998\n", - "batch 173 : total OK 13276 NOK 4024\n", - "batch 174 : total OK 13363 NOK 4037\n", - "batch 175 : total OK 13422 NOK 4078\n", - "batch 176 : total OK 13514 NOK 4086\n", - "batch 177 : total OK 13579 NOK 4121\n", - "batch 178 : total OK 13668 NOK 4132\n", - "batch 179 : total OK 13728 NOK 4172\n", - "batch 180 : total OK 13785 NOK 4215\n", - "batch 181 : total OK 13866 NOK 4234\n", - "batch 182 : total OK 13947 NOK 4253\n", - "batch 183 : total OK 14037 NOK 4263\n", - "batch 184 : total OK 14115 NOK 4285\n", - "batch 185 : total OK 14188 NOK 4312\n", - "batch 186 : total OK 14261 NOK 4339\n", - "batch 187 : total OK 14335 NOK 4365\n", - "batch 188 : total OK 14401 NOK 4399\n", - "batch 189 : total OK 14489 NOK 4411\n", - "batch 190 : total OK 14564 NOK 4436\n", - "batch 191 : total OK 14610 NOK 4490\n", - "batch 192 : total OK 14680 NOK 4520\n", - "batch 193 : total OK 14747 NOK 4553\n", - "batch 194 : total OK 14828 NOK 4572\n", - "batch 195 : total OK 14914 NOK 4586\n", - "batch 196 : total OK 14979 NOK 4621\n", - "batch 197 : total OK 15067 NOK 4633\n", - "batch 198 : total OK 15134 NOK 4666\n", - "batch 199 : total OK 15225 NOK 4675\n", - "batch 200 : total OK 15306 NOK 4694\n", - "batch 201 : total OK 15371 NOK 4729\n", - "batch 202 : total OK 15434 NOK 4766\n", - "batch 203 : total OK 15516 NOK 4784\n", - "batch 204 : total OK 15595 NOK 4805\n", - "batch 205 : total OK 15664 NOK 4836\n", - "batch 206 : total OK 15742 NOK 4858\n", - "batch 207 : total OK 15797 NOK 4903\n", - "batch 208 : total OK 15834 NOK 4966\n", - "batch 209 : total OK 15920 NOK 4980\n", - "batch 210 : total OK 15973 NOK 5027\n", - "batch 211 : total OK 16048 NOK 5052\n", - "batch 212 : total OK 16108 NOK 5092\n", - "batch 213 : total OK 16183 NOK 5117\n", - "batch 214 : total OK 16258 NOK 5142\n", - "batch 215 : total OK 16328 NOK 5172\n", - "batch 216 : total OK 16410 NOK 5190\n", - "batch 217 : total OK 16476 NOK 5224\n", - "batch 218 : total OK 16520 NOK 5280\n", - "batch 219 : total OK 16587 NOK 5313\n", - "batch 220 : total OK 16649 NOK 5351\n", - "batch 221 : total OK 16719 NOK 5381\n", - "batch 222 : total OK 16768 NOK 5432\n", - "batch 223 : total OK 16839 NOK 5461\n", - "batch 224 : total OK 16893 NOK 5507\n", - "batch 225 : total OK 16971 NOK 5529\n", - "batch 226 : total OK 17056 NOK 5544\n", - "batch 227 : total OK 17121 NOK 5579\n", - "batch 228 : total OK 17175 NOK 5625\n", - "batch 229 : total OK 17241 NOK 5659\n", - "batch 230 : total OK 17313 NOK 5687\n", - "batch 231 : total OK 17368 NOK 5732\n", - "batch 232 : total OK 17422 NOK 5778\n", - "batch 233 : total OK 17462 NOK 5838\n", - "batch 234 : total OK 17545 NOK 5855\n", - "batch 235 : total OK 17596 NOK 5904\n", - "batch 236 : total OK 17663 NOK 5937\n" + "batch 1 : total OK 90 NOK 10\n", + "batch 2 : total OK 163 NOK 37\n", + "batch 3 : total OK 239 NOK 61\n", + "batch 4 : total OK 304 NOK 96\n", + "batch 5 : total OK 393 NOK 107\n", + "batch 6 : total OK 484 NOK 116\n", + "batch 7 : total OK 575 NOK 125\n", + "batch 8 : total OK 663 NOK 137\n", + "batch 9 : total OK 749 NOK 151\n", + "batch 10 : total OK 838 NOK 162\n", + "batch 11 : total OK 917 NOK 183\n", + "batch 12 : total OK 1006 NOK 194\n", + "batch 13 : total OK 1099 NOK 201\n", + "batch 14 : total OK 1168 NOK 232\n", + "batch 15 : total OK 1253 NOK 247\n", + "batch 16 : total OK 1333 NOK 267\n", + "batch 17 : total OK 1385 NOK 315\n", + "batch 18 : total OK 1437 NOK 363\n", + "batch 19 : total OK 1507 NOK 393\n", + "batch 20 : total OK 1581 NOK 419\n", + "batch 21 : total OK 1637 NOK 463\n", + "batch 22 : total OK 1716 NOK 484\n", + "batch 23 : total OK 1782 NOK 518\n", + "batch 24 : total OK 1841 NOK 559\n", + "batch 25 : total OK 1917 NOK 583\n", + "batch 26 : total OK 1999 NOK 601\n", + "batch 27 : total OK 2075 NOK 625\n", + "batch 28 : total OK 2126 NOK 674\n", + "batch 29 : total OK 2211 NOK 689\n", + "batch 30 : total OK 2273 NOK 727\n", + "batch 31 : total OK 2325 NOK 775\n", + "batch 32 : total OK 2378 NOK 822\n", + "batch 33 : total OK 2440 NOK 860\n", + "batch 34 : total OK 2496 NOK 904\n", + "batch 35 : total OK 2554 NOK 946\n", + "batch 36 : total OK 2633 NOK 967\n", + "batch 37 : total OK 2702 NOK 998\n", + "batch 38 : total OK 2768 NOK 1032\n", + "batch 39 : total OK 2854 NOK 1046\n", + "batch 40 : total OK 2922 NOK 1078\n", + "batch 41 : total OK 3003 NOK 1097\n", + "batch 42 : total OK 3092 NOK 1108\n", + "batch 43 : total OK 3177 NOK 1123\n", + "batch 44 : total OK 3257 NOK 1143\n", + "batch 45 : total OK 3347 NOK 1153\n", + "batch 46 : total OK 3435 NOK 1165\n", + "batch 47 : total OK 3523 NOK 1177\n", + "batch 48 : total OK 3611 NOK 1189\n", + "batch 49 : total OK 3698 NOK 1202\n", + "batch 50 : total OK 3775 NOK 1225\n", + "batch 51 : total OK 3853 NOK 1247\n", + "batch 52 : total OK 3935 NOK 1265\n", + "batch 53 : total OK 4020 NOK 1280\n", + "batch 54 : total OK 4091 NOK 1309\n", + "batch 55 : total OK 4168 NOK 1332\n", + "batch 56 : total OK 4250 NOK 1350\n", + "batch 57 : total OK 4325 NOK 1375\n", + "batch 58 : total OK 4405 NOK 1395\n", + "batch 59 : total OK 4480 NOK 1420\n", + "batch 60 : total OK 4549 NOK 1451\n", + "batch 61 : total OK 4612 NOK 1488\n", + "batch 62 : total OK 4681 NOK 1519\n", + "batch 63 : total OK 4738 NOK 1562\n", + "batch 64 : total OK 4811 NOK 1589\n", + "batch 65 : total OK 4893 NOK 1607\n", + "batch 66 : total OK 4983 NOK 1617\n", + "batch 67 : total OK 5069 NOK 1631\n", + "batch 68 : total OK 5150 NOK 1650\n", + "batch 69 : total OK 5238 NOK 1662\n", + "batch 70 : total OK 5333 NOK 1667\n", + "batch 71 : total OK 5416 NOK 1684\n", + "batch 72 : total OK 5497 NOK 1703\n", + "batch 73 : total OK 5586 NOK 1714\n", + "batch 74 : total OK 5668 NOK 1732\n", + "batch 75 : total OK 5757 NOK 1743\n", + "batch 76 : total OK 5826 NOK 1774\n", + "batch 77 : total OK 5900 NOK 1800\n", + "batch 78 : total OK 5975 NOK 1825\n", + "batch 79 : total OK 6065 NOK 1835\n", + "batch 80 : total OK 6126 NOK 1874\n", + "batch 81 : total OK 6205 NOK 1895\n", + "batch 82 : total OK 6264 NOK 1936\n", + "batch 83 : total OK 6319 NOK 1981\n", + "batch 84 : total OK 6357 NOK 2043\n", + "batch 85 : total OK 6426 NOK 2074\n", + "batch 86 : total OK 6488 NOK 2112\n", + "batch 87 : total OK 6552 NOK 2148\n", + "batch 88 : total OK 6622 NOK 2178\n", + "batch 89 : total OK 6696 NOK 2204\n", + "batch 90 : total OK 6774 NOK 2226\n", + "batch 91 : total OK 6839 NOK 2261\n", + "batch 92 : total OK 6912 NOK 2288\n", + "batch 93 : total OK 6974 NOK 2326\n", + "batch 94 : total OK 7037 NOK 2363\n", + "batch 95 : total OK 7102 NOK 2398\n", + "batch 96 : total OK 7176 NOK 2424\n", + "batch 97 : total OK 7232 NOK 2468\n", + "batch 98 : total OK 7317 NOK 2483\n", + "batch 99 : total OK 7384 NOK 2516\n", + "batch 100 : total OK 7456 NOK 2544\n", + "batch 101 : total OK 7520 NOK 2580\n", + "batch 102 : total OK 7603 NOK 2597\n", + "batch 103 : total OK 7664 NOK 2636\n", + "batch 104 : total OK 7744 NOK 2656\n", + "batch 105 : total OK 7821 NOK 2679\n", + "batch 106 : total OK 7883 NOK 2717\n", + "batch 107 : total OK 7953 NOK 2747\n", + "batch 108 : total OK 8031 NOK 2769\n", + "batch 109 : total OK 8114 NOK 2786\n", + "batch 110 : total OK 8191 NOK 2809\n", + "batch 111 : total OK 8262 NOK 2838\n", + "batch 112 : total OK 8335 NOK 2865\n", + "batch 113 : total OK 8416 NOK 2884\n", + "batch 114 : total OK 8466 NOK 2934\n", + "batch 115 : total OK 8555 NOK 2945\n", + "batch 116 : total OK 8619 NOK 2981\n", + "batch 117 : total OK 8690 NOK 3010\n", + "batch 118 : total OK 8767 NOK 3033\n", + "batch 119 : total OK 8835 NOK 3065\n", + "batch 120 : total OK 8909 NOK 3091\n", + "batch 121 : total OK 8955 NOK 3145\n", + "batch 122 : total OK 9027 NOK 3173\n", + "batch 123 : total OK 9112 NOK 3188\n", + "batch 124 : total OK 9193 NOK 3207\n", + "batch 125 : total OK 9250 NOK 3250\n", + "batch 126 : total OK 9318 NOK 3282\n", + "batch 127 : total OK 9399 NOK 3301\n", + "batch 128 : total OK 9498 NOK 3302\n", + "batch 129 : total OK 9570 NOK 3330\n", + "batch 130 : total OK 9664 NOK 3336\n", + "batch 131 : total OK 9750 NOK 3350\n", + "batch 132 : total OK 9832 NOK 3368\n", + "batch 133 : total OK 9883 NOK 3417\n", + "batch 134 : total OK 9938 NOK 3462\n", + "batch 135 : total OK 10013 NOK 3487\n", + "batch 136 : total OK 10076 NOK 3524\n", + "batch 137 : total OK 10139 NOK 3561\n", + "batch 138 : total OK 10230 NOK 3570\n", + "batch 139 : total OK 10301 NOK 3599\n", + "batch 140 : total OK 10382 NOK 3618\n", + "batch 141 : total OK 10446 NOK 3654\n", + "batch 142 : total OK 10503 NOK 3697\n", + "batch 143 : total OK 10570 NOK 3730\n", + "batch 144 : total OK 10651 NOK 3749\n", + "batch 145 : total OK 10738 NOK 3762\n", + "batch 146 : total OK 10823 NOK 3777\n", + "batch 147 : total OK 10919 NOK 3781\n", + "batch 148 : total OK 11004 NOK 3796\n", + "batch 149 : total OK 11083 NOK 3817\n", + "batch 150 : total OK 11155 NOK 3845\n", + "batch 151 : total OK 11238 NOK 3862\n", + "batch 152 : total OK 11303 NOK 3897\n", + "batch 153 : total OK 11372 NOK 3928\n", + "batch 154 : total OK 11453 NOK 3947\n", + "batch 155 : total OK 11526 NOK 3974\n", + "batch 156 : total OK 11585 NOK 4015\n", + "batch 157 : total OK 11636 NOK 4064\n", + "batch 158 : total OK 11697 NOK 4103\n", + "batch 159 : total OK 11783 NOK 4117\n", + "batch 160 : total OK 11853 NOK 4147\n", + "batch 161 : total OK 11943 NOK 4157\n", + "batch 162 : total OK 12034 NOK 4166\n", + "batch 163 : total OK 12122 NOK 4178\n", + "batch 164 : total OK 12208 NOK 4192\n", + "batch 165 : total OK 12277 NOK 4223\n", + "batch 166 : total OK 12357 NOK 4243\n", + "batch 167 : total OK 12451 NOK 4249\n", + "batch 168 : total OK 12528 NOK 4272\n", + "batch 169 : total OK 12605 NOK 4295\n", + "batch 170 : total OK 12688 NOK 4312\n", + "batch 171 : total OK 12757 NOK 4343\n", + "batch 172 : total OK 12841 NOK 4359\n", + "batch 173 : total OK 12905 NOK 4395\n", + "batch 174 : total OK 12984 NOK 4416\n", + "batch 175 : total OK 13039 NOK 4461\n", + "batch 176 : total OK 13128 NOK 4472\n", + "batch 177 : total OK 13197 NOK 4503\n", + "batch 178 : total OK 13279 NOK 4521\n", + "batch 179 : total OK 13334 NOK 4566\n", + "batch 180 : total OK 13388 NOK 4612\n", + "batch 181 : total OK 13469 NOK 4631\n", + "batch 182 : total OK 13554 NOK 4646\n", + "batch 183 : total OK 13642 NOK 4658\n", + "batch 184 : total OK 13714 NOK 4686\n", + "batch 185 : total OK 13786 NOK 4714\n", + "batch 186 : total OK 13859 NOK 4741\n", + "batch 187 : total OK 13938 NOK 4762\n", + "batch 188 : total OK 14000 NOK 4800\n", + "batch 189 : total OK 14086 NOK 4814\n", + "batch 190 : total OK 14153 NOK 4847\n", + "batch 191 : total OK 14200 NOK 4900\n", + "batch 192 : total OK 14276 NOK 4924\n", + "batch 193 : total OK 14347 NOK 4953\n", + "batch 194 : total OK 14424 NOK 4976\n", + "batch 195 : total OK 14506 NOK 4994\n", + "batch 196 : total OK 14572 NOK 5028\n", + "batch 197 : total OK 14657 NOK 5043\n", + "batch 198 : total OK 14721 NOK 5079\n", + "batch 199 : total OK 14809 NOK 5091\n", + "batch 200 : total OK 14884 NOK 5116\n", + "batch 201 : total OK 14940 NOK 5160\n", + "batch 202 : total OK 15004 NOK 5196\n", + "batch 203 : total OK 15084 NOK 5216\n", + "batch 204 : total OK 15158 NOK 5242\n", + "batch 205 : total OK 15214 NOK 5286\n", + "batch 206 : total OK 15284 NOK 5316\n", + "batch 207 : total OK 15322 NOK 5378\n", + "batch 208 : total OK 15354 NOK 5446\n", + "batch 209 : total OK 15432 NOK 5468\n", + "batch 210 : total OK 15478 NOK 5522\n", + "batch 211 : total OK 15556 NOK 5544\n", + "batch 212 : total OK 15622 NOK 5578\n", + "batch 213 : total OK 15695 NOK 5605\n", + "batch 214 : total OK 15762 NOK 5638\n", + "batch 215 : total OK 15825 NOK 5675\n", + "batch 216 : total OK 15900 NOK 5700\n", + "batch 217 : total OK 15962 NOK 5738\n", + "batch 218 : total OK 16000 NOK 5800\n", + "batch 219 : total OK 16060 NOK 5840\n", + "batch 220 : total OK 16116 NOK 5884\n", + "batch 221 : total OK 16183 NOK 5917\n", + "batch 222 : total OK 16240 NOK 5960\n", + "batch 223 : total OK 16311 NOK 5989\n", + "batch 224 : total OK 16361 NOK 6039\n", + "batch 225 : total OK 16441 NOK 6059\n", + "batch 226 : total OK 16518 NOK 6082\n", + "batch 227 : total OK 16583 NOK 6117\n", + "batch 228 : total OK 16633 NOK 6167\n", + "batch 229 : total OK 16688 NOK 6212\n", + "batch 230 : total OK 16756 NOK 6244\n", + "batch 231 : total OK 16798 NOK 6302\n", + "batch 232 : total OK 16849 NOK 6351\n", + "batch 233 : total OK 16893 NOK 6407\n", + "batch 234 : total OK 16974 NOK 6426\n", + "batch 235 : total OK 17021 NOK 6479\n", + "batch 236 : total OK 17090 NOK 6510\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "batch 237 : total OK 17729 NOK 5971\n", - "batch 238 : total OK 17807 NOK 5993\n", - "batch 239 : total OK 17882 NOK 6018\n", - "batch 240 : total OK 17926 NOK 6074\n", - "batch 241 : total OK 17989 NOK 6111\n", - "batch 242 : total OK 18044 NOK 6156\n", - "batch 243 : total OK 18096 NOK 6204\n", - "batch 244 : total OK 18172 NOK 6228\n", - "batch 245 : total OK 18220 NOK 6280\n", - "batch 246 : total OK 18297 NOK 6303\n", - "batch 247 : total OK 18342 NOK 6358\n", - "batch 248 : total OK 18412 NOK 6388\n", - "batch 249 : total OK 18491 NOK 6409\n", - "batch 250 : total OK 18536 NOK 6464\n", - "batch 251 : total OK 18592 NOK 6508\n", - "batch 252 : total OK 18644 NOK 6556\n", - "batch 253 : total OK 18693 NOK 6607\n", - "batch 254 : total OK 18760 NOK 6640\n", - "batch 255 : total OK 18824 NOK 6676\n", - "batch 256 : total OK 18902 NOK 6698\n", - "batch 257 : total OK 18960 NOK 6740\n", - "batch 258 : total OK 19022 NOK 6778\n", - "batch 259 : total OK 19081 NOK 6819\n", - "batch 260 : total OK 19153 NOK 6847\n", - "batch 261 : total OK 19230 NOK 6870\n", - "batch 262 : total OK 19290 NOK 6910\n", - "batch 263 : total OK 19351 NOK 6949\n", - "batch 264 : total OK 19407 NOK 6993\n", - "batch 265 : total OK 19483 NOK 7017\n", - "batch 266 : total OK 19540 NOK 7060\n", - "batch 267 : total OK 19619 NOK 7081\n", - "batch 268 : total OK 19693 NOK 7107\n", - "batch 269 : total OK 19766 NOK 7134\n", - "batch 270 : total OK 19831 NOK 7169\n", - "batch 271 : total OK 19897 NOK 7203\n", - "batch 272 : total OK 19943 NOK 7257\n", - "batch 273 : total OK 20018 NOK 7282\n", - "batch 274 : total OK 20100 NOK 7300\n", - "batch 275 : total OK 20167 NOK 7333\n", - "batch 276 : total OK 20241 NOK 7359\n", - "batch 277 : total OK 20320 NOK 7380\n", - "batch 278 : total OK 20406 NOK 7394\n", - "batch 279 : total OK 20463 NOK 7437\n", - "batch 280 : total OK 20511 NOK 7489\n", - "batch 281 : total OK 20595 NOK 7505\n", - "batch 282 : total OK 20665 NOK 7535\n", - "batch 283 : total OK 20750 NOK 7550\n", - "batch 284 : total OK 20805 NOK 7595\n", - "batch 285 : total OK 20885 NOK 7615\n", - "batch 286 : total OK 20962 NOK 7638\n", - "batch 287 : total OK 21041 NOK 7659\n", - "batch 288 : total OK 21124 NOK 7676\n", - "batch 289 : total OK 21208 NOK 7692\n", - "batch 290 : total OK 21273 NOK 7727\n", - "batch 291 : total OK 21352 NOK 7748\n", - "batch 292 : total OK 21424 NOK 7776\n", - "batch 293 : total OK 21461 NOK 7839\n", - "batch 294 : total OK 21523 NOK 7877\n", - "batch 295 : total OK 21577 NOK 7923\n", - "batch 296 : total OK 21635 NOK 7965\n", - "batch 297 : total OK 21707 NOK 7993\n", - "batch 298 : total OK 21788 NOK 8012\n", - "batch 299 : total OK 21841 NOK 8059\n", - "batch 300 : total OK 21905 NOK 8095\n", - "batch 301 : total OK 21944 NOK 8156\n", - "batch 302 : total OK 22022 NOK 8178\n", - "batch 303 : total OK 22104 NOK 8196\n", - "batch 304 : total OK 22188 NOK 8212\n", - "batch 305 : total OK 22259 NOK 8241\n", - "batch 306 : total OK 22339 NOK 8261\n", - "batch 307 : total OK 22420 NOK 8280\n", - "batch 308 : total OK 22494 NOK 8306\n", - "batch 309 : total OK 22575 NOK 8325\n", - "batch 310 : total OK 22610 NOK 8390\n", - "batch 311 : total OK 22658 NOK 8442\n", - "batch 312 : total OK 22694 NOK 8506\n", - "batch 313 : total OK 22768 NOK 8532\n", - "batch 314 : total OK 22829 NOK 8571\n", - "batch 315 : total OK 22907 NOK 8593\n", - "batch 316 : total OK 22976 NOK 8624\n", - "batch 317 : total OK 23012 NOK 8688\n", - "batch 318 : total OK 23069 NOK 8731\n", - "batch 319 : total OK 23138 NOK 8762\n", - "batch 320 : total OK 23166 NOK 8834\n", - "batch 321 : total OK 23243 NOK 8857\n", - "batch 322 : total OK 23312 NOK 8888\n", - "batch 323 : total OK 23395 NOK 8905\n", - "batch 324 : total OK 23467 NOK 8933\n", - "batch 325 : total OK 23534 NOK 8966\n", - "batch 326 : total OK 23583 NOK 9017\n", - "batch 327 : total OK 23643 NOK 9057\n", - "batch 328 : total OK 23704 NOK 9096\n", - "batch 329 : total OK 23741 NOK 9159\n", - "batch 330 : total OK 23813 NOK 9187\n", - "batch 331 : total OK 23885 NOK 9215\n", - "batch 332 : total OK 23935 NOK 9265\n", - "batch 333 : total OK 23976 NOK 9324\n", - "batch 334 : total OK 24035 NOK 9365\n", - "batch 335 : total OK 24124 NOK 9376\n", - "batch 336 : total OK 24201 NOK 9399\n", - "batch 337 : total OK 24266 NOK 9434\n", - "batch 338 : total OK 24327 NOK 9473\n", - "batch 339 : total OK 24383 NOK 9517\n", - "batch 340 : total OK 24458 NOK 9542\n", - "batch 341 : total OK 24507 NOK 9593\n", - "batch 342 : total OK 24579 NOK 9621\n", - "batch 343 : total OK 24664 NOK 9636\n", - "batch 344 : total OK 24731 NOK 9669\n", - "batch 345 : total OK 24792 NOK 9708\n", - "batch 346 : total OK 24852 NOK 9748\n", - "batch 347 : total OK 24907 NOK 9793\n", - "batch 348 : total OK 24978 NOK 9822\n", - "batch 349 : total OK 25041 NOK 9859\n", - "batch 350 : total OK 25113 NOK 9887\n", - "batch 351 : total OK 25184 NOK 9916\n", - "batch 352 : total OK 25247 NOK 9953\n", - "batch 353 : total OK 25315 NOK 9985\n", - "batch 354 : total OK 25385 NOK 10015\n", - "batch 355 : total OK 25454 NOK 10046\n", - "batch 356 : total OK 25505 NOK 10095\n", - "batch 357 : total OK 25580 NOK 10120\n", - "batch 358 : total OK 25655 NOK 10145\n", - "batch 359 : total OK 25727 NOK 10173\n", - "batch 360 : total OK 25794 NOK 10206\n", - "batch 361 : total OK 25863 NOK 10237\n", - "batch 362 : total OK 25946 NOK 10254\n", - "batch 363 : total OK 26008 NOK 10292\n", - "batch 364 : total OK 26088 NOK 10312\n", - "batch 365 : total OK 26129 NOK 10371\n", - "batch 366 : total OK 26183 NOK 10417\n", - "batch 367 : total OK 26240 NOK 10460\n", - "batch 368 : total OK 26308 NOK 10492\n", - "batch 369 : total OK 26383 NOK 10517\n", - "batch 370 : total OK 26468 NOK 10532\n", - "batch 371 : total OK 26518 NOK 10582\n", - "batch 372 : total OK 26578 NOK 10622\n", - "batch 373 : total OK 26630 NOK 10670\n", - "batch 374 : total OK 26701 NOK 10699\n", - "batch 375 : total OK 26753 NOK 10747\n", - "batch 376 : total OK 26820 NOK 10780\n", - "batch 377 : total OK 26891 NOK 10809\n", - "batch 378 : total OK 26961 NOK 10839\n", - "batch 379 : total OK 27037 NOK 10863\n", - "batch 380 : total OK 27103 NOK 10897\n", - "batch 381 : total OK 27175 NOK 10925\n", - "batch 382 : total OK 27242 NOK 10958\n", - "batch 383 : total OK 27297 NOK 11003\n", - "batch 384 : total OK 27366 NOK 11034\n", - "batch 385 : total OK 27442 NOK 11058\n", - "batch 386 : total OK 27524 NOK 11076\n", - "batch 387 : total OK 27575 NOK 11125\n", - "batch 388 : total OK 27634 NOK 11166\n", - "batch 389 : total OK 27703 NOK 11197\n", - "batch 390 : total OK 27776 NOK 11224\n", - "batch 391 : total OK 27860 NOK 11240\n", - "batch 392 : total OK 27916 NOK 11284\n", - "batch 393 : total OK 27970 NOK 11330\n", - "batch 394 : total OK 28032 NOK 11368\n", - "batch 395 : total OK 28106 NOK 11394\n", - "batch 396 : total OK 28171 NOK 11429\n", - "batch 397 : total OK 28233 NOK 11467\n", - "batch 398 : total OK 28302 NOK 11498\n", - "batch 399 : total OK 28368 NOK 11532\n", - "batch 400 : total OK 28427 NOK 11573\n", - "batch 401 : total OK 28518 NOK 11582\n", - "batch 402 : total OK 28605 NOK 11595\n", - "batch 403 : total OK 28677 NOK 11623\n", - "batch 404 : total OK 28741 NOK 11659\n", - "batch 405 : total OK 28797 NOK 11703\n", - "batch 406 : total OK 28842 NOK 11758\n", - "batch 407 : total OK 28897 NOK 11803\n", - "batch 408 : total OK 28975 NOK 11825\n", - "batch 409 : total OK 29047 NOK 11853\n", - "batch 410 : total OK 29101 NOK 11899\n", - "batch 411 : total OK 29193 NOK 11907\n", - "batch 412 : total OK 29264 NOK 11936\n", - "batch 413 : total OK 29319 NOK 11981\n", - "batch 414 : total OK 29367 NOK 12033\n", - "batch 415 : total OK 29439 NOK 12061\n", - "batch 416 : total OK 29507 NOK 12093\n", - "batch 417 : total OK 29584 NOK 12116\n", - "batch 418 : total OK 29639 NOK 12161\n", - "batch 419 : total OK 29663 NOK 12237\n", - "batch 420 : total OK 29707 NOK 12293\n", - "batch 421 : total OK 29759 NOK 12341\n", - "batch 422 : total OK 29828 NOK 12372\n", - "batch 423 : total OK 29885 NOK 12415\n", - "batch 424 : total OK 29953 NOK 12447\n", - "batch 425 : total OK 30012 NOK 12488\n", - "batch 426 : total OK 30079 NOK 12521\n", - "batch 427 : total OK 30161 NOK 12539\n", - "batch 428 : total OK 30231 NOK 12569\n", - "batch 429 : total OK 30294 NOK 12606\n", - "batch 430 : total OK 30356 NOK 12644\n", - "batch 431 : total OK 30407 NOK 12693\n", - "batch 432 : total OK 30480 NOK 12720\n", - "batch 433 : total OK 30545 NOK 12755\n", - "batch 434 : total OK 30620 NOK 12780\n", - "batch 435 : total OK 30672 NOK 12828\n", - "batch 436 : total OK 30746 NOK 12854\n", - "batch 437 : total OK 30822 NOK 12878\n", - "batch 438 : total OK 30900 NOK 12900\n", - "batch 439 : total OK 30962 NOK 12938\n", - "batch 440 : total OK 31025 NOK 12975\n", - "batch 441 : total OK 31093 NOK 13007\n", - "batch 442 : total OK 31147 NOK 13053\n", - "batch 443 : total OK 31187 NOK 13113\n", - "batch 444 : total OK 31259 NOK 13141\n", - "batch 445 : total OK 31329 NOK 13171\n", - "batch 446 : total OK 31408 NOK 13192\n", - "batch 447 : total OK 31460 NOK 13240\n", - "batch 448 : total OK 31535 NOK 13265\n", - "batch 449 : total OK 31611 NOK 13289\n", - "batch 450 : total OK 31651 NOK 13349\n", - "batch 451 : total OK 31724 NOK 13376\n", - "batch 452 : total OK 31798 NOK 13402\n", - "batch 453 : total OK 31854 NOK 13446\n", - "batch 454 : total OK 31887 NOK 13513\n", - "batch 455 : total OK 31936 NOK 13564\n", - "batch 456 : total OK 31980 NOK 13620\n", - "batch 457 : total OK 32055 NOK 13645\n", - "batch 458 : total OK 32133 NOK 13667\n", - "batch 459 : total OK 32215 NOK 13685\n", - "batch 460 : total OK 32295 NOK 13705\n", - "batch 461 : total OK 32357 NOK 13743\n" + "batch 237 : total OK 17157 NOK 6543\n", + "batch 238 : total OK 17239 NOK 6561\n", + "batch 239 : total OK 17312 NOK 6588\n", + "batch 240 : total OK 17352 NOK 6648\n", + "batch 241 : total OK 17408 NOK 6692\n", + "batch 242 : total OK 17463 NOK 6737\n", + "batch 243 : total OK 17519 NOK 6781\n", + "batch 244 : total OK 17595 NOK 6805\n", + "batch 245 : total OK 17635 NOK 6865\n", + "batch 246 : total OK 17714 NOK 6886\n", + "batch 247 : total OK 17756 NOK 6944\n", + "batch 248 : total OK 17816 NOK 6984\n", + "batch 249 : total OK 17889 NOK 7011\n", + "batch 250 : total OK 17931 NOK 7069\n", + "batch 251 : total OK 17989 NOK 7111\n", + "batch 252 : total OK 18041 NOK 7159\n", + "batch 253 : total OK 18089 NOK 7211\n", + "batch 254 : total OK 18152 NOK 7248\n", + "batch 255 : total OK 18215 NOK 7285\n", + "batch 256 : total OK 18287 NOK 7313\n", + "batch 257 : total OK 18350 NOK 7350\n", + "batch 258 : total OK 18410 NOK 7390\n", + "batch 259 : total OK 18459 NOK 7441\n", + "batch 260 : total OK 18533 NOK 7467\n", + "batch 261 : total OK 18602 NOK 7498\n", + "batch 262 : total OK 18662 NOK 7538\n", + "batch 263 : total OK 18720 NOK 7580\n", + "batch 264 : total OK 18775 NOK 7625\n", + "batch 265 : total OK 18846 NOK 7654\n", + "batch 266 : total OK 18901 NOK 7699\n", + "batch 267 : total OK 18979 NOK 7721\n", + "batch 268 : total OK 19048 NOK 7752\n", + "batch 269 : total OK 19119 NOK 7781\n", + "batch 270 : total OK 19182 NOK 7818\n", + "batch 271 : total OK 19240 NOK 7860\n", + "batch 272 : total OK 19286 NOK 7914\n", + "batch 273 : total OK 19353 NOK 7947\n", + "batch 274 : total OK 19428 NOK 7972\n", + "batch 275 : total OK 19492 NOK 8008\n", + "batch 276 : total OK 19562 NOK 8038\n", + "batch 277 : total OK 19635 NOK 8065\n", + "batch 278 : total OK 19720 NOK 8080\n", + "batch 279 : total OK 19776 NOK 8124\n", + "batch 280 : total OK 19828 NOK 8172\n", + "batch 281 : total OK 19910 NOK 8190\n", + "batch 282 : total OK 19988 NOK 8212\n", + "batch 283 : total OK 20078 NOK 8222\n", + "batch 284 : total OK 20131 NOK 8269\n", + "batch 285 : total OK 20214 NOK 8286\n", + "batch 286 : total OK 20287 NOK 8313\n", + "batch 287 : total OK 20358 NOK 8342\n", + "batch 288 : total OK 20438 NOK 8362\n", + "batch 289 : total OK 20509 NOK 8391\n", + "batch 290 : total OK 20572 NOK 8428\n", + "batch 291 : total OK 20650 NOK 8450\n", + "batch 292 : total OK 20725 NOK 8475\n", + "batch 293 : total OK 20763 NOK 8537\n", + "batch 294 : total OK 20824 NOK 8576\n", + "batch 295 : total OK 20882 NOK 8618\n", + "batch 296 : total OK 20945 NOK 8655\n", + "batch 297 : total OK 21017 NOK 8683\n", + "batch 298 : total OK 21095 NOK 8705\n", + "batch 299 : total OK 21148 NOK 8752\n", + "batch 300 : total OK 21204 NOK 8796\n", + "batch 301 : total OK 21235 NOK 8865\n", + "batch 302 : total OK 21311 NOK 8889\n", + "batch 303 : total OK 21389 NOK 8911\n", + "batch 304 : total OK 21473 NOK 8927\n", + "batch 305 : total OK 21548 NOK 8952\n", + "batch 306 : total OK 21621 NOK 8979\n", + "batch 307 : total OK 21692 NOK 9008\n", + "batch 308 : total OK 21762 NOK 9038\n", + "batch 309 : total OK 21837 NOK 9063\n", + "batch 310 : total OK 21869 NOK 9131\n", + "batch 311 : total OK 21915 NOK 9185\n", + "batch 312 : total OK 21951 NOK 9249\n", + "batch 313 : total OK 22026 NOK 9274\n", + "batch 314 : total OK 22084 NOK 9316\n", + "batch 315 : total OK 22160 NOK 9340\n", + "batch 316 : total OK 22226 NOK 9374\n", + "batch 317 : total OK 22263 NOK 9437\n", + "batch 318 : total OK 22318 NOK 9482\n", + "batch 319 : total OK 22380 NOK 9520\n", + "batch 320 : total OK 22414 NOK 9586\n", + "batch 321 : total OK 22491 NOK 9609\n", + "batch 322 : total OK 22557 NOK 9643\n", + "batch 323 : total OK 22631 NOK 9669\n", + "batch 324 : total OK 22698 NOK 9702\n", + "batch 325 : total OK 22762 NOK 9738\n", + "batch 326 : total OK 22805 NOK 9795\n", + "batch 327 : total OK 22858 NOK 9842\n", + "batch 328 : total OK 22923 NOK 9877\n", + "batch 329 : total OK 22963 NOK 9937\n", + "batch 330 : total OK 23032 NOK 9968\n", + "batch 331 : total OK 23106 NOK 9994\n", + "batch 332 : total OK 23157 NOK 10043\n", + "batch 333 : total OK 23199 NOK 10101\n", + "batch 334 : total OK 23256 NOK 10144\n", + "batch 335 : total OK 23345 NOK 10155\n", + "batch 336 : total OK 23426 NOK 10174\n", + "batch 337 : total OK 23485 NOK 10215\n", + "batch 338 : total OK 23540 NOK 10260\n", + "batch 339 : total OK 23589 NOK 10311\n", + "batch 340 : total OK 23659 NOK 10341\n", + "batch 341 : total OK 23715 NOK 10385\n", + "batch 342 : total OK 23783 NOK 10417\n", + "batch 343 : total OK 23868 NOK 10432\n", + "batch 344 : total OK 23930 NOK 10470\n", + "batch 345 : total OK 23985 NOK 10515\n", + "batch 346 : total OK 24041 NOK 10559\n", + "batch 347 : total OK 24095 NOK 10605\n", + "batch 348 : total OK 24167 NOK 10633\n", + "batch 349 : total OK 24229 NOK 10671\n", + "batch 350 : total OK 24297 NOK 10703\n", + "batch 351 : total OK 24365 NOK 10735\n", + "batch 352 : total OK 24433 NOK 10767\n", + "batch 353 : total OK 24493 NOK 10807\n", + "batch 354 : total OK 24551 NOK 10849\n", + "batch 355 : total OK 24612 NOK 10888\n", + "batch 356 : total OK 24668 NOK 10932\n", + "batch 357 : total OK 24741 NOK 10959\n", + "batch 358 : total OK 24813 NOK 10987\n", + "batch 359 : total OK 24889 NOK 11011\n", + "batch 360 : total OK 24956 NOK 11044\n", + "batch 361 : total OK 25027 NOK 11073\n", + "batch 362 : total OK 25102 NOK 11098\n", + "batch 363 : total OK 25160 NOK 11140\n", + "batch 364 : total OK 25244 NOK 11156\n", + "batch 365 : total OK 25284 NOK 11216\n", + "batch 366 : total OK 25334 NOK 11266\n", + "batch 367 : total OK 25391 NOK 11309\n", + "batch 368 : total OK 25454 NOK 11346\n", + "batch 369 : total OK 25523 NOK 11377\n", + "batch 370 : total OK 25606 NOK 11394\n", + "batch 371 : total OK 25658 NOK 11442\n", + "batch 372 : total OK 25715 NOK 11485\n", + "batch 373 : total OK 25762 NOK 11538\n", + "batch 374 : total OK 25832 NOK 11568\n", + "batch 375 : total OK 25885 NOK 11615\n", + "batch 376 : total OK 25945 NOK 11655\n", + "batch 377 : total OK 26014 NOK 11686\n", + "batch 378 : total OK 26083 NOK 11717\n", + "batch 379 : total OK 26154 NOK 11746\n", + "batch 380 : total OK 26218 NOK 11782\n", + "batch 381 : total OK 26285 NOK 11815\n", + "batch 382 : total OK 26348 NOK 11852\n", + "batch 383 : total OK 26401 NOK 11899\n", + "batch 384 : total OK 26468 NOK 11932\n", + "batch 385 : total OK 26543 NOK 11957\n", + "batch 386 : total OK 26618 NOK 11982\n", + "batch 387 : total OK 26670 NOK 12030\n", + "batch 388 : total OK 26723 NOK 12077\n", + "batch 389 : total OK 26782 NOK 12118\n", + "batch 390 : total OK 26853 NOK 12147\n", + "batch 391 : total OK 26936 NOK 12164\n", + "batch 392 : total OK 26989 NOK 12211\n", + "batch 393 : total OK 27037 NOK 12263\n", + "batch 394 : total OK 27095 NOK 12305\n", + "batch 395 : total OK 27164 NOK 12336\n", + "batch 396 : total OK 27229 NOK 12371\n", + "batch 397 : total OK 27282 NOK 12418\n", + "batch 398 : total OK 27342 NOK 12458\n", + "batch 399 : total OK 27403 NOK 12497\n", + "batch 400 : total OK 27455 NOK 12545\n", + "batch 401 : total OK 27539 NOK 12561\n", + "batch 402 : total OK 27626 NOK 12574\n", + "batch 403 : total OK 27692 NOK 12608\n", + "batch 404 : total OK 27749 NOK 12651\n", + "batch 405 : total OK 27800 NOK 12700\n", + "batch 406 : total OK 27844 NOK 12756\n", + "batch 407 : total OK 27897 NOK 12803\n", + "batch 408 : total OK 27971 NOK 12829\n", + "batch 409 : total OK 28041 NOK 12859\n", + "batch 410 : total OK 28089 NOK 12911\n", + "batch 411 : total OK 28181 NOK 12919\n", + "batch 412 : total OK 28250 NOK 12950\n", + "batch 413 : total OK 28313 NOK 12987\n", + "batch 414 : total OK 28360 NOK 13040\n", + "batch 415 : total OK 28429 NOK 13071\n", + "batch 416 : total OK 28496 NOK 13104\n", + "batch 417 : total OK 28569 NOK 13131\n", + "batch 418 : total OK 28618 NOK 13182\n", + "batch 419 : total OK 28646 NOK 13254\n", + "batch 420 : total OK 28684 NOK 13316\n", + "batch 421 : total OK 28735 NOK 13365\n", + "batch 422 : total OK 28799 NOK 13401\n", + "batch 423 : total OK 28854 NOK 13446\n", + "batch 424 : total OK 28918 NOK 13482\n", + "batch 425 : total OK 28976 NOK 13524\n", + "batch 426 : total OK 29044 NOK 13556\n", + "batch 427 : total OK 29120 NOK 13580\n", + "batch 428 : total OK 29188 NOK 13612\n", + "batch 429 : total OK 29240 NOK 13660\n", + "batch 430 : total OK 29298 NOK 13702\n", + "batch 431 : total OK 29341 NOK 13759\n", + "batch 432 : total OK 29418 NOK 13782\n", + "batch 433 : total OK 29474 NOK 13826\n", + "batch 434 : total OK 29548 NOK 13852\n", + "batch 435 : total OK 29591 NOK 13909\n", + "batch 436 : total OK 29658 NOK 13942\n", + "batch 437 : total OK 29733 NOK 13967\n", + "batch 438 : total OK 29812 NOK 13988\n", + "batch 439 : total OK 29860 NOK 14040\n", + "batch 440 : total OK 29919 NOK 14081\n", + "batch 441 : total OK 29997 NOK 14103\n", + "batch 442 : total OK 30049 NOK 14151\n", + "batch 443 : total OK 30090 NOK 14210\n", + "batch 444 : total OK 30159 NOK 14241\n", + "batch 445 : total OK 30225 NOK 14275\n", + "batch 446 : total OK 30296 NOK 14304\n", + "batch 447 : total OK 30352 NOK 14348\n", + "batch 448 : total OK 30421 NOK 14379\n", + "batch 449 : total OK 30500 NOK 14400\n", + "batch 450 : total OK 30533 NOK 14467\n", + "batch 451 : total OK 30605 NOK 14495\n", + "batch 452 : total OK 30670 NOK 14530\n", + "batch 453 : total OK 30730 NOK 14570\n", + "batch 454 : total OK 30758 NOK 14642\n", + "batch 455 : total OK 30797 NOK 14703\n", + "batch 456 : total OK 30832 NOK 14768\n", + "batch 457 : total OK 30907 NOK 14793\n", + "batch 458 : total OK 30987 NOK 14813\n", + "batch 459 : total OK 31066 NOK 14834\n", + "batch 460 : total OK 31142 NOK 14858\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "batch 462 : total OK 32421 NOK 13779\n", - "batch 463 : total OK 32487 NOK 13813\n", - "batch 464 : total OK 32574 NOK 13826\n", - "batch 465 : total OK 32643 NOK 13857\n", - "batch 466 : total OK 32703 NOK 13897\n", - "batch 467 : total OK 32777 NOK 13923\n", - "batch 468 : total OK 32843 NOK 13957\n", - "batch 469 : total OK 32932 NOK 13968\n", - "batch 470 : total OK 33008 NOK 13992\n", - "batch 471 : total OK 33090 NOK 14010\n", - "batch 472 : total OK 33159 NOK 14041\n", - "batch 473 : total OK 33240 NOK 14060\n", - "batch 474 : total OK 33304 NOK 14096\n", - "batch 475 : total OK 33384 NOK 14116\n", - "batch 476 : total OK 33461 NOK 14139\n", - "batch 477 : total OK 33544 NOK 14156\n", - "batch 478 : total OK 33631 NOK 14169\n", - "batch 479 : total OK 33716 NOK 14184\n", - "batch 480 : total OK 33797 NOK 14203\n", - "batch 481 : total OK 33835 NOK 14265\n", - "batch 482 : total OK 33903 NOK 14297\n", - "batch 483 : total OK 33972 NOK 14328\n", - "batch 484 : total OK 34032 NOK 14368\n", - "batch 485 : total OK 34072 NOK 14428\n", - "batch 486 : total OK 34135 NOK 14465\n", - "batch 487 : total OK 34198 NOK 14502\n", - "batch 488 : total OK 34271 NOK 14529\n", - "batch 489 : total OK 34327 NOK 14573\n", - "batch 490 : total OK 34381 NOK 14619\n", - "batch 491 : total OK 34461 NOK 14639\n", - "batch 492 : total OK 34544 NOK 14656\n", - "batch 493 : total OK 34640 NOK 14660\n", - "batch 494 : total OK 34711 NOK 14689\n", - "batch 495 : total OK 34804 NOK 14696\n", - "batch 496 : total OK 34896 NOK 14704\n", - "batch 497 : total OK 34986 NOK 14714\n", - "batch 498 : total OK 35080 NOK 14720\n", - "batch 499 : total OK 35153 NOK 14747\n", - "batch 500 : total OK 35196 NOK 14804\n" + "batch 461 : total OK 31208 NOK 14892\n", + "batch 462 : total OK 31272 NOK 14928\n", + "batch 463 : total OK 31342 NOK 14958\n", + "batch 464 : total OK 31423 NOK 14977\n", + "batch 465 : total OK 31480 NOK 15020\n", + "batch 466 : total OK 31538 NOK 15062\n", + "batch 467 : total OK 31609 NOK 15091\n", + "batch 468 : total OK 31679 NOK 15121\n", + "batch 469 : total OK 31765 NOK 15135\n", + "batch 470 : total OK 31839 NOK 15161\n", + "batch 471 : total OK 31916 NOK 15184\n", + "batch 472 : total OK 31978 NOK 15222\n", + "batch 473 : total OK 32058 NOK 15242\n", + "batch 474 : total OK 32118 NOK 15282\n", + "batch 475 : total OK 32189 NOK 15311\n", + "batch 476 : total OK 32265 NOK 15335\n", + "batch 477 : total OK 32346 NOK 15354\n", + "batch 478 : total OK 32433 NOK 15367\n", + "batch 479 : total OK 32516 NOK 15384\n", + "batch 480 : total OK 32595 NOK 15405\n", + "batch 481 : total OK 32634 NOK 15466\n", + "batch 482 : total OK 32696 NOK 15504\n", + "batch 483 : total OK 32766 NOK 15534\n", + "batch 484 : total OK 32824 NOK 15576\n", + "batch 485 : total OK 32865 NOK 15635\n", + "batch 486 : total OK 32929 NOK 15671\n", + "batch 487 : total OK 32993 NOK 15707\n", + "batch 488 : total OK 33057 NOK 15743\n", + "batch 489 : total OK 33111 NOK 15789\n", + "batch 490 : total OK 33166 NOK 15834\n", + "batch 491 : total OK 33231 NOK 15869\n", + "batch 492 : total OK 33311 NOK 15889\n", + "batch 493 : total OK 33406 NOK 15894\n", + "batch 494 : total OK 33480 NOK 15920\n", + "batch 495 : total OK 33570 NOK 15930\n", + "batch 496 : total OK 33659 NOK 15941\n", + "batch 497 : total OK 33749 NOK 15951\n", + "batch 498 : total OK 33840 NOK 15960\n", + "batch 499 : total OK 33906 NOK 15994\n", + "batch 500 : total OK 33949 NOK 16051\n" ] } ], @@ -877,14 +880,14 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Final top-1 accuracy: 70.392%\n" + "Final top-1 accuracy: 67.898%\n" ] } ], @@ -903,27 +906,28 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'runtime[ms]': 50.49920082092285,\n", - " 'throughput[images/s]': 1980.2293575815947,\n", - " 'DRAM_in_bandwidth[Mb/s]': 298.0799647380423,\n", - " 'DRAM_out_bandwidth[Mb/s]': 0.01980229357581595,\n", - " 'fclk[mhz]': 100.0,\n", + "{'runtime[ms]': 33.641815185546875,\n", + " 'throughput[images/s]': 2972.491212155573,\n", + " 'DRAM_in_bandwidth[Mb/s]': 447.4431571833541,\n", + " 'DRAM_out_bandwidth[Mb/s]': 0.029724912121555733,\n", + " 'DRAM_extw_idma0_bandwidth[Mb/s]': 6087.662002494613,\n", + " 'fclk[mhz]': 178,\n", " 'batch_size': 100,\n", - " 'fold_input[ms]': 1.5020370483398438e-05,\n", - " 'pack_input[ms]': 2.4080276489257812e-05,\n", - " 'copy_input_data_to_device[ms]': 0.006676673889160156,\n", - " 'copy_output_data_from_device[ms]': 0.00022292137145996094,\n", - " 'unpack_output[ms]': 0.004586219787597656,\n", - " 'unfold_output[ms]': 6.9141387939453125e-06}" + " 'fold_input[ms]': 0.03409385681152344,\n", + " 'pack_input[ms]': 0.03838539123535156,\n", + " 'copy_input_data_to_device[ms]': 8.066892623901367,\n", + " 'copy_output_data_from_device[ms]': 0.04982948303222656,\n", + " 'unpack_output[ms]': 8.891582489013672,\n", + " 'unfold_output[ms]': 0.0054836273193359375}" ] }, - "execution_count": 15, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } From 35bef39d2981ac6792ae7cd1ddae3e292d5e1de4 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Tue, 15 Jun 2021 10:06:46 +0100 Subject: [PATCH 10/11] [Bitfile] update link and md5sum for U250 --- finn_examples/bitfiles/bitfiles.zip.link | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/finn_examples/bitfiles/bitfiles.zip.link b/finn_examples/bitfiles/bitfiles.zip.link index 6c05a3a..95e7e0d 100644 --- a/finn_examples/bitfiles/bitfiles.zip.link +++ b/finn_examples/bitfiles/bitfiles.zip.link @@ -16,7 +16,7 @@ "md5sum": "1ed10d74e85eec70fd094b2947b5b8e3" }, "xilinx_u250_xdma_201830_2": { - "url": "https://github.com/Xilinx/finn-examples/releases/download/mnv1-u250-partitioned/xilinx_u250_xdma_201830_2.zip", - "md5sum": "d8c7d67c688f3471b6e2c53762b8b258" + "url": "https://github.com/Xilinx/finn-examples/releases/download/rn50-u250/xilinx_u250_xdma_201830_2.zip", + "md5sum": "042cc5602c8a39d7541f1d79946c0b68" } } From ce4e0904401d463928b7572e9efcde67268283e4 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu Date: Tue, 15 Jun 2021 11:12:51 +0200 Subject: [PATCH 11/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8467a64..a95549e 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ dummy_out = accel.execute(dummy_in) |
CIFAR-10 | CNV (VGG-11-like) | several variants:
1/2-bit weights/activations | all | |

MNIST | 3-layer fully-connected | several variants:
1/2-bit weights/activations | all | |

ImageNet | MobileNet-v1 | 4-bit weights and activations
8-bit first layer weights | Alveo U250
ZCU104 | +|

ImageNet | ResNet-50 | 1-bit weights 2-bit activations
4-bit residuals
8-bit first/last layer weights | Alveo U250 | ## Supported Boards