首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

人反对如果方法非法方法非法方法非法方法

操作系统 7.21KB 27 需要积分: 1
立即下载

资源介绍:

人反对如果方法非法方法非法方法非法方法
# tvm-riscv-deploy This repository demonstrates how to deploy the TVM compiler on a RISC-V architecture using ResNet18. ## Step 1: Setting up TVM Follow these steps, which are adapted from the [TVM Install from Source](http://tvm.apache.org/docs/install/from_source.html) page. ### Clone the repository ```bash git clone --recursive --branch int4_direct_HWNC http://github.com/zachzzc/incubator-tvm.git ~/tvm ``` ### Install LLVM ```bash sudo bash -c "$(wget -O - http://apt.llvm.org/llvm.sh)" ``` ### Install build dependencies ```bash sudo apt-get update sudo apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev ``` ### Build TVM Navigate to the TVM directory, create a build directory, and copy the `config.cmake` file. ```bash cd ~/tvm mkdir build cp cmake/config.cmake build ``` Edit `build/config.cmake` to customize compilation options: - Change `set(USE_LLVM OFF)` to `set(USE_LLVM /path/to/llvm-config)` to build with LLVM (replace `/path/to/llvm-config` with the actual path, such as `/usr/lib/llvm-10/bin/llvm-config`). Then compile TVM: ```bash cd build cmake .. make -j4 ``` ### Install the TVM Python package Add the following lines to `~/.bashrc`: ```bash export TVM_HOME=/path/to/tvm export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/topi/python:$TVM_HOME/nnvm/python:${PYTHONPATH} ``` Source `~/.bashrc` to apply the changes: ```bash source ~/.bashrc ``` ### Install Python dependencies Install the necessary dependencies: ```bash pip3 install --user numpy decorator attrs ``` ## Step 2: Install RISC-V GNU Compiler Toolchain ```bash sudo apt update sudo apt install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu ``` Compile the TVM runtime for RISC-V: ```bash riscv64-linux-gnu-g++ -c -std=c++17 -O2 -fPIC -I/home/tvm/include -I/home/tvm/3rdparty/dmlc-core/include -I/home/tvm/3rdparty/dlpack/include -DDMLC_USE_LOGGING_LIBRARY=\ -o lib/libtvm_runtime_pack.o tvm_runtime_pack.cc ``` This will generate the `libtvm_runtime_pack.o` file. ## Step 3: Generate `test_resnet18.so` Use `prepare_test_libs.py` to generate the `test_resnet18.so` file. ## Step 4: Compile the Deployment Package ```bash riscv64-linux-gnu-g++ -std=c++17 -O2 -fPIC -I/home/tvm/include -I/home/tvm/3rdparty/dmlc-core/include -I/home/tvm/3rdparty/dlpack/include -DDMLC_USE_LOGGING_LIBRARY=\ -o lib/cpp_deploy_pack cpp_deploy.cc lib/test_resnet18.so lib/libtvm_runtime_pack.o -L/home/tvm/build -ldl -pthread ``` This will create the `cpp_deploy_pack` executable. ## Step 5: Running on RISC-V Processor or Emulator If you do not have a RISC-V processor to execute, you can use the QEMU emulator. For more information, please read `Qemu_usage.md`. Transfer the `cpp_deploy_pack` executable and `lib/test_resnet18.so` to riscv64 file system and execute to get the results. ```bash ./cpp_deploy_pack ``` With these steps, you have successfully deployed ResNet18 using the TVM compiler on a RISC-V processor and performed an inference.

资源文件列表:

tvm-riscv-deploy-main.zip 大约有7个文件
  1. tvm-riscv-deploy-main/
  2. tvm-riscv-deploy-main/Qemu_usage.md 4.09KB
  3. tvm-riscv-deploy-main/README.md 2.98KB
  4. tvm-riscv-deploy-main/cpp_deploy.cc 1.59KB
  5. tvm-riscv-deploy-main/prepare_test_libs.py 889B
  6. tvm-riscv-deploy-main/python_deploy.py 1.16KB
  7. tvm-riscv-deploy-main/tvm_runtime_pack.cc 3.42KB
0评论
提交 加载更多评论
其他资源 弹道导弹的点点滴滴的点点滴滴的点点滴滴的
弹道导弹的点点滴滴的点点滴滴的点点滴滴的
雷赛控制卡 2410 驱动
雷赛控制卡 2410 驱动
[教务通24-132]关于2024级《体育与健康1》课程选项课选课的通知.zip
[教务通24-132]关于2024级《体育与健康1》课程选项课选课的通知.zip
[教务通24-132]关于2024级《体育与健康1》课程选项课选课的通知.zip [教务通24-132]关于2024级《体育与健康1》课程选项课选课的通知.zip [教务通24-132]关于2024级《体育与健康1》课程选项课选课的通知.zip
ESP32C3-SuperMini 的PlatformIO支持文件
super_mini_esp32c3.json 是板定义文件。它引用了下一个文件。 pins_arduino.h 是引脚定义文件。 复制到如下位置: Linux和MacOS: 1. '~/.platformio/platforms/espressif32/boards/super_mini_esp32c3.json' 2. '~/.platformio/packages/framework-arduinoespressif32/variants/super_mini_esp32c3/pins_arduino.h' Windows: 1. `%HOMEPATH%\.platformio\platforms\espressif32\boards\super_mini_esp32c3.json` 2. `%HOMEPATH%\.platformio\packages/framework-arduinoespressif32/variants/super_mini_esp32c3/pins_arduino.h`
修改后4学分课件.zip
修改后4学分课件.zip
中小学学科答题小程序 v1.10
中小学学科答题小程序,适合各中小学校方,老师或者家长。通过互动和参与式学习,小程序能够通过游戏化元素提升学习的积极性和参与度,从而提升学习效率,促进学生自主学习,其主要功能如下: 分类题库:按照学科(数学、语文、英语等)和知识点进行分类,方便用户选择。 随机抽题:用户可以选择特定学科,系统随机生成题目。 答题竞赛: 模拟真实竞赛或考试环境,可以设置每场的时间。 解析详解:每道题目提供详细的解答和解析,帮助用户理解解题思路。 排行榜:展示用户的积分排名,促进比赛竞争。 后台-题库管理:支持直接录入,或者通过Excel导入题库(每次5000条) 后台-答题参数设置:可以设置竞赛开始状态,每次答题数目,每次答题时长限制,每天可参与答题竞赛次数等参数
system view6.0安装包
system view6.0安装包
sqlite免安装工具,解压即用,支持查询,就是小
免安装工具,适用于sqlite的查询,貌似不支持修改,不过胜在小。 如需修改编辑还有其它工具可用,见我的其他资源