ug1327 dnndk user guide.pdf
赛灵思 dnndk user guide , programming guide, networkR XILINXChapter 12: Programming APlsAdded v2.06 information to the following APlsdpusetInputTensorInCHWInt80dpuSetInputTensorIn CHWFP320dpuSetInputTensorInHWCInt80dpusetInputTensorInHWCFP320dpugetoutputTensorInCHWFP320dpugetoutputTensorIn HWCInt80dpuGetOutputTensorInHWCFP320pusetInputlmageodpuSetInputlmage2002/28/2019 Version1.3Downloading dnndKSetting Up the hostChapter 3: Upgrading and PortingAdded DNNDK support for non-GPU host machinesNetwork CompressionDECENT OVerview02/19/2019 Version12Downloading DNNDKSetting Up the Evaluation BoardUpdated links to Xilinx product page with information aboutSetting up the dp-8020 Evaluation boardDNNDK-supported evaluation boardsSetting Up the DP-N1 Board02/07/2019 Version1.1Setting Up the HostUpdated informationAdded liability notice01/22/2019 Version1.0General updatesInitial xilinx releaseDNNDK USer guideSend FeedbackUG1327V15)June7,2019EX XILINXTable of ContentsRevision History2Table of contents4Chapter 1: Quick StartDownloading dNNDK垂着音音音音6Setting Up the HostSetting Up the Evaluation BoardSupport21Chapter 2: Copyright and Version22Copyright22Version…22Chapter 3: Upgrad ing and Porting25Since v3.0.25Since v2.0826Since v2.07.…27Since v2.06.…Since v1.10…29Upgrading from Previous Versions30Chapter 4: DNNDK32Overview1垂垂香音垂…………………………32Deep- Learning Processor Unit……33DNNDK Frame work34Chapter 5: Network Deployment Overview36Overview36Network Compression(Caffe Version)37Network Compression (TensorFlow Version38Network Compilation39Programming with DNNDKCompiling the Hybrid Executable43DNNDK USer guideSend FeedbackUG1327V15)June7,2019E XILINXTable of contentsRunning the application43Chapter 6: Network CompressionDECENT○ reviewDECENT Working Flow45DECENT ( Caffe Version)UsageDECENTCaffe Version)Working flow247DECENT (Tensor Flow Version)Usage48Chapter 7: Network Compilation音音。54DNNC OVerview. .Using dino54Compiling resNet50.…57Chapter 8: Programming with DNNDK60ogramming Model60Programming Interface62Chapter9: Hybrid Compilation………Chapter10: Running…64Chapter 11: Utilities...........·········.65DExplorer65SIght68Chapter 12: Programming apls70Library libn2cube70Library libdputils138Legal Notices…音音看音音音着音音音音音垂147Please Read: Important Legal Notices147DNNDK USer guideSend Feedback5UG1327V15)June7,2019RX XILINXChapter 1: Quick StartDownloading DNNDKThe Deep Neural Network Development Kit(dnNDk) package can be freely downloaded afterregistrationfromtheXilinxwebsitehttps://www.xilinx.com/products/design-tools/ai-inference/edge-aiplattorm. htmlUsing a DNNDK-supported evaluation board is recommended to allow you to become familiar with theDnndktoolchainRefertohttps://www.xilinx.com/products/design-tools/ai-inference/ai-developer-hub. htmledge for more details about the dNNDK-supported evaluation boardsDEPHiDNNDKThe package name for the dNNDK v30 release is xilin dnndk v3 0 yymm tar gz, in which yy is theyear and mm is the month. For example, the current released package name isxilinx dnndk v30 1905. tar. gzThe directory structure for the dnndk release package is shown in the following figure. In the rest ofthis document, sdnndk pkg is used to represent the name of xilinx dnndk v3 o for simplicityThe evaluation boards supported for this release areXilinx③zCU102Xilinx ZCU104Avnet Ultra96The host x8 6 folder contains files that need to be copied to the host computer running the 64-bitversion of ubuntu 14.04 lts or Ubuntu 16.04 ltsThe folder contains files to be used on the evaluation board. the actual name of thefolder corresponds to the DNNDK-supported boards: ultra96, ZCU102, or zcu104 Utility tools, Deeplearning Processor Unit(DPU)drivers, DPU runtime and development libraries are device-specific, andwill be different for the various boardsDNNDK USer guideSend Feedback6UG1327V15)June7,2019R XILINXChapter 1: Quick StartSdnndk pkgC○ PYRIGHThost x86install. shmoae⊥pkgsbuntu14.04ubuntu16.04bcard nameinstall. shKaS--d≌iVerincludelibSetting Up the HostThe"host_86"folder contains the Deep Compression Tool (DECENT)and Deep Neural NetworkCompiler(DNNC)host tools, which allow neural networks to be optimized and accelerated on the DPUInterence engineBLE“As|sDNNDK USer guideSend FeedbackUG1327(15)June7,2019E XILINXChapter 1: Quick StartInstalling the GPU Platform SoftwareThe current dnndk release can be used on the x86 host machine with or without gpu. with gPusupport, dECEnT is able to run fasterIf GPU is available in the X86 host machine, install the necessary GPu platform software in accordancewith your GPU product documentation. Ensure all versions are compatible with the version ofDNNDK. For questions, contact your account manager or submit a support case tohttps://www.xilinx.comCaffe version: Installing Dependent LibrariesRun the following command to install the dependent libraries required by Caffe v1.0s apt-get install -y --force-yes build-essential autcconf libtool libopenblasdev libgflags-dev libgoogle-glog-dev libopencv-dev protobuf-compiler libleveldbdev liblmdb-dev libhdf5-dev libsnappy-dev libboost-all-dev libssl-devTensorFlow Version: Installing with AnacondaThe decent_Q for Tensor Flow supports operating system of Ubuntu 14.04 and 16.04 platforms, andhave both CPU and gPu versions. Xilinx provides installation packages for common environments listedbelow, users can download the right package. If you are working under other environments, contactXilinxTable 1: Supported 64-bit Host OS Platforms and Required PackagesOsRequiredVersionPython Package NamePlatformPackagesCUDA 8.0(GA2 ) 2.7tensorflow_gpu-1.9.0-cp27-cp27mu-linux_x86_64whlGPUUbuntuCUdNN 7.0.53.6tensorflow_gpu-1.9.0-cp36-cp36m-linux_x86_64 whl14.04LTS2.7tensorflow-1.9.0-cp27-cp27mu-linux_x86_64.wCPU Onlyone3.6tensorflow-1.9.0-cp36-cp36m-linux_x86_ 64 whlCUDA 9.027tensorflow_gpu-1.9.0-cp27-cp27mu-linuxx86_64. whCUDNN 70.5GPUUbuntuCUDA 9.03.6tensorflow_-gpu-1.9.0-cp36-cp36m-linux_x86_64Whl16.04LTSCUdnn 70.52.7tensorflow-1.9.0-cp27-cp27mu-linux_x86_64 whlCPU Only None3.6tensorflow-1.9.0-cp36-cp36m-linux_86_64whlDNNDK USer guideSend Feedback8UG1327V15)June7,2019E XILINXChapter 1: Quick StartAnaconda provides the conda utility to create a virtual environment. It is recommended to create a newanaconda environment and use the pip install command to install dECENT_Q in case of affectingtheexistingTensorFlowversionsOnceyouhaveanacondainstalled(seehttps://www.anaconda.comforinstructions), use the following commands to install DECENT_Q inside a virtual environments conda create -n decent pip python=2.7 or python=3.6, etcs source activate decent(decent)s pip install s[ DECENT Q TF PKG) Select the right installation packagefor your environment(decent)s pip install numpy opencv-python sklearn scipy procressbar2where DECENT_Q_TF_PKG is the downloaded installation packageNote: You can run the tool with --he lp to validate your installation(decent)s decent qhelInstalling the DNNDK Host ToolsAfter downloading and unpacking the dnndk package, execute the. /install. sh command under the host x86 folder to install the decent and dnnc tools on the host. the must be replaced with the evaluation board to be used(ultrag6, ZCU104, or ZCU102according to the evaluation board to be used. )With board name specified, the suited version DNNOcompiler will be automatically installed for the evaluation boardNote: There are two version dnnc binaries available for Ubuntu 14.04 and 16.04 in dividually under thehost_x86 folder. dnnc-dpul. 4. 0 is for DPU configured with low RAM usage, and dnnc-dpul.4.0.1is for dPU configured with high RAM usage. Running install. sh will automatically install the rightversion of the dnnc binary for the corresponding evaluation boardSetting Up the Evaluation BoardSupported Evaluation Boardsevaluating low-power, low-throughput deep learning applications. The Xilinx ZCU102 and ZCU 04 areThe following sections describe the evaluation boards supported by dnndk the Ultra96 is intended fogeared towards higher throughput deep learning inference requiring low latencyThe sd card system image files for all DNNDK supported evaluation boards are available for downloadfromhttps://www.xilinx.com/products/design-tools/ai-inference/ai-developer-hub.html#edge.Beforetrying DNNDK v30 on the evaluation boards, you must download the updated version image fileotherwise, dnNDK package cannot work on the previous version image file. The throughputperformance in FPS for each dnndK sample is listed for all these evaluation boardsNote: Before installing DNNDK v30 into your evaluation board, download the updated version imagefilefromhttps://www.xilinx.com/products/design-tools/ai-inference/ai-developer-hub.html#edgeDNNDK USer guideSend FeedbackUG1327V15)June7,2019E XILINXChapter 1: Quick StartSetting Up the Ultra96 BoardUltra96 is an Arm r-based, Xilinx Zynga UltraScale+ TM MPSoc development board based on the linaro96Boards specification. The 96Board specifications are open and define a standard board layout fordevelopment platforms that can be used by software application, hardware device, kernel, and othersystem software developers. Ultra96 represents a unique position in the 96Boards community with awide range of potential peripherals and acceleration engines in the programmable logic that is notavailable from other offerings. the hardware documentation for Ultra96 is available for download onhttp://zedboard.org/product/ultra96The main connectivity interfaces for Ultra96 are shown in the following figurePowerSW2 2C132@6C XILINXPESZYNQ180吧56Uv - CI5TMicro sd cardmini DPUSBUSBUSB●Figure 1: UItra96 Evaluation Board and Peripheral ConnectionsThe dPu signature information is shown in the following figure. One B2304F dPU core running at 260MHz is implemented on the Xilinx ZU3 deviceDNNDK USer guideSend Feedback10UG1327V15)June7,2019
用户评论