比特派app手机版下载|hhb

作者: 比特派app手机版下载
2024-03-07 19:07:49

HHB音乐酒吧_百度百科

乐酒吧_百度百科 网页新闻贴吧知道网盘图片视频地图文库资讯采购百科百度首页登录注册进入词条全站搜索帮助首页秒懂百科特色百科知识专题加入百科百科团队权威合作下载百科APP个人中心收藏查看我的收藏0有用+10HHB音乐酒吧播报讨论上传视频杭州市境内酒吧2019年1月,马云为自己创办的音乐酒吧举行了开业仪式,该酒吧名为“HHB音乐酒吧(HHB Music House)”。 [1]由于“HHB”酷似“还花呗”的缩写,也被网友戏称为“还花呗”酒吧中文名HHB音乐酒吧开业时间2019年1月地理位置文一西路624号别    名“还花呗”酒吧目录1开业2嘉宾开业播报编辑HHB MUSIC HOUSE2019年1月,马云为自己创办的音乐酒吧举行了开业仪式,该酒吧名为“HHB音乐酒吧”。其中,“HHB”意为平头哥,而该酒吧logo也同样为平头哥。马云在致辞中说:“自己拉了一些朋友搞了个酒吧,希望酒吧能红火起来,给很多被埋没的音乐人一个机会。”嘉宾播报编辑包括高晓松、马东、汪涵、大S以及蔡康永等娱乐圈明星出席开业仪式。 [2]新手上路成长任务编辑入门编辑规则本人编辑我有疑问内容质疑在线客服官方贴吧意见反馈投诉建议举报不良信息未通过词条申诉投诉侵权信息封禁查询与解封©2024 Baidu 使用百度前必读 | 百科协议 | 隐私政策 | 百度百科合作平台 | 京ICP证030173号 京公网安备110000020000

百度知道 - 信息提示

百度知道 - 信息提示

百度首页

商城

注册

登录

网页

资讯

视频

图片

知道

文库

贴吧采购

地图更多

搜索答案

我要提问

百度知道>提示信息

知道宝贝找不到问题了>_

该问题可能已经失效。返回首页

15秒以后自动返回

帮助

 | 意见反馈

 | 投诉举报

京ICP证030173号-1   京网文【2023】1034-029号     ©2024Baidu  使用百度前必读 | 知道协议 

马云:我开HHB音乐酒吧不是为了赚钱,而是为了卖酒 - 知乎

马云:我开HHB音乐酒吧不是为了赚钱,而是为了卖酒 - 知乎首发于铺先生切换模式写文章登录/注册马云:我开HHB音乐酒吧不是为了赚钱,而是为了卖酒子善聊加盟​与谁同行比要去的远方更重要平头哥酒吧今日马云的名字几乎都是挂在了全网热搜上,18年年底马云开无人酒店,19年年初又开了“HHB音乐酒吧”。可所谓大佬做事,根本不需要宣传,本身就自带高曝光!说到去年年底马云开创的无人酒店,虽然小编没有去过无人酒店,但是再看了宣传之后也很想去体验一番,毕竟是对于新鲜事物所有人都难以抵抗。更何况我还是一个平凡人呢!相比于无人酒店,昨天看到大众点评“HHB音乐酒吧”之后,更让我这个没去过杭州的人来说,真恨不得买张机票就飞过去,好好嗨一番!除了体验马云开的无人酒店、HHB音乐酒吧外,一定要再去阿里巴巴园区走一番,不仅如此更要体验一下素有未来之城的“杭州”。话再说回来,马云在“HHB音乐酒吧”开业仪式致辞中说“我就想搞一个给大家能够提供好酒、好音乐、好朋友的地方,不以赚钱为目的”。随后就有网友调侃,酒吧Logo中的HHB三个字母引申意思好像“还花呗”。这点不得不佩服马云在起名字上也是个人才!其实这家酒吧的名字“HHB MUSIC HOUSE”被马云称为HHB平头哥,而HH两个字母应该是来自阿里巴巴的“Double H”战略,快乐(Happiness)和健康(Health)。马云旗下的产业,品牌名称大多数都以动物为主,比如天猫、飞猪、大鱼、河马等,而这个酒吧叫平头哥,百度了一下平头哥,其真实名字叫“蜜獾”,生存力强,多在黄昏和夜间活动(这点特别符合酒吧的特性,马爸爸真是有才!),最重要的一点是蜜獾被吉尼斯世界纪录把它命名为“最大胆的动物”,例如,当面对的是一个男人它会攻击他的睾丸。真是动物界中聪明的代表!这就可以证明马云选这个的意思是“不怕,别惹我”以上说了这么多,那么对于马云是否真的开了酒吧,真实的答案是没有,根据店家反映:只是卖马云酒庄的酒。不管怎么说,这家酒吧的老板也绝对是一个厉害的人物。像大佬们的触角向各个领域延伸的例子很多,不只有马云自己想要触及餐饮;刘强东去年也开了间无人餐厅,没有服务员,全是自动化。涉及除了本身主要的领域外,也会多元化发展。不管是马云开没开酒吧也好,还是刘强东开的无人餐厅也罢!这些都只是做投资生意的生意人,相比于真正从事餐饮起家的肯定不及。说到餐饮行业,不得不说的就是“海底捞”,海底捞因服务而出名,但是产品做得也是很棒。就在前几天海底捞的武汉门店就被报出播放不雅视频,从而引起社会强烈的反响。在这之前比海底捞这种事情更严重的一家餐饮企业,也是当今网红品牌的“喜茶”被报出卫生“脏乱差”。一个是餐饮行业中的老大,一个是餐饮行业中的网红。无论是发生的事情大小,都会引起强烈的反响。这就说明一点“企业越大,所要承受的压力就越大”。因此做为餐饮行业中的创业者们一定要记住的三个红线“服务、卫生、食品安全”。这三点任何一点突破红线都可能成为企业最致命因素!不管你背后的财团多么的强大,不管你企业下的员工有多少。比如去年的假疫苗事件,长春长生生物突破了道德底线,制造假药。为社会带来危害,因此,这样的企业被查封。总之突破红线都可能丧失你在消费者心目中的地位。想要留住消费者的心,除了要给消费者带来新颖稀奇的产品外,更要注重食品安全。在保证食品安全的基础上,丰富产品口感。除此之外,店内的环境卫生以及服务都是留住消费者重要的因素!发布于 2019-01-08 19:51餐饮马云(人物)酒吧​赞同 8​​添加评论​分享​喜欢​收藏​申请转载​文章被以下专栏收录铺先生公众号:过于频繁,已被限制使用,请联系客服处理,热线电话400-600-3067,过于频繁,已被限制使用,请联系客服处理,热线电话400-600-3067

zh/02_applications/tutorials/K230_AI实战_HHB神经网络模型部署工具.md · kendryte/k230_docs - Gitee.com

zh/02_applications/tutorials/K230_AI实战_HHB神经网络模型部署工具.md · kendryte/k230_docs - Gitee.com

登录

注册

开源

企业版

高校版

搜索

帮助中心

使用条款

关于我们

开源

企业版

高校版

私有云

Gitee AI

NEW

我知道了

查看详情

登录

注册

代码拉取完成,页面将自动刷新

捐赠

捐赠前请先登录

取消

前往登录

扫描微信二维码支付

取消

支付完成

支付提示

将跳转至支付宝完成支付

确定

取消

Watch

不关注

关注所有动态

仅关注版本发行动态

关注但不提醒动态

4

Star

18

Fork

0

kendryte / k230_docs

代码

统计

流水线

服务

Gitee Pages

质量分析

Jenkins for Gitee

腾讯云托管

腾讯云 Serverless

悬镜安全

阿里云 SAE

Codeblitz

我知道了,不再自动展开

加入 Gitee

与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)

免费加入

已有帐号?

立即登录

main

管理

管理

分支 (1)

标签 (8)

main

v1.4

v1.3

v1.2

v1.1

v1.0.1

v1.0

v0.9

v0.8

克隆/下载

克隆/下载

HTTPS

SSH

SVN

SVN+SSH

下载ZIP

登录提示

该操作需登录 Gitee 帐号,请先登录后再操作。

立即登录

没有帐号,去注册

提示

下载代码请复制以下命令到终端执行

为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置

git config --global user.name userName

git config --global user.email userEmail

初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置

1

生成 RSA 密钥

2

获取 RSA 公钥内容,并配置到 SSH公钥 中

在 Gitee 上使用 SVN,请访问 使用指南

使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作

Username for 'https://gitee.com': userName

Password for 'https://userName@gitee.com':

#

私人令牌

k230_docs

/

zh

/

02_applications

/

tutorials

/

K230_AI实战_HHB神经网络模型部署工具.md

分支 1

标签 8

K230_AI实战_HHB神经网络模型部署工具.md

12.22 KB

# K230 AI实战 - HHB神经网络模型部署工具

![cover](images/canaan-cover.png)

版权所有©2023北京嘉楠捷思信息技术有限公司

## 免责声明

您购买的产品、服务或特性等应受北京嘉楠捷思信息技术有限公司(“本公司”,下同)及其关联公司的商业合同和条款的约束,本文档中描述的全部或部分产品、服务或特性可能不在您的购买或使用范围之内。除非合同另有约定,本公司不对本文档的任何陈述、信息、内容的正确性、可靠性、完整性、适销性、符合特定目的和不侵权提供任何明示或默示的声明或保证。除非另有约定,本文档仅作为使用指导参考。

由于产品版本升级或其他原因,本文档内容将可能在未经任何通知的情况下,不定期进行更新或修改。

## 商标声明

![logo](images/logo.png)、“嘉楠”和其他嘉楠商标均为北京嘉楠捷思信息技术有限公司及其关联公司的商标。本文档可能提及的其他所有商标或注册商标,由各自的所有人拥有。

**版权所有 © 2023北京嘉楠捷思信息技术有限公司。保留一切权利。**

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

## 目录

[TOC]

## 前言

### 简述

本文档为平头哥的HHB在k230硬件平台的使用说明文档,指导用户如何在HHB上编译模型生成c代码, 如何使用k230交叉编译工具链编译程序和上板运行等.

### 读者对象

本文档(本指南)主要适用于以下人员:

- 软件开发工程师

### 缩略词定义

| 简称 | 说明 |

| ---- | ---------------------------------- |

| HHB | Heterogeneous Honey Badger |

| SHL | Structure of Heterogeneous Library |

### 修订记录

| 文档版本号 | 修改说明 | 修改者 | 日期 |

| ---------- | -------- | ------ | --------- |

| V1.0 | 文档初版 | 张扬 | 2023/6/25 |

## 1. 概述

HHB程序在k230 rtt上部署运行, 需要如下步骤

- 基于HHB开发环境, 编译模型生成c代码

- 使用k230 rtt交叉编译工具链编译c代码

- 上板运行可执行程序

### 1.1 HHB

HHB (Heterogeneous Honey Badger) 是 T-Head 提供的一套针对玄铁芯片平台的神经网络模型部署工具集。包括了编译优化,性能分析,过程调试,结果模拟等一系列部署时所需的工具。

HHB 的功能与特性:

- 支持 caffe,tensorflow,onnx 和 tflite 对应格式的模型

- 支持 8/16 位定点和 16/32 位浮点等数据类型

- 支持对称和非对称定点量化,支持通道量化

- 可在部署前优化模型的网络结构

- 编译生成可在无剑 SoC 平台上执行的二进制

- 支持在主机上做行为模拟

- 多组件形式的工具集方便二次开发

- 同时提供传统习惯的 Unix 命令行和 Python 接口

HHB 已支持语音和视觉的多种不同业务算法,可导入 PyTorch 和 TensorFlow 等不同训练框架的模型。

HHB 以开源项目 [TVM](https://github.com/apache/tvm) 为基础架构,添加了丰富的命令行选项提供命令模式;预置了多类量化算法适配不同平台可支持的数据类型;根据不同平台特点,输出调用 SHL 的 C 代码,或者直接输出可执行的二进制。

![HHB 框架结构](https://help-static-aliyun-doc.aliyuncs.com/assets/img/zh-CN/6288173861/p668762.png)

详细使用方法可参考[HHB用户手册](https://www.yuque.com/za4k4z/oxlbxl)

### 1.2 SHL

SHL 是 T-HEAD 提供的一组针对玄铁 CPU 平台的神经网络库 API。抽象了各种常用的网络层的接口,并且提供一系列已优化的二进制库。

SHL 的特性:

- C 代码版本的参考实现。

- 提供玄铁系列 CPU 的汇编优化实现。

- 支持对称量化和非对称量化。

- 支持8位定点,16位定点和16位浮点等数据类型。

- 兼容 NCHW 和 NHWC 格式。

- 搭配 [HHB](https://www.yuque.com/za4k4z/oxlbxl) 实现代码自动调用。

- 覆盖 CPU,NPU 等不同体系结构。

- 附加异构参考实现。

SHL 提供了完成的接口声明和接口的参考实现,各个设备提供商可以依此针对性的完成各个接口的优化工作。

详细使用方法可参考[SHL用户手册](https://www.yuque.com/za4k4z/isgz8o/ayilv9)

## 2. HHB编译模型

### 2.1 环境搭建

> 前置条件: 本地PC已安装docker

- 去[HHB](https://xuantie.t-head.cn/community/download?id=4212696449735004160)下载hhb-2.2.35 docker image

- 解压/加载/启动docker image

```shell

tar xzf hhb-2.2.35.docker.tar.gz

cd hhb-2.2.35.docker/

docker load < hhb.2.2.35.img.tar

./start_hhb.sh

```

### 2.2 编译模型

目前这个版本docker image没有集成c908模型编译, 这里拷贝c906并修改相关配置。

```shell

root@02297217e66d:~# cd /home/example/

root@02297217e66d:/home/example# cp -a c906 c908

root@02297217e66d:/home/example# cd c908/onnx_mobilenetv2/

```

run.sh相关修改

- 修改--board参数的值(c906改为c908)

- 添加校正集参数( -cd )

- 添加量化参数(--quantization-scheme)

最后修改后run.sh内容如下

```shell

#!/bin/bash -x

hhb -S --model-file mobilenetv2-12.onnx --data-scale 0.017 --data-mean "124 117 104" --board c908 --input-name "input" --output-name "output" --input-shape "1 3 224 224" --postprocess save_and_top5 --simulate-data persian_cat.jpg -cd persian_cat.jpg --quantization-scheme "int8_asym_w_sym" --fuse-conv-relu

```

> 注: 不同的模型, 编译参数有可能不同,会造成性能数据差异。用户需要基于自己的模型, 深入了解hhb各参数含义(hhb -h)或者咨询平头哥等。

执行run.sh开始编译

```shell

root@02297217e66d:/home/example/c908/onnx_mobilenetv2# ./run.sh

+ hhb -S --model-file mobilenetv2-12.onnx --data-scale 0.017 --data-mean '124 117 104' --board c908 --input-name input --output-name output --input-shape '1 3 224 224' --postprocess save_and_top5 --simulate-data persian_cat.jpg -cd persian_cat.jpg --quantization-scheme int8_asym_w_sym --fuse-conv-relu

[2023-06-21 09:02:53] (HHB LOG): Start import model.

[2023-06-21 09:02:55] (HHB LOG): Model import completed!

[2023-06-21 09:02:55] (HHB LOG): Start quantization.

[2023-06-21 09:02:55] (HHB LOG): get calibrate dataset from persian_cat.jpg

[2023-06-21 09:02:55] (HHB LOG): Start optimization.

[2023-06-21 09:02:55] (HHB LOG): Optimization completed!

Calibrating: 100%|###############################################################################################################################################################################################################################| 153/153 [00:14<00:00, 10.66it/s]

[2023-06-21 09:03:10] (HHB LOG): Start conversion to csinn.

[2023-06-21 09:03:10] (HHB LOG): Conversion completed!

[2023-06-21 09:03:10] (HHB LOG): Start operator fusion.

[2023-06-21 09:03:10] (HHB LOG): Operator fusion completed!

[2023-06-21 09:03:10] (HHB LOG): Start operator split.

[2023-06-21 09:03:10] (HHB LOG): Operator split completed!

[2023-06-21 09:03:10] (HHB LOG): Start layout convert.

[2023-06-21 09:03:10] (HHB LOG): Layout convert completed!

[2023-06-21 09:03:10] (HHB LOG): Quantization completed!

[2023-06-21 09:03:14] (HHB LOG): cd hhb_out; qemu-riscv64 -cpu c908v hhb_runtime ./hhb.bm persian_cat.jpg.0.bin

Run graph execution time: 1675.78113ms, FPS=0.60

=== tensor info ===

shape: 1 3 224 224

data pointer: 0x2e0b40

=== tensor info ===

shape: 1 1000

data pointer: 0x325530

The max_value of output: 16.053827

The min_value of output: -8.026914

The mean_value of output: 0.002078

The std_value of output: 11.213154

============ top5: ===========

283: 16.053827

281: 14.920615

282: 12.559759

285: 12.182022

287: 11.520982

```

最后生成hhb_out目录,如下

```shell

root@02297217e66d:/home/example/c908/onnx_mobilenetv2# ll hhb_out

total 17940

drwxr-xr-x 2 root root 4096 Jun 21 09:03 ./

drwxr-xr-x 5 root root 4096 Jun 21 09:02 ../

-rw-r--r-- 1 root root 3554304 Jun 21 09:03 hhb.bm

-rwxr-xr-x 1 root root 6140744 Jun 21 09:03 hhb_runtime*

-rw-r--r-- 1 root root 602112 Jun 21 09:03 input.0.bin

-rw-r--r-- 1 root root 2860548 Jun 21 09:03 input.0.tensor

-rw-r--r-- 1 root root 4946 Jun 21 09:03 io.c

-rw-r--r-- 1 root root 1539 Jun 21 09:03 io.h

-rw-r--r-- 1 root root 7410 Jun 21 09:03 main.c

-rw-r--r-- 1 root root 81352 Jun 21 09:03 main.o

-rw-r--r-- 1 root root 112618 Jun 21 09:03 model.c

-rw-r--r-- 1 root root 791576 Jun 21 09:03 model.o

-rw-r--r-- 1 root root 3546112 Jun 21 09:03 model.params

-rw-r--r-- 1 root root 602112 Jun 21 09:03 persian_cat.jpg.0.bin

-rw-r--r-- 1 root root 9534 Jun 21 09:03 persian_cat.jpg.0.bin_output0_1_1000.txt

-rw-r--r-- 1 root root 20086 Jun 21 09:03 process.c

-rw-r--r-- 1 root root 2040 Jun 21 09:03 process.h

```

将hhb_out目录拷贝到/mnt,导出到PC, 后续需要使用k230 rtt工具链重新交叉编译。

```shell

root@02297217e66d:/home/example/c908/onnx_mobilenetv2# cp -a hhb_out/ /mnt/

```

## 3. Demo

### 3.1 环境搭建

> 前置条件: 用户已按照 k230_sdk文档编译了docker image

启动k230 docker image

```shell

cd /path/to/k230_sdk

docker run -u root -it -v $(pwd):$(pwd) -v $(pwd)/toolchain:/opt/toolchain -w $(pwd) k230_docker /bin/bash

```

### 3.2 编译demo

我们在k230_sdk中提供了HHB的demo, 用户只需将HHB编译的c代码拷贝过来即可编译出上板运行的可执行程序。

相关目录说明

| 目录 | 备注 |

| ------------------------------------------------------------ | ------------------------------------------------------------ |

| /path/to/k230_sdk/src/big/utils/examples/hhb | 用户可修改CMakeLists.txt追加demo |

| /path/to/k230_sdk/src/big/utils/lib目录下的csi-nn2和hhb-prebuilt-decode | c代码依赖的预编译库(csi-nn2/jpeg/png/zlib等, 使用musl交叉编译工具链编译) |

准备用例

mbv2_onnx_int8目录就是前面HHB生成的c代码, 用户修改了模型编译参数后, 需要同步更新过来.

用户也可以根据自己的模型,新增demo, 修改CMakeLists.txt即可。

开始编译

```shell

root@9d2a450436a7:/home/zhangyang/workspace/k230_sdk# cd src/big/utils/examples/hhb/

root@9d2a450436a7:/home/zhangyang/workspace/k230_sdk/src/big/utils/examples/hhb# ./build_app.sh

```

最后生成的可执行程序为out/bin/mbv2_onnx_int8.elf

```shell

root@9d2a450436a7:/home/zhangyang/workspace/k230_sdk/src/big/utils/examples/hhb# ll out/bin/mbv2_onnx_int8.elf

-rwxr-xr-x 1 root root 1172680 Jun 25 14:37 out/bin/mbv2_onnx_int8.elf*

```

将mbv2_onnx_int8运行的相关文件传送到小核linux的/sharefs目录

```shell

[root@canaan /sharefs/k230/mbv2_onnx_int8 ]#ls -l

total 5560

-rw-r--r-- 1 sshd sshd 3554304 Jun 25 2023 hhb.bm

-rwxr-xr-x 1 sshd sshd 1172680 Jun 25 2023 mbv2_onnx_int8.elf

-rw-r--r-- 1 sshd sshd 359355 Jun 25 2023 persian_cat.jpg

-rw-r--r-- 1 sshd sshd 602112 Jun 25 2023 persian_cat.jpg.0.bin

```

### 3.3 运行demo

- 启动k230, 在大核rtt串口下, 执行如下命令

```shell

msh />cd /sharefs/k230/mbv2_onnx_int8/

msh /sharefs/k230/mbv2_onnx_int8>./mbv2_onnx_int8.elf hhb.bm persian_cat.jpg.0.bin

Run graph execution time: 64.71648ms, FPS=15.45

=== tensor info ===

shape: 1 3 224 224

data pointer: 0x300170060

=== tensor info ===

shape: 1 1000

data pointer: 0x300194c80

The max_value of output: 15.581656

The min_value of output: -8.026914

The mean_value of output: 0.008405

The std_value of output: 11.703238

============ top5: ===========

283: 15.581656

281: 14.731747

282: 12.559759

285: 11.709850

287: 11.143245

msh /sharefs/k230/mbv2_onnx_int8>./mbv2_onnx_int8.elf hhb.bm persian_cat.jpg

Run graph execution time: 64.67589ms, FPS=15.46

=== tensor info ===

shape: 1 3 224 224

data pointer: 0x300170060

=== tensor info ===

shape: 1 1000

data pointer: 0x300194c80

The max_value of output: 16.053827

The min_value of output: -8.026914

The mean_value of output: 0.009821

The std_value of output: 12.815542

============ top5: ===========

283: 16.053827

281: 15.109484

282: 13.220798

287: 12.087587

285: 11.804284

```

一键复制

编辑

原始数据

按行查看

历史

Wentao Wu

提交于

2023-09-27 21:26

.

k230 sdk docs release v1.0

K230 AI实战 - HHB神经网络模型部署工具

版权所有©2023北京嘉楠捷思信息技术有限公司

免责声明

您购买的产品、服务或特性等应受北京嘉楠捷思信息技术有限公司(“本公司”,下同)及其关联公司的商业合同和条款的约束,本文档中描述的全部或部分产品、服务或特性可能不在您的购买或使用范围之内。除非合同另有约定,本公司不对本文档的任何陈述、信息、内容的正确性、可靠性、完整性、适销性、符合特定目的和不侵权提供任何明示或默示的声明或保证。除非另有约定,本文档仅作为使用指导参考。

由于产品版本升级或其他原因,本文档内容将可能在未经任何通知的情况下,不定期进行更新或修改。

商标声明

、“嘉楠”和其他嘉楠商标均为北京嘉楠捷思信息技术有限公司及其关联公司的商标。本文档可能提及的其他所有商标或注册商标,由各自的所有人拥有。

版权所有 © 2023北京嘉楠捷思信息技术有限公司。保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

目录

[TOC]

前言

简述

本文档为平头哥的HHB在k230硬件平台的使用说明文档,指导用户如何在HHB上编译模型生成c代码, 如何使用k230交叉编译工具链编译程序和上板运行等.

读者对象

本文档(本指南)主要适用于以下人员:

软件开发工程师

缩略词定义

简称

说明

HHB

Heterogeneous Honey Badger

SHL

Structure of Heterogeneous Library

修订记录

文档版本号

修改说明

修改者

日期

V1.0

文档初版

张扬

2023/6/25

1. 概述

HHB程序在k230 rtt上部署运行, 需要如下步骤

基于HHB开发环境, 编译模型生成c代码

使用k230 rtt交叉编译工具链编译c代码

上板运行可执行程序

1.1 HHB

HHB (Heterogeneous Honey Badger) 是 T-Head 提供的一套针对玄铁芯片平台的神经网络模型部署工具集。包括了编译优化,性能分析,过程调试,结果模拟等一系列部署时所需的工具。

HHB 的功能与特性:

支持 caffe,tensorflow,onnx 和 tflite 对应格式的模型

支持 8/16 位定点和 16/32 位浮点等数据类型

支持对称和非对称定点量化,支持通道量化

可在部署前优化模型的网络结构

编译生成可在无剑 SoC 平台上执行的二进制

支持在主机上做行为模拟

多组件形式的工具集方便二次开发

同时提供传统习惯的 Unix 命令行和 Python 接口

HHB 已支持语音和视觉的多种不同业务算法,可导入 PyTorch 和 TensorFlow 等不同训练框架的模型。

HHB 以开源项目 TVM 为基础架构,添加了丰富的命令行选项提供命令模式;预置了多类量化算法适配不同平台可支持的数据类型;根据不同平台特点,输出调用 SHL 的 C 代码,或者直接输出可执行的二进制。

详细使用方法可参考HHB用户手册

1.2 SHL

SHL 是 T-HEAD 提供的一组针对玄铁 CPU 平台的神经网络库 API。抽象了各种常用的网络层的接口,并且提供一系列已优化的二进制库。

SHL 的特性:

C 代码版本的参考实现。

提供玄铁系列 CPU 的汇编优化实现。

支持对称量化和非对称量化。

支持8位定点,16位定点和16位浮点等数据类型。

兼容 NCHW 和 NHWC 格式。

搭配 HHB 实现代码自动调用。

覆盖 CPU,NPU 等不同体系结构。

附加异构参考实现。

SHL 提供了完成的接口声明和接口的参考实现,各个设备提供商可以依此针对性的完成各个接口的优化工作。

详细使用方法可参考SHL用户手册

2. HHB编译模型

2.1 环境搭建

前置条件: 本地PC已安装docker

去HHB下载hhb-2.2.35 docker image

解压/加载/启动docker image

tar xzf hhb-2.2.35.docker.tar.gz

cd hhb-2.2.35.docker/

docker load < hhb.2.2.35.img.tar

./start_hhb.sh

2.2 编译模型

目前这个版本docker image没有集成c908模型编译, 这里拷贝c906并修改相关配置。

root@02297217e66d:~# cd /home/example/

root@02297217e66d:/home/example# cp -a c906 c908

root@02297217e66d:/home/example# cd c908/onnx_mobilenetv2/

run.sh相关修改

修改--board参数的值(c906改为c908)

添加校正集参数( -cd )

添加量化参数(--quantization-scheme)

最后修改后run.sh内容如下

#!/bin/bash -x

hhb -S --model-file mobilenetv2-12.onnx --data-scale 0.017 --data-mean "124 117 104" --board c908 --input-name "input" --output-name "output" --input-shape "1 3 224 224" --postprocess save_and_top5 --simulate-data persian_cat.jpg -cd persian_cat.jpg --quantization-scheme "int8_asym_w_sym" --fuse-conv-relu

注: 不同的模型, 编译参数有可能不同,会造成性能数据差异。用户需要基于自己的模型, 深入了解hhb各参数含义(hhb -h)或者咨询平头哥等。

执行run.sh开始编译

root@02297217e66d:/home/example/c908/onnx_mobilenetv2# ./run.sh

+ hhb -S --model-file mobilenetv2-12.onnx --data-scale 0.017 --data-mean '124 117 104' --board c908 --input-name input --output-name output --input-shape '1 3 224 224' --postprocess save_and_top5 --simulate-data persian_cat.jpg -cd persian_cat.jpg --quantization-scheme int8_asym_w_sym --fuse-conv-relu

[2023-06-21 09:02:53] (HHB LOG): Start import model.

[2023-06-21 09:02:55] (HHB LOG): Model import completed!

[2023-06-21 09:02:55] (HHB LOG): Start quantization.

[2023-06-21 09:02:55] (HHB LOG): get calibrate dataset from persian_cat.jpg

[2023-06-21 09:02:55] (HHB LOG): Start optimization.

[2023-06-21 09:02:55] (HHB LOG): Optimization completed!

Calibrating: 100%|###############################################################################################################################################################################################################################| 153/153 [00:14<00:00, 10.66it/s]

[2023-06-21 09:03:10] (HHB LOG): Start conversion to csinn.

[2023-06-21 09:03:10] (HHB LOG): Conversion completed!

[2023-06-21 09:03:10] (HHB LOG): Start operator fusion.

[2023-06-21 09:03:10] (HHB LOG): Operator fusion completed!

[2023-06-21 09:03:10] (HHB LOG): Start operator split.

[2023-06-21 09:03:10] (HHB LOG): Operator split completed!

[2023-06-21 09:03:10] (HHB LOG): Start layout convert.

[2023-06-21 09:03:10] (HHB LOG): Layout convert completed!

[2023-06-21 09:03:10] (HHB LOG): Quantization completed!

[2023-06-21 09:03:14] (HHB LOG): cd hhb_out; qemu-riscv64 -cpu c908v hhb_runtime ./hhb.bm persian_cat.jpg.0.bin

Run graph execution time: 1675.78113ms, FPS=0.60

=== tensor info ===

shape: 1 3 224 224

data pointer: 0x2e0b40

=== tensor info ===

shape: 1 1000

data pointer: 0x325530

The max_value of output: 16.053827

The min_value of output: -8.026914

The mean_value of output: 0.002078

The std_value of output: 11.213154

============ top5: ===========

283: 16.053827

281: 14.920615

282: 12.559759

285: 12.182022

287: 11.520982

最后生成hhb_out目录,如下

root@02297217e66d:/home/example/c908/onnx_mobilenetv2# ll hhb_out

total 17940

drwxr-xr-x 2 root root 4096 Jun 21 09:03 ./

drwxr-xr-x 5 root root 4096 Jun 21 09:02 ../

-rw-r--r-- 1 root root 3554304 Jun 21 09:03 hhb.bm

-rwxr-xr-x 1 root root 6140744 Jun 21 09:03 hhb_runtime*

-rw-r--r-- 1 root root 602112 Jun 21 09:03 input.0.bin

-rw-r--r-- 1 root root 2860548 Jun 21 09:03 input.0.tensor

-rw-r--r-- 1 root root 4946 Jun 21 09:03 io.c

-rw-r--r-- 1 root root 1539 Jun 21 09:03 io.h

-rw-r--r-- 1 root root 7410 Jun 21 09:03 main.c

-rw-r--r-- 1 root root 81352 Jun 21 09:03 main.o

-rw-r--r-- 1 root root 112618 Jun 21 09:03 model.c

-rw-r--r-- 1 root root 791576 Jun 21 09:03 model.o

-rw-r--r-- 1 root root 3546112 Jun 21 09:03 model.params

-rw-r--r-- 1 root root 602112 Jun 21 09:03 persian_cat.jpg.0.bin

-rw-r--r-- 1 root root 9534 Jun 21 09:03 persian_cat.jpg.0.bin_output0_1_1000.txt

-rw-r--r-- 1 root root 20086 Jun 21 09:03 process.c

-rw-r--r-- 1 root root 2040 Jun 21 09:03 process.h

将hhb_out目录拷贝到/mnt,导出到PC, 后续需要使用k230 rtt工具链重新交叉编译。

root@02297217e66d:/home/example/c908/onnx_mobilenetv2# cp -a hhb_out/ /mnt/

3. Demo

3.1 环境搭建

前置条件: 用户已按照 k230_sdk文档编译了docker image

启动k230 docker image

cd /path/to/k230_sdk

docker run -u root -it -v $(pwd):$(pwd) -v $(pwd)/toolchain:/opt/toolchain -w $(pwd) k230_docker /bin/bash

3.2 编译demo

我们在k230_sdk中提供了HHB的demo, 用户只需将HHB编译的c代码拷贝过来即可编译出上板运行的可执行程序。

相关目录说明

目录

备注

/path/to/k230_sdk/src/big/utils/examples/hhb

用户可修改CMakeLists.txt追加demo

/path/to/k230_sdk/src/big/utils/lib目录下的csi-nn2和hhb-prebuilt-decode

c代码依赖的预编译库(csi-nn2/jpeg/png/zlib等, 使用musl交叉编译工具链编译)

准备用例

mbv2_onnx_int8目录就是前面HHB生成的c代码, 用户修改了模型编译参数后, 需要同步更新过来.

用户也可以根据自己的模型,新增demo, 修改CMakeLists.txt即可。

开始编译

root@9d2a450436a7:/home/zhangyang/workspace/k230_sdk# cd src/big/utils/examples/hhb/

root@9d2a450436a7:/home/zhangyang/workspace/k230_sdk/src/big/utils/examples/hhb# ./build_app.sh

最后生成的可执行程序为out/bin/mbv2_onnx_int8.elf

root@9d2a450436a7:/home/zhangyang/workspace/k230_sdk/src/big/utils/examples/hhb# ll out/bin/mbv2_onnx_int8.elf

-rwxr-xr-x 1 root root 1172680 Jun 25 14:37 out/bin/mbv2_onnx_int8.elf*

将mbv2_onnx_int8运行的相关文件传送到小核linux的/sharefs目录

[root@canaan /sharefs/k230/mbv2_onnx_int8 ]#ls -l

total 5560

-rw-r--r-- 1 sshd sshd 3554304 Jun 25 2023 hhb.bm

-rwxr-xr-x 1 sshd sshd 1172680 Jun 25 2023 mbv2_onnx_int8.elf

-rw-r--r-- 1 sshd sshd 359355 Jun 25 2023 persian_cat.jpg

-rw-r--r-- 1 sshd sshd 602112 Jun 25 2023 persian_cat.jpg.0.bin

3.3 运行demo

启动k230, 在大核rtt串口下, 执行如下命令

msh />cd /sharefs/k230/mbv2_onnx_int8/

msh /sharefs/k230/mbv2_onnx_int8>./mbv2_onnx_int8.elf hhb.bm persian_cat.jpg.0.bin

Run graph execution time: 64.71648ms, FPS=15.45

=== tensor info ===

shape: 1 3 224 224

data pointer: 0x300170060

=== tensor info ===

shape: 1 1000

data pointer: 0x300194c80

The max_value of output: 15.581656

The min_value of output: -8.026914

The mean_value of output: 0.008405

The std_value of output: 11.703238

============ top5: ===========

283: 15.581656

281: 14.731747

282: 12.559759

285: 11.709850

287: 11.143245

msh /sharefs/k230/mbv2_onnx_int8>./mbv2_onnx_int8.elf hhb.bm persian_cat.jpg

Run graph execution time: 64.67589ms, FPS=15.46

=== tensor info ===

shape: 1 3 224 224

data pointer: 0x300170060

=== tensor info ===

shape: 1 1000

data pointer: 0x300194c80

The max_value of output: 16.053827

The min_value of output: -8.026914

The mean_value of output: 0.009821

The std_value of output: 12.815542

============ top5: ===========

283: 16.053827

281: 15.109484

282: 13.220798

287: 12.087587

285: 11.804284

跳转

举报

举报成功

我们将于2个工作日内通过站内信反馈结果给你!

请认真填写举报原因,尽可能描述详细。

举报类型

请选择举报类型

举报原因

取消

发送

误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消

提交

简介

Kendryte K230 SDK Docs

展开

收起

k230

暂无标签

其他

等 3 种语言

HTML

99.7%

CSS

0.2%

Python

0.1%

BSD-2-Clause

使用 BSD-2-Clause 开源许可协议

Code of conduct

保存更改

取消

发行版

(8)

全部

v1.4

贡献者

全部

近期动态

加载更多

不能加载更多了

编辑仓库简介

简介内容

Kendryte K230 SDK Docs

主页

取消

保存更改

其他

1

https://gitee.com/kendryte/k230_docs.git

git@gitee.com:kendryte/k230_docs.git

kendryte

k230_docs

k230_docs

main

深圳市奥思网络科技有限公司版权所有

Git 大全

Git 命令学习

CopyCat 代码克隆检测

APP与插件下载

Gitee Reward

Gitee 封面人物

GVP 项目

Gitee 博客

Gitee 公益计划

Gitee 持续集成

OpenAPI

帮助文档

在线自助服务

更新日志

关于我们

加入我们

使用条款

意见建议

合作伙伴

售前咨询客服

技术交流QQ群

微信服务号

client#oschina.cn

企业版在线使用:400-606-0201

专业版私有部署:

13670252304

13352947997

开放原子开源基金会

合作代码托管平台

违法和不良信息举报中心

粤ICP备12009483号

简 体

/

繁 體

/

English

点此查找更多帮助

搜索帮助

Git 命令在线学习

如何在 Gitee 导入 GitHub 仓库

Git 仓库基础操作

企业版和社区版功能对比

SSH 公钥设置

如何处理代码冲突

仓库体积过大,如何减小?

如何找回被删除的仓库数据

Gitee 产品配额说明

GitHub仓库快速导入Gitee及同步更新

什么是 Release(发行版)

将 PHP 项目自动发布到 packagist.org

仓库举报

回到顶部

登录提示

该操作需登录 Gitee 帐号,请先登录后再操作。

立即登录

没有帐号,去注册

yload":{"allShortcutsEnabled":false,"fileTree":{"zh/02_applications/tutorials":{"items":[{"name":"images","path":"zh/02_applications/tutorials/images","contentType":"directory"},{"name":"K230_AI实战_HHB神经网络模型部署工具.md","path":"zh/02_applications/tutorials/K230_AI实战_HHB神经网络模型部署工具.md","contentType":"file"},{"name":"K230_GPU应用实战.md","path":"zh/02_applications/tutorials/K230_GPU应用实战.md","contentType":"file"},{"name":"K230_GUI实战_LVGL移植教程.md","path":"zh/02_applications/tutorials/K230_GUI实战_LVGL移植教程.md","contentType":"file"},{"name":"K230_RVV优化性能说明.md","path":"zh/02_applications/tutorials/K230_RVV优化性能说明.md","contentType":"file"},{"name":"K230_RVV实战.md","path":"zh/02_applications/tutorials/K230_RVV实战.md","contentType":"file"},{"name":"K230_USB应用实战_UVC传输YUV及编码码流.md","path":"zh/02_applications/tutorials/K230_USB应用实战_UVC传输YUV及编码码流.md","contentType":"file"},{"name":"K230_内存优化指南.md","path":"zh/02_applications/tutorials/K230_内存优化指南.md","contentType":"file"},{"name":"K230_内存占用分析指南.md","path":"zh/02_applications/tutorials/K230_内存占用分析指南.md","contentType":"file"},{"name":"K230_启动优化指南.md","path":"zh/02_applications/tutorials/K230_启动优化指南.md","contentType":"file"},{"name":"K230_图像实战_开机视频和开机logo.md","path":"zh/02_applications/tutorials/K230_图像实战_开机视频和开机logo.md","contentType":"file"},{"name":"K230_图像采集实战_如何支持一款新sensor.md","path":"zh/02_applications/tutorials/K230_图像采集实战_如何支持一款新sensor.md","contentType":"file"},{"name":"K230_大小核通讯_sharefs用法介绍.md","path":"zh/02_applications/tutorials/K230_大小核通讯_sharefs用法介绍.md","contentType":"file"},{"name":"K230_实战基础篇_hello_world.md","path":"zh/02_applications/tutorials/K230_实战基础篇_hello_world.md","contentType":"file"},{"name":"K230_编码实战_rtsp_server搭建和推流.md","path":"zh/02_applications/tutorials/K230_编码实战_rtsp_server搭建和推流.md","contentType":"file"},{"name":"K230_音频实战_音频采集_播放和编解码.md","path":"zh/02_applications/tutorials/K230_音频实战_音频采集_播放和编解码.md","contentType":"file"}],"totalCount":16},"zh/02_applications":{"items":[{"name":"ai_demos","path":"zh/02_applications/ai_demos","contentType":"directory"},{"name":"business_poc","path":"zh/02_applications/business_poc","contentType":"directory"},{"name":"fancy_poc","path":"zh/02_applications/fancy_poc","contentType":"directory"},{"name":"tutorials","path":"zh/02_applications/tutorials","contentType":"directory"},{"name":"index.rst","path":"zh/02_applications/index.rst","contentType":"file"}],"totalCount":5},"zh":{"items":[{"name":"00_hardware","path":"zh/00_hardware","contentType":"directory"},{"name":"01_software","path":"zh/01_software","contentType":"directory"},{"name":"02_applications","path":"zh/02_applications","contentType":"directory"},{"name":"03_other","path":"zh/03_other","contentType":"directory"},{"name":"images","path":"zh/images","contentType":"directory"},{"name":"template","path":"zh/template","contentType":"directory"},{"name":"CanMV-K230快速入门指南.md","path":"zh/CanMV-K230快速入门指南.md","contentType":"file"},{"name":"CanMV_K230_教程.md","path":"zh/CanMV_K230_教程.md","contentType":"file"},{"name":"index.rst","path":"zh/index.rst","contentType":"file"}],"totalCount":9},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":".gitlab","path":".gitlab","contentType":"directory"},{"name":"_static","path":"_static","contentType":"directory"},{"name":"_templates","path":"_templates","contentType":"directory"},{"name":"en","path":"en","contentType":"directory"},{"name":"exts","path":"exts","contentType":"directory"},{"name":"zh","path":"zh","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".gitlab-ci.yml","path":".gitlab-ci.yml","contentType":"file"},{"name":".markdownlint.json","path":".markdownlint.json","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"README_en.md","path":"README_en.md","contentType":"file"},{"name":"conf.py","path":"conf.py","contentType":"file"},{"name":"index.rst","path":"index.rst","contentType":"file"},{"name":"index_api.rst","path":"index_api.rst","contentType":"file"},{"name":"index_dev_guide.rst","path":"index_dev_guide.rst","contentType":"file"},{"name":"index_faq.rst","path":"index_faq.rst","contentType":"file"},{"name":"index_normal_tutorial.rst","path":"index_normal_tutorial.rst","contentType":"file"},{"name":"preprocess.py","path":"preprocess.py","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"}],"totalCount":22}},"fileTreeProcessingTime":6.6717640000000005,"foldersToFetch":[],"repo":{"id":663411081,"defaultBranch":"main","name":"k230_docs","ownerLogin":"kendryte","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-07-07T08:24:19.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/42801353?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"main","listCacheKey":"v0:1707126603.0","canEdit":false,"refType":"branch","currentOid":"e70cb948803cc47577aaeedc085b5a3511b054b4"},"path":"zh/02_applications/tutorials/K230_AI实战_HHB神经网络模型部署工具.md","currentUser":null,"blob":{"rawLines":null,"stylingDirectives":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/kendryte/k230_docs/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"K230_AI实战_HHB神经网络模型部署工具.md","displayUrl":"https://github.com/kendryte/k230_docs/blob/main/zh/02_applications/tutorials/K230_AI%E5%AE%9E%E6%88%98_HHB%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B%E9%83%A8%E7%BD%B2%E5%B7%A5%E5%85%B7.md?raw=true","headerInfo":{"blobSize":"12.2 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"c4754e9","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fkendryte%2Fk230_docs%2Fblob%2Fmain%2Fzh%2F02_applications%2Ftutorials%2FK230_AI%25E5%25AE%259E%25E6%2588%2598_HHB%25E7%25A5%259E%25E7%25BB%258F%25E7%25BD%2591%25E7%25BB%259C%25E6%25A8%25A1%25E5%259E%258B%25E9%2583%25A8%25E7%25BD%25B2%25E5%25B7%25A5%25E5%2585%25B7.md","isCSV":false,"isRichtext":true,"toc":[{"level":1,"text":"K230 AI实战 - HHB神经网络模型部署工具","anchor":"k230-ai实战---hhb神经网络模型部署工具","htmlText":"K230 AI实战 - HHB神经网络模型部署工具"},{"level":2,"text":"免责声明","anchor":"免责声明","htmlText":"免责声明"},{"level":2,"text":"商标声明","anchor":"商标声明","htmlText":"商标声明"},{"level":2,"text":"目录","anchor":"目录","htmlText":"目录"},{"level":2,"text":"前言","anchor":"前言","htmlText":"前言"},{"level":3,"text":"简述","anchor":"简述","htmlText":"简述"},{"level":3,"text":"读者对象","anchor":"读者对象","htmlText":"读者对象"},{"level":3,"text":"缩略词定义","anchor":"缩略词定义","htmlText":"缩略词定义"},{"level":3,"text":"修订记录","anchor":"修订记录","htmlText":"修订记录"},{"level":2,"text":"1. 概述","anchor":"1-概述","htmlText":"1. 概述"},{"level":3,"text":"1.1 HHB","anchor":"11-hhb","htmlText":"1.1 HHB"},{"level":3,"text":"1.2 SHL","anchor":"12-shl","htmlText":"1.2 SHL"},{"level":2,"text":"2. HHB编译模型","anchor":"2-hhb编译模型","htmlText":"2. HHB编译模型"},{"level":3,"text":"2.1 环境搭建","anchor":"21-环境搭建","htmlText":"2.1 环境搭建"},{"level":3,"text":"2.2 编译模型","anchor":"22-编译模型","htmlText":"2.2 编译模型"},{"level":2,"text":"3. Demo","anchor":"3-demo","htmlText":"3. Demo"},{"level":3,"text":"3.1 环境搭建","anchor":"31-环境搭建","htmlText":"3.1 环境搭建"},{"level":3,"text":"3.2 编译demo","anchor":"32-编译demo","htmlText":"3.2 编译demo"},{"level":3,"text":"3.3 运行demo","anchor":"33-运行demo","htmlText":"3.3 运行demo"}],"lineInfo":{"truncatedLoc":"322","truncatedSloc":"233"},"mode":"executable file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Markdown","languageID":222,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/kendryte/k230_docs/blob/main/zh/02_applications/tutorials/K230_AI%E5%AE%9E%E6%88%98_HHB%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B%E9%83%A8%E7%BD%B2%E5%B7%A5%E5%85%B7.md","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/kendryte/k230_docs/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/kendryte/k230_docs/raw/main/zh/02_applications/tutorials/K230_AI%E5%AE%9E%E6%88%98_HHB%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B%E9%83%A8%E7%BD%B2%E5%B7%A5%E5%85%B7.md","renderImageOrRaw":false,"richText":"K230 AI实战 - HHB神经网络模型部署工具\n\n版权所有©2023北京嘉楠捷思信息技术有限公司\n\n免责声明\n您购买的产品、服务或特性等应受北京嘉楠捷思信息技术有限公司(“本公司”,下同)及其关联公司的商业合同和条款的约束,本文档中描述的全部或部分产品、服务或特性可能不在您的购买或使用范围之内。除非合同另有约定,本公司不对本文档的任何陈述、信息、内容的正确性、可靠性、完整性、适销性、符合特定目的和不侵权提供任何明示或默示的声明或保证。除非另有约定,本文档仅作为使用指导参考。\n由于产品版本升级或其他原因,本文档内容将可能在未经任何通知的情况下,不定期进行更新或修改。\n商标声明\n、“嘉楠”和其他嘉楠商标均为北京嘉楠捷思信息技术有限公司及其关联公司的商标。本文档可能提及的其他所有商标或注册商标,由各自的所有人拥有。\n版权所有 © 2023北京嘉楠捷思信息技术有限公司。保留一切权利。\n非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。\n\n目录\n[TOC]\n前言\n简述\n本文档为平头哥的HHB在k230硬件平台的使用说明文档,指导用户如何在HHB上编译模型生成c代码, 如何使用k230交叉编译工具链编译程序和上板运行等.\n读者对象\n本文档(本指南)主要适用于以下人员:\n\n软件开发工程师\n\n缩略词定义\n\n\n\n简称\n说明\n\n\n\n\nHHB\nHeterogeneous Honey Badger\n\n\nSHL\nStructure of Heterogeneous Library\n\n\n\n修订记录\n\n\n\n文档版本号\n修改说明\n修改者\n日期\n\n\n\n\nV1.0\n文档初版\n张扬\n2023/6/25\n\n\n\n1. 概述\nHHB程序在k230 rtt上部署运行, 需要如下步骤\n\n基于HHB开发环境, 编译模型生成c代码\n使用k230 rtt交叉编译工具链编译c代码\n上板运行可执行程序\n\n1.1 HHB\nHHB (Heterogeneous Honey Badger) 是 T-Head 提供的一套针对玄铁芯片平台的神经网络模型部署工具集。包括了编译优化,性能分析,过程调试,结果模拟等一系列部署时所需的工具。\nHHB 的功能与特性:\n\n支持 caffe,tensorflow,onnx 和 tflite 对应格式的模型\n支持 8/16 位定点和 16/32 位浮点等数据类型\n支持对称和非对称定点量化,支持通道量化\n可在部署前优化模型的网络结构\n编译生成可在无剑 SoC 平台上执行的二进制\n支持在主机上做行为模拟\n多组件形式的工具集方便二次开发\n同时提供传统习惯的 Unix 命令行和 Python 接口\n\nHHB 已支持语音和视觉的多种不同业务算法,可导入 PyTorch 和 TensorFlow 等不同训练框架的模型。\nHHB 以开源项目 TVM 为基础架构,添加了丰富的命令行选项提供命令模式;预置了多类量化算法适配不同平台可支持的数据类型;根据不同平台特点,输出调用 SHL 的 C 代码,或者直接输出可执行的二进制。\n\n详细使用方法可参考HHB用户手册\n1.2 SHL\nSHL 是 T-HEAD 提供的一组针对玄铁 CPU 平台的神经网络库 API。抽象了各种常用的网络层的接口,并且提供一系列已优化的二进制库。\nSHL 的特性:\n\nC 代码版本的参考实现。\n提供玄铁系列 CPU 的汇编优化实现。\n支持对称量化和非对称量化。\n支持8位定点,16位定点和16位浮点等数据类型。\n兼容 NCHW 和 NHWC 格式。\n搭配 HHB 实现代码自动调用。\n覆盖 CPU,NPU 等不同体系结构。\n附加异构参考实现。\n\nSHL 提供了完成的接口声明和接口的参考实现,各个设备提供商可以依此针对性的完成各个接口的优化工作。\n详细使用方法可参考SHL用户手册\n2. HHB编译模型\n2.1 环境搭建\n\n前置条件: 本地PC已安装docker\n\n\n\n去HHB下载hhb-2.2.35 docker image\n\n\n解压/加载/启动docker image\ntar xzf hhb-2.2.35.docker.tar.gz\ncd hhb-2.2.35.docker/\ndocker load < hhb.2.2.35.img.tar\n./start_hhb.sh\n\n\n2.2 编译模型\n目前这个版本docker image没有集成c908模型编译, 这里拷贝c906并修改相关配置。\nroot@02297217e66d:~# cd /home/example/\nroot@02297217e66d:/home/example# cp -a c906 c908\nroot@02297217e66d:/home/example# cd c908/onnx_mobilenetv2/\nrun.sh相关修改\n\n修改--board参数的值(c906改为c908)\n添加校正集参数( -cd )\n添加量化参数(--quantization-scheme)\n\n最后修改后run.sh内容如下\n#!/bin/bash -x\n\nhhb -S --model-file mobilenetv2-12.onnx --data-scale 0.017 --data-mean \"124 117 104\" --board c908 --input-name \"input\" --output-name \"output\" --input-shape \"1 3 224 224\" --postprocess save_and_top5 --simulate-data persian_cat.jpg -cd persian_cat.jpg --quantization-scheme \"int8_asym_w_sym\" --fuse-conv-relu\n\n注: 不同的模型, 编译参数有可能不同,会造成性能数据差异。用户需要基于自己的模型, 深入了解hhb各参数含义(hhb -h)或者咨询平头哥等。\n\n执行run.sh开始编译\nroot@02297217e66d:/home/example/c908/onnx_mobilenetv2# ./run.sh\n+ hhb -S --model-file mobilenetv2-12.onnx --data-scale 0.017 --data-mean '124 117 104' --board c908 --input-name input --output-name output --input-shape '1 3 224 224' --postprocess save_and_top5 --simulate-data persian_cat.jpg -cd persian_cat.jpg --quantization-scheme int8_asym_w_sym --fuse-conv-relu\n[2023-06-21 09:02:53] (HHB LOG): Start import model.\n[2023-06-21 09:02:55] (HHB LOG): Model import completed!\n[2023-06-21 09:02:55] (HHB LOG): Start quantization.\n[2023-06-21 09:02:55] (HHB LOG): get calibrate dataset from persian_cat.jpg\n[2023-06-21 09:02:55] (HHB LOG): Start optimization.\n[2023-06-21 09:02:55] (HHB LOG): Optimization completed!\nCalibrating: 100%|###############################################################################################################################################################################################################################| 153/153 [00:14<00:00, 10.66it/s]\n[2023-06-21 09:03:10] (HHB LOG): Start conversion to csinn.\n[2023-06-21 09:03:10] (HHB LOG): Conversion completed!\n[2023-06-21 09:03:10] (HHB LOG): Start operator fusion.\n[2023-06-21 09:03:10] (HHB LOG): Operator fusion completed!\n[2023-06-21 09:03:10] (HHB LOG): Start operator split.\n[2023-06-21 09:03:10] (HHB LOG): Operator split completed!\n[2023-06-21 09:03:10] (HHB LOG): Start layout convert.\n[2023-06-21 09:03:10] (HHB LOG): Layout convert completed!\n[2023-06-21 09:03:10] (HHB LOG): Quantization completed!\n[2023-06-21 09:03:14] (HHB LOG): cd hhb_out; qemu-riscv64 -cpu c908v hhb_runtime ./hhb.bm persian_cat.jpg.0.bin\nRun graph execution time: 1675.78113ms, FPS=0.60\n\n=== tensor info ===\nshape: 1 3 224 224\ndata pointer: 0x2e0b40\n\n=== tensor info ===\nshape: 1 1000\ndata pointer: 0x325530\nThe max_value of output: 16.053827\nThe min_value of output: -8.026914\nThe mean_value of output: 0.002078\nThe std_value of output: 11.213154\n ============ top5: ===========\n283: 16.053827\n281: 14.920615\n282: 12.559759\n285: 12.182022\n287: 11.520982\n最后生成hhb_out目录,如下\nroot@02297217e66d:/home/example/c908/onnx_mobilenetv2# ll hhb_out\ntotal 17940\ndrwxr-xr-x 2 root root 4096 Jun 21 09:03 ./\ndrwxr-xr-x 5 root root 4096 Jun 21 09:02 ../\n-rw-r--r-- 1 root root 3554304 Jun 21 09:03 hhb.bm\n-rwxr-xr-x 1 root root 6140744 Jun 21 09:03 hhb_runtime*\n-rw-r--r-- 1 root root 602112 Jun 21 09:03 input.0.bin\n-rw-r--r-- 1 root root 2860548 Jun 21 09:03 input.0.tensor\n-rw-r--r-- 1 root root 4946 Jun 21 09:03 io.c\n-rw-r--r-- 1 root root 1539 Jun 21 09:03 io.h\n-rw-r--r-- 1 root root 7410 Jun 21 09:03 main.c\n-rw-r--r-- 1 root root 81352 Jun 21 09:03 main.o\n-rw-r--r-- 1 root root 112618 Jun 21 09:03 model.c\n-rw-r--r-- 1 root root 791576 Jun 21 09:03 model.o\n-rw-r--r-- 1 root root 3546112 Jun 21 09:03 model.params\n-rw-r--r-- 1 root root 602112 Jun 21 09:03 persian_cat.jpg.0.bin\n-rw-r--r-- 1 root root 9534 Jun 21 09:03 persian_cat.jpg.0.bin_output0_1_1000.txt\n-rw-r--r-- 1 root root 20086 Jun 21 09:03 process.c\n-rw-r--r-- 1 root root 2040 Jun 21 09:03 process.h\n将hhb_out目录拷贝到/mnt,导出到PC, 后续需要使用k230 rtt工具链重新交叉编译。\nroot@02297217e66d:/home/example/c908/onnx_mobilenetv2# cp -a hhb_out/ /mnt/\n3. Demo\n3.1 环境搭建\n\n前置条件: 用户已按照 k230_sdk文档编译了docker image\n\n启动k230 docker image\ncd /path/to/k230_sdk\ndocker run -u root -it -v $(pwd):$(pwd) -v $(pwd)/toolchain:/opt/toolchain -w $(pwd) k230_docker /bin/bash\n3.2 编译demo\n我们在k230_sdk中提供了HHB的demo, 用户只需将HHB编译的c代码拷贝过来即可编译出上板运行的可执行程序。\n相关目录说明\n\n\n\n目录\n备注\n\n\n\n\n/path/to/k230_sdk/src/big/utils/examples/hhb\n用户可修改CMakeLists.txt追加demo\n\n\n/path/to/k230_sdk/src/big/utils/lib目录下的csi-nn2和hhb-prebuilt-decode\nc代码依赖的预编译库(csi-nn2/jpeg/png/zlib等, 使用musl交叉编译工具链编译)\n\n\n\n准备用例\nmbv2_onnx_int8目录就是前面HHB生成的c代码, 用户修改了模型编译参数后, 需要同步更新过来.\n用户也可以根据自己的模型,新增demo, 修改CMakeLists.txt即可。\n开始编译\nroot@9d2a450436a7:/home/zhangyang/workspace/k230_sdk# cd src/big/utils/examples/hhb/\nroot@9d2a450436a7:/home/zhangyang/workspace/k230_sdk/src/big/utils/examples/hhb# ./build_app.sh\n最后生成的可执行程序为out/bin/mbv2_onnx_int8.elf\nroot@9d2a450436a7:/home/zhangyang/workspace/k230_sdk/src/big/utils/examples/hhb# ll out/bin/mbv2_onnx_int8.elf \n-rwxr-xr-x 1 root root 1172680 Jun 25 14:37 out/bin/mbv2_onnx_int8.elf*\n将mbv2_onnx_int8运行的相关文件传送到小核linux的/sharefs目录\n[root@canaan /sharefs/k230/mbv2_onnx_int8 ]#ls -l\ntotal 5560\n-rw-r--r-- 1 sshd sshd 3554304 Jun 25 2023 hhb.bm\n-rwxr-xr-x 1 sshd sshd 1172680 Jun 25 2023 mbv2_onnx_int8.elf\n-rw-r--r-- 1 sshd sshd 359355 Jun 25 2023 persian_cat.jpg\n-rw-r--r-- 1 sshd sshd 602112 Jun 25 2023 persian_cat.jpg.0.bin\n3.3 运行demo\n\n启动k230, 在大核rtt串口下, 执行如下命令\n\nmsh />cd /sharefs/k230/mbv2_onnx_int8/\n\nmsh /sharefs/k230/mbv2_onnx_int8>./mbv2_onnx_int8.elf hhb.bm persian_cat.jpg.0.bin\nRun graph execution time: 64.71648ms, FPS=15.45\n\n=== tensor info ===\nshape: 1 3 224 224 \ndata pointer: 0x300170060\n\n=== tensor info ===\nshape: 1 1000 \ndata pointer: 0x300194c80\nThe max_value of output: 15.581656\nThe min_value of output: -8.026914\nThe mean_value of output: 0.008405\nThe std_value of output: 11.703238\n ============ top5: ===========\n283: 15.581656\n281: 14.731747\n282: 12.559759\n285: 11.709850\n287: 11.143245\n\nmsh /sharefs/k230/mbv2_onnx_int8>./mbv2_onnx_int8.elf hhb.bm persian_cat.jpg \nRun graph execution time: 64.67589ms, FPS=15.46\n\n=== tensor info ===\nshape: 1 3 224 224 \ndata pointer: 0x300170060\n\n=== tensor info ===\nshape: 1 1000 \ndata pointer: 0x300194c80\nThe max_value of output: 16.053827\nThe min_value of output: -8.026914\nThe mean_value of output: 0.009821\nThe std_value of output: 12.815542\n ============ top5: ===========\n283: 16.053827\n281: 15.109484\n282: 13.220798\n287: 12.087587\n285: 11.804284\n","renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"K230 AI实战 - HHB神经网络模型部署工具","kind":"section_1","ident_start":2,"ident_end":51,"extent_start":0,"extent_end":12509,"fully_qualified_name":"K230 AI实战 - HHB神经网络模型部署工具","ident_utf16":{"start":{"line_number":0,"utf16_col":2},"end":{"line_number":0,"utf16_col":27}},"extent_utf16":{"start":{"line_number":0,"utf16_col":0},"end":{"line_number":322,"utf16_col":0}}},{"name":"免责声明","kind":"section_2","ident_start":198,"ident_end":210,"extent_start":195,"extent_end":903,"fully_qualified_name":"免责声明","ident_utf16":{"start":{"line_number":8,"utf16_col":3},"end":{"line_number":8,"utf16_col":7}},"extent_utf16":{"start":{"line_number":8,"utf16_col":0},"end":{"line_number":14,"utf16_col":0}}},{"name":"商标声明","kind":"section_2","ident_start":906,"ident_end":918,"extent_start":903,"extent_end":1435,"fully_qualified_name":"商标声明","ident_utf16":{"start":{"line_number":14,"utf16_col":3},"end":{"line_number":14,"utf16_col":7}},"extent_utf16":{"start":{"line_number":14,"utf16_col":0},"end":{"line_number":23,"utf16_col":0}}},{"name":"目录","kind":"section_2","ident_start":1438,"ident_end":1444,"extent_start":1435,"extent_end":1453,"fully_qualified_name":"目录","ident_utf16":{"start":{"line_number":23,"utf16_col":3},"end":{"line_number":23,"utf16_col":5}},"extent_utf16":{"start":{"line_number":23,"utf16_col":0},"end":{"line_number":27,"utf16_col":0}}},{"name":"前言","kind":"section_2","ident_start":1456,"ident_end":1462,"extent_start":1453,"extent_end":2159,"fully_qualified_name":"前言","ident_utf16":{"start":{"line_number":27,"utf16_col":3},"end":{"line_number":27,"utf16_col":5}},"extent_utf16":{"start":{"line_number":27,"utf16_col":0},"end":{"line_number":52,"utf16_col":0}}},{"name":"简述","kind":"section_3","ident_start":1468,"ident_end":1474,"extent_start":1464,"extent_end":1670,"fully_qualified_name":"简述","ident_utf16":{"start":{"line_number":29,"utf16_col":4},"end":{"line_number":29,"utf16_col":6}},"extent_utf16":{"start":{"line_number":29,"utf16_col":0},"end":{"line_number":33,"utf16_col":0}}},{"name":"读者对象","kind":"section_3","ident_start":1674,"ident_end":1686,"extent_start":1670,"extent_end":1769,"fully_qualified_name":"读者对象","ident_utf16":{"start":{"line_number":33,"utf16_col":4},"end":{"line_number":33,"utf16_col":8}},"extent_utf16":{"start":{"line_number":33,"utf16_col":0},"end":{"line_number":39,"utf16_col":0}}},{"name":"缩略词定义","kind":"section_3","ident_start":1773,"ident_end":1788,"extent_start":1769,"extent_end":1979,"fully_qualified_name":"缩略词定义","ident_utf16":{"start":{"line_number":39,"utf16_col":4},"end":{"line_number":39,"utf16_col":9}},"extent_utf16":{"start":{"line_number":39,"utf16_col":0},"end":{"line_number":46,"utf16_col":0}}},{"name":"修订记录","kind":"section_3","ident_start":1983,"ident_end":1995,"extent_start":1979,"extent_end":2159,"fully_qualified_name":"修订记录","ident_utf16":{"start":{"line_number":46,"utf16_col":4},"end":{"line_number":46,"utf16_col":8}},"extent_utf16":{"start":{"line_number":46,"utf16_col":0},"end":{"line_number":52,"utf16_col":0}}},{"name":"1. 概述","kind":"section_2","ident_start":2162,"ident_end":2171,"extent_start":2159,"extent_end":4514,"fully_qualified_name":"1. 概述","ident_utf16":{"start":{"line_number":52,"utf16_col":3},"end":{"line_number":52,"utf16_col":8}},"extent_utf16":{"start":{"line_number":52,"utf16_col":0},"end":{"line_number":102,"utf16_col":0}}},{"name":"1.1 HHB","kind":"section_3","ident_start":2371,"ident_end":2378,"extent_start":2367,"extent_end":3696,"fully_qualified_name":"1.1 HHB","ident_utf16":{"start":{"line_number":60,"utf16_col":4},"end":{"line_number":60,"utf16_col":11}},"extent_utf16":{"start":{"line_number":60,"utf16_col":0},"end":{"line_number":83,"utf16_col":0}}},{"name":"1.2 SHL","kind":"section_3","ident_start":3700,"ident_end":3707,"extent_start":3696,"extent_end":4514,"fully_qualified_name":"1.2 SHL","ident_utf16":{"start":{"line_number":83,"utf16_col":4},"end":{"line_number":83,"utf16_col":11}},"extent_utf16":{"start":{"line_number":83,"utf16_col":0},"end":{"line_number":102,"utf16_col":0}}},{"name":"2. HHB编译模型","kind":"section_2","ident_start":4517,"ident_end":4535,"extent_start":4514,"extent_end":9209,"fully_qualified_name":"2. HHB编译模型","ident_utf16":{"start":{"line_number":102,"utf16_col":3},"end":{"line_number":102,"utf16_col":13}},"extent_utf16":{"start":{"line_number":102,"utf16_col":0},"end":{"line_number":218,"utf16_col":0}}},{"name":"2.1 环境搭建","kind":"section_3","ident_start":4541,"ident_end":4557,"extent_start":4537,"extent_end":4875,"fully_qualified_name":"2.1 环境搭建","ident_utf16":{"start":{"line_number":104,"utf16_col":4},"end":{"line_number":104,"utf16_col":12}},"extent_utf16":{"start":{"line_number":104,"utf16_col":0},"end":{"line_number":119,"utf16_col":0}}},{"name":"2.2 编译模型","kind":"section_3","ident_start":4879,"ident_end":4895,"extent_start":4875,"extent_end":9209,"fully_qualified_name":"2.2 编译模型","ident_utf16":{"start":{"line_number":119,"utf16_col":4},"end":{"line_number":119,"utf16_col":12}},"extent_utf16":{"start":{"line_number":119,"utf16_col":0},"end":{"line_number":218,"utf16_col":0}}},{"name":"3. Demo","kind":"section_2","ident_start":9212,"ident_end":9219,"extent_start":9209,"extent_end":12509,"fully_qualified_name":"3. Demo","ident_utf16":{"start":{"line_number":218,"utf16_col":3},"end":{"line_number":218,"utf16_col":10}},"extent_utf16":{"start":{"line_number":218,"utf16_col":0},"end":{"line_number":322,"utf16_col":0}}},{"name":"3.1 环境搭建","kind":"section_3","ident_start":9225,"ident_end":9241,"extent_start":9221,"extent_end":9479,"fully_qualified_name":"3.1 环境搭建","ident_utf16":{"start":{"line_number":220,"utf16_col":4},"end":{"line_number":220,"utf16_col":12}},"extent_utf16":{"start":{"line_number":220,"utf16_col":0},"end":{"line_number":231,"utf16_col":0}}},{"name":"3.2 编译demo","kind":"section_3","ident_start":9483,"ident_end":9497,"extent_start":9479,"extent_end":11361,"fully_qualified_name":"3.2 编译demo","ident_utf16":{"start":{"line_number":231,"utf16_col":4},"end":{"line_number":231,"utf16_col":14}},"extent_utf16":{"start":{"line_number":231,"utf16_col":0},"end":{"line_number":273,"utf16_col":0}}},{"name":"3.3 运行demo","kind":"section_3","ident_start":11365,"ident_end":11379,"extent_start":11361,"extent_end":12509,"fully_qualified_name":"3.3 运行demo","ident_utf16":{"start":{"line_number":273,"utf16_col":4},"end":{"line_number":273,"utf16_col":14}},"extent_utf16":{"start":{"line_number":273,"utf16_col":0},"end":{"line_number":322,"utf16_col":0}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/kendryte/k230_docs/branches":{"post":"2LmN-Fl54PBiYzjKLOXBz_IU64NkLJC39wOOfAbcJEJK3wJhNaQxXIAwwZ2jmb0VQu18oUwlcrYOPrJ2CPWdIQ"},"/repos/preferences":{"post":"YgF6c1xx-UKx0rwMZk1CWhYPI_nQ3NUWOVvE_73g17snZ7GmN5nqR6rSx3SxW7O-2DwtXDqIDcZFjIBNdrgHUg"}}},"title":"k230_docs/zh/02_applications/tutorials/K230_AI实战_HHB神经网络模型部署工具.md at main · kendryte/k230_doc

HHB音乐酒吧 - 搜狗百科

乐酒吧 - 搜狗百科HHB音乐酒吧(HHB Music House),网友趣称“还花呗”。于2019年1月7日开业,为马云与朋友创办的,该酒吧系杭州玛氏娱乐管理有限公司运营。[1][2] 该酒吧开业仪式有汪涵、大S等众多明星艺人出席。[1]网页微信知乎图片视频医疗汉语问问百科更多»登录帮助首页任务任务中心公益百科积分商城个人中心HHB音乐酒吧编辑词条添加义项同义词收藏分享分享到QQ空间新浪微博HHB音乐酒吧(HHB Music House),网友趣称“还花呗”。于2019年1月7日开业,为马云与朋友创办的,该酒吧系杭州玛氏娱乐管理有限公司运营。[1][2]该酒吧开业仪式有汪涵、大S等众多明星艺人出席。[1]参考资料:1. 马云开酒吧取名“HHB平头哥”:不以赚钱为目的新浪[引用日期2019-01-08]2. HHB音乐酒吧天眼查[引用日期2023-04-14]3. 马云"HHB平头哥"酒吧开业:"给被埋没的音乐人机会"网易[引用日期2019-01-08]免责声明搜狗百科词条内容由用户共同创建和维护,不代表搜狗百科立场。如果您需要医学、法律、投资理财等专业领域的建议,我们强烈建议您独自对内容的可信性进行评估,并咨询相关专业人士。词条信息词条浏览:21310次最近更新:23.04.14编辑次数:3次创建者:不高兴.突出贡献者:新手指引了解百科编辑规范用户体系商城兑换问题解答关于审核关于编辑关于创建常见问题意见反馈及投诉举报与质疑举报非法用户未通过申诉反馈侵权信息对外合作邮件合作任务领取官方微博微信公众号搜索词条编辑词条 收藏 查看我的收藏分享分享到QQ空间新浪微博投诉登录企业推广免责声明用户协议隐私政策编辑帮助意见反馈及投诉© SOGOU.COM 京ICP备11001839号-1 京公网安备110000020000

中国电信股份有限公司

中国电信股份有限公司

EN

EN

公司

概览

董事长报告书

控股结构

组织架构

董事及高层管理人员

主要发展战略

企业文化

嘉许及奖项

业务

业务概览

客户服务

企业责任

创新

环境

社会

管治

董事会及董事委员会成员

监事会

企业社会责任报告

公司ESG简介

规章制度

公告

港交所公告

港交所股东通函

上交所公告

美国证交会存档

投资者

财务重点

主要运营数据

财务报告

推介材料

网上视频及录音播放

股息资料

贷款资料

分析师资料概览

股份资料

股票价格

投资者活动年历

常见问题

公司简介

投资者保护宣传

传媒

公司信息

图片集

视频集

联系资料

联系我们

版权和免责声明

私隐政策

Twitter

Facebook

Weibo

QQ

Linkedin

Yahoo! Mail

分享

RSS

© 2024 中国电信股份有限公司。 本公司保留一切版权。

数字经济蓬勃发展,市场机遇空前广阔

中国电信以高质量发展为主题

以数字化转型为主线

以改革开放创新为动力

全面深入实施云改数转战略

切实提升企业核心竞争力

加快建设世界一流企业

股票价格

最新信息

公告

3月

04

2023年度业绩快报

更多

公告

2月

20

2024年1月运营数据

更多

新闻稿

1月

19

中国电信年报共荣获20项白金及金奖殊荣 同时荣获至尊大奖

更多

公告

1月

19

董事辞任及重要行政管理职位变更

更多

主要运营数据 ( 2024年1月 )

移动用户数

409.05

百万户

5G套餐用户数

321.74

百万户

有线宽带用户数

191.44

百万户

固定电话用户数

100.89

百万户

更多

2023 公司荣誉

最受尊崇企业・环境、社会及管治・投资者关系・亚洲最佳

2023中报

中期业绩 2023

推介材料

A股公告

H股公告

新闻稿

A股中报

H股中报

主要财务及运营数据

2023年首三季度

公告(A股 | H股)

季度主要财务数据(IFRS | CAS)

季度主要运营数据

投资者联络资料

黎嘉颕女士 / 冯昱翰先生

ir@chinatelecom-h.com

(852) 2582-0388

香港湾仔告士打道108号光大中心28楼

© 2024 中国电信股份有限公司。 本公司保留一切版权。

回到页首

Cookies和私隐声明

我们使用cookies来提升您在我们网站上的体验。继续使用本网站即表示您同意使用这些cookies。有关我们如何使用cookies以及了解如何更改Cookie设置的更多资料,请仔细阅读我们的私隐政策。

接受并关闭

玄铁RISC-V处理器入门与实战-平头哥RISC-V 工具链-HHB神经网络模型部署工具-阿里云开发者社区

玄铁RISC-V处理器入门与实战-平头哥RISC-V 工具链-HHB神经网络模型部署工具-阿里云开发者社区

产品解决方案文档与社区权益中心定价云市场合作伙伴支持与服务了解阿里云

售前咨询

95187-1

在线服务

售后咨询

4008013260

在线服务

其他服务

我要建议我要投诉更多联系方式备案控制台开发者社区首页计算机视觉自然语言处理语音多模态科学计算魔搭社区官网

探索云世界

新手上云云上应用构建云上数据管理云上探索人工智能云计算弹性计算无影存储网络倚天云原生容器serverless中间件微服务可观测消息队列数据库关系型数据库NoSQL数据库数据仓库数据管理工具PolarDB开源向量数据库热门Modelscope模型即服务弹性计算云原生数据库物联网云效DevOps龙蜥操作系统平头哥钉钉开放平台大数据大数据计算实时数仓Hologres实时计算FlinkE-MapReduceDataWorksElasticsearch机器学习平台PAI智能搜索推荐人工智能机器学习平台PAI视觉智能开放平台智能语音交互自然语言处理多模态模型pythonsdk通用模型开发与运维云效DevOps钉钉宜搭支持服务镜像站码上公益

开发者社区

ModelScope模型即服务

文章

正文

玄铁RISC-V处理器入门与实战-平头哥RISC-V 工具链-HHB神经网络模型部署工具

2023-05-22

408

版权

版权声明:

本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《

阿里云开发者社区用户服务协议》和

《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写

侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

本文涉及的产品

交互式建模 PAI-DSW,5000CU*H 3个月

推荐场景:

AIGC Stable Diffusion文生图Lora模型微调实现虚拟上装

简介:

玄铁RISC-V处理器入门与实战-平头哥RISC-V 工具链

-开发达人-

目录

热门文章

最新文章

为什么选择阿里云什么是云计算全球基础设施技术领先稳定可靠安全合规分析师报告产品和定价全部产品免费试用产品动态产品定价价格计算器云上成本管理解决方案技术解决方案文档与社区文档开发者社区天池大赛培训与认证权益中心免费试用高校计划企业扶持计划推荐返现计划支持与服务基础服务企业增值服务迁云服务官网公告健康看板信任中心关注阿里云关注阿里云公众号或下载阿里云APP,关注云资讯,随时随地运维管控云服务售前咨询:95187-1售后服务:400-80-13260法律声明及隐私权政策Cookies政策廉正举报安全举报联系我们加入我们阿里巴巴集团淘宝网天猫全球速卖通阿里巴巴国际交易市场1688阿里妈妈飞猪阿里云计算AliOS万网高德UC友盟优酷钉钉支付宝达摩院淘宝海外阿里云盘饿了么© 2009-2024 Aliyun.com 版权所有 增值电信业务经营许可证: 浙B2-20080101 域名注册服务机构许可: 浙D3-20210002 京D3-20220015浙公网安备 33010602009975号浙B2-20080101-4