"use strict";(self.webpackChunkrspress_doc_template=self.webpackChunkrspress_doc_template||[]).push([["962"],{8890:function(e,o,i){e.exports=i.p+"static/image/hb_compile_introduction.8a1843e2.png"},57348:function(e,o,i){i.r(o);var n=i(85893),t=i(50065),a=i(8890);function l(e){let o=Object.assign({h1:"h1",a:"a",p:"p",code:"code",h2:"h2",ul:"ul",li:"li"},(0,t.ah)(),e.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.h1,{id:"the-hb_compile-tool",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#the-hb_compile-tool",children:"#"}),"The hb_compile Tool"]}),"\n",(0,n.jsx)(o.p,{children:"The hb_compile tool is a tool provided by Horizon to map floating-point model to quantized model with validation function and model modification function, covering the whole process of  PTQ model."}),"\n",(0,n.jsxs)(o.p,{children:["Based on the floating-point model, yaml configuration file (optional) and calibration data (optional), the model is optimized, calibrated, quantized, modified and compiled, and the final ",(0,n.jsx)(o.code,{children:"*.hbm"})," model is generated on the board."]}),"\n",(0,n.jsx)(o.p,{children:"The hb_compile tool conversion process and the outputs of each phase are shown below:"}),"\n",(0,n.jsx)("img",{src:a,alt:"hb_compile_introduction",width:"800"}),"\n",(0,n.jsxs)(o.h2,{id:"support-range",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#support-range",children:"#"}),"Support Range"]}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"It supports the verification, quantization, and compilation of the floating-point model."}),"\n",(0,n.jsx)(o.li,{children:"It supports the modification and compilation of the HBIR model."}),"\n"]}),"\n",(0,n.jsxs)(o.h2,{id:"usage-scenarios",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#usage-scenarios",children:"#"}),"Usage Scenarios"]}),"\n",(0,n.jsx)(o.p,{children:"The hb_compile tool supports three usage scenarios: model validation, model quantized compilation, model modification and HBIR model compilation."}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:[(0,n.jsx)(o.a,{href:"/latest/en/guide/ptq/ptq_tool/hb_compile/check.html",children:"Model Checking"}),": According to the provided floating-point model (caffe/onnx) and model information, return model checking results and error reporting information."]}),"\n",(0,n.jsxs)(o.li,{children:[(0,n.jsx)(o.a,{href:"/latest/en/guide/ptq/ptq_tool/hb_compile/convert.html",children:"Model Quantized Compilation"}),": According to the provided floating-point model (caffe/onnx) and yaml configuration file (optional), the model is quantized compilation to generate the intermediate stage onnx model file as well as hbm model that can be used for on-board deployment."]}),"\n",(0,n.jsxs)(o.li,{children:[(0,n.jsx)(o.a,{href:"/latest/en/guide/ptq/ptq_tool/hb_compile/modify.html",children:"Model Modification and HBIR Model Compilation"}),": Support for operations such as removing nodes from HBIR model and compiling HBIR model."]}),"\n"]})]})}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:o}=Object.assign({},(0,t.ah)(),e.components);return o?(0,n.jsx)(o,Object.assign({},e,{children:(0,n.jsx)(l,e)})):l(e)}o.default=d,d.__RSPRESS_PAGE_META={},d.__RSPRESS_PAGE_META["latest%2Fen%2Fguide%2Fptq%2Fptq_tool%2Fhb_compile.mdx"]={toc:[{id:"support-range",text:"Support Range",depth:2},{id:"usage-scenarios",text:"Usage Scenarios",depth:2}],title:"The hb_compile Tool",frontmatter:{}}}}]);