HOME
Shop
  • English
  • 简体中文
HOME
Shop
  • English
  • 简体中文
  • Product Series

    • FPGA+ARM

      • GM-3568JHF

        • 1. Introduction

          • GM-3568JHF Introduction
        • 2. Quick Start

          • 01 Environment Construction
          • 02 Compilation Instructions
          • 03 Burning Guide
          • 04 Debugging Tools
          • 05 Software Update
          • 06 View information
          • 07 Test Command
          • 08 Application Compilation
          • 09 Source code acquisition
        • 3. Peripherals and Interfaces

          • USB
          • Display and touch
          • Ethernet
          • WIFI
          • Bluetooth
          • TF-Card
          • Audio
          • Serial Port
          • CAN
          • RTC
        • 4. Application Development

          • 01 UART read and write case
          • 02 Key detection case
          • 03 LED light flashing case
          • 04 MIPI screen detection case
          • 05 Read USB device information example
          • 06 FAN Detection Case
          • 07 FPGA FSPI Communication Case
          • 08 FPGA DMA read and write case
          • 09 GPS debugging case
          • 10 Ethernet Test Cases
          • 11 RS485 reading and writing examples
          • 12 FPGA IIC read and write examples
          • 13 PN532 NFC card reader case
          • 14 TF card reading and writing case
        • 5. QT Development

          • 01 ARM64 cross compiler environment construction
          • 02 QT program added automatic startup service
        • 6. Others

          • 01 Modification of the root directory file system
          • 02 System auto-start service
    • ShimetaPi

      • M4-R1

        • Introduction

          • M4-R1 Introduction
        • Get started quickly

          • OpenHarmony概述
          • 镜像烧录
          • 开发环境准备
          • Hello World应用以及部署
        • Application Development

          • getting Started

            • 第一章 ArkTS语言简介
            • 第二章 UI组件介绍和实际应用(上)
            • 第三章 UI组件介绍和实际应用(中)
            • 第四章 UI组件介绍和实际应用(下)
          • Advanced

            • 第一章 入门指引
            • 第二章 三方库的引用和使用
            • 第三章 应用编译以及部署
            • 第四章 命令行恢复出厂设置
            • 第五章 系统调试--HDC调试
            • 第六章 APP 稳定性测试
            • 第七章 应用测试
        • Equipment Development

          • 第一章 环境搭建
          • 第二章 下载源码
          • 第三章 编译源码
        • Peripherals and interfaces

          • 树莓派接口
          • GPIO 接口
          • I2C 接口
          • SPI通信
          • PWM控制
          • 串口通讯
          • TF Card
          • 屏幕
          • 触摸
          • 音频
          • RTC
          • Ethernet
          • M.2
          • MINI-PCIE
          • Camera
          • WIFI&BT
          • 树莓派拓展板
        • Frequently asked questions

          • 资源下载
      • M5-R1

        • Introduction

          • Introduction to ShimetaPi M5-R1
    • OpenHarmony

      • SC-3568HA

        • Introduction

          • SC-3568HA Overview
        • Quick Start Guide

          • OpenHarmony Overview
          • Image Flashing
          • Setting Up the Development Environment
          • Hello World Application and Deployment
        • Application Development

          • ArkUI

            • Chapter 1 Introduction to ArkTS Language
            • Chapter 2 Introduction to UI Components and Practical Applications (Part 1)
            • Chapter 3 Introduction to UI Components and Practical Applications (Part 2)
            • Chapter 4 Introduction to UI Components and Practical Applications (Part 3)
          • Expand

            • Chapter 1 Getting Started Guide
            • Chapter 2 Referencing and Using Third-Party Libraries
            • Chapter 3: Application Compilation and Deployment
            • Chapter 4: Command-Line Factory Reset
            • Chapter 5: System Debugging -- HDC (Huawei Device Connector) Debugging
            • Chapter 6 APP Stability Testing
            • Chapter 7 Application Testing
        • Device Development

          • Chapter 1 Environment Setup
          • Chapter 2 Download Source Code
          • Chapter 3 Compiling Source Code
        • Peripheral And Iinterface

          • Raspberry Pi interface
          • GPIO Interface
          • I2C Interface
          • SPI communication
          • PWM (Pulse Width Modulation) control
          • Serial port communication
          • TF Card
          • Display Screen
          • Touch
          • Audio
          • RTC
          • Ethernet
          • M.2
          • MINI-PCIE
          • Camera
          • WIFI&BT
          • Raspberry Pi expansion board
        • Frequently Asked Questions

          • Resource Downloads
      • M-K1HSE

        • Introduction

          • M-K1HSE Introduction
        • Quick Start

          • Development environment construction
          • Source code acquisition
          • Compilation Notes
          • Burning Guide
        • Peripherals and interfaces

          • 01 Audio
          • 02 RS485
          • 03 Display
        • System customization development

          • System transplant
          • System customization
          • Driver Development
          • System Debugging
          • OTA Update
    • EVS-Camera

      • CF-NRS1

        • 1. Introduction

          • Event Camera Technical Documentation
        • 2. Quick Start

          • Host driver and software installation
        • 3. SDK application development

          • API Usage Instructions
      • CF-CRA2

        • Introduction

          • About CF-NRS1
    • AI-model

      • 1684XB-32T

        • Introduction

          • AIBOX-1684XB-32 Introduction
        • Get started quickly

          • First time use
          • Network Configuration
          • Disk usage
          • Memory allocation
          • Fan Strategy
          • Firmware Upgrade
        • Deployment Tutorial

          • Algorithm deployment
          • Deploy Llama3 Example
        • Application Development

          • Sophgo SDK Development
          • Sophon LLM_api_server development
          • Deploy MiniCPM-V-2_6
          • Qwen-2-5-VL Image and Video Recognition DEMO
          • Qwen3-chat-DEMO
          • Qwen3-Qwen Agent-MCP-Demo
          • Qwen3-langchain-AI Agent
      • 1684X-416T

        • Introduction

          • AIBOX-1684X-416 Introduction
        • Demo simple operation guide

          • Simple instructions for using shimeta smart monitoring demo
    • Core-Board

      • C-3568BQ

        • Introduction

          • C-3568BQ Overview
      • C-3588LQ

        • Introduction

          • C-3588LQ Introduction
      • GC-3568JBAF

        • Introduction

          • GC-3568JBAF Introduction
      • C-K1BA

        • Introduction

          • C-K1BA Introduction

Sophgo SDK Development

1. SDK Introduction

SOPHONSDK is a deep learning SDK customized by Suanneng Technology based on BM1684 and BM1684X. It covers the model optimization and efficient operation support capabilities required in the neural network inference stage, providing an easy-to-use and efficient full-stack solution for deep learning application development and deployment.

1. Basic toolkit

The basic toolkit includes:

  • tpu-nntc is responsible for offline compilation and optimization of the neural network model trained in a third-party deep learning framework, and generates the BModel required for the final runtime. Currently, it supports Caffe, Darknet, MXNet, ONNX, PyTorch, PaddlePaddle, TensorFlow, etc.
  • libsophon provides libraries such as BMCV, BMRuntime, and BMLib to drive hardware such as VPP and intelligent vision deep learning processor modules to complete operations such as image processing, tensor operations, and model reasoning for users to develop deep learning applications.
  • sophon-mw encapsulates SOPHON-OpenCV, SOPHON-FFmpeg and other libraries to drive VPU, JPU and other hardware, supports RTSP stream, GB28181 stream parsing, video image encoding and decoding acceleration, etc., for users to develop deep learning applications.
  • sophon-sail provides a high-level interface that supports Python/C++. It is an encapsulation of the underlying library interfaces such as BMRuntime, BMCV, sophon-mw, BMLib, etc., for users to develop deep learning applications.

2. Advanced Toolkit

The Advanced Toolkit includes:

  • tpu-mlir provides a complete toolchain for the Tensor Processing Unit compiler project, which can convert pre-trained neural networks under different frameworks into binary files BModel that can run efficiently on the Suanneng intelligent vision deep learning processor. Currently directly supported frameworks include tflite, onnx and Caffe.
  • tpu-perf provides a complete toolkit for model performance and accuracy verification.
  • tpu-kernel is the underlying development interface of the Tensor Processing Unit. It can call dedicated instructions to accelerate deep learning business logic, and can also call general instructions to accelerate various customized algorithms.

For details, please refer to the calculation document

Tips

  • sophon-demo provides comprehensive routines for single models or scenarios in x86 and SoC environments for users to refer to during deep learning application development.
  • sophon-pipeline provides a simple pipeline-based high-performance inference framework that can run pre-processing/inference/post-processing on three threads respectively, maximizing parallelism for users to refer to during deep learning application development.
TOOL

3. SOPHONSDK folder directory

FoldersRemark
libsophonLibraries that support hardware-accelerated image processing, tensor operations, model reasoning, etc. on SOPHON devices
sophon-mwMultimedia library that supports hardware acceleration on SOPHON devices
tpu-kernelLow-level development interface
tpu-mlirTensor Processing Unit compiler toolchain
tpu-nntcTensor Processing Unit compiler toolchain
tpu-perfModel performance and accuracy verification toolkit
sophon-pipelineHigh-performance reasoning framework based on pipeline
sophon-imgSoC mode installation package
sophon-demoComprehensive routines for a single model or scenario
sophon-sailAn interface library that encapsulates the underlying interface with C++/Python API
sophon-rpcOn PCIe card products, some computing tasks are offloaded to the ARM on the card.
docker-imageDocker image

4. The folder directory after SOPHONSDK is unzipped

as follows:

    SOPHONSDK
    ├── docker-image
    │   ├── md5sum.txt
    │   ├── sophgo-tpuc_dev-v2.1-82d75f5c633d.tar.bz2
    │   └── sophgo-tpuc_dev-v2.2-f72913f3a83d.tar.bz2
    ├── libsophon_20240108_210425
    │   ├── BMCV开发参考手册.pdf
    │   ├── BMCV_Technical_Reference_Manual.pdf
    │   ├── BMLIB开发参考手册.pdf
    │   ├── BMLib_Technical_Reference_Manual.pdf
    │   ├── BMRUNTIME开发参考手册.pdf
    │   ├── BMRuntime Technical Reference Manual.pdf
    │   ├── centos
    │   ├── libsophon_0.4.9-LTS_aarch64.tar.gz
    │   ├── libsophon_0.4.9-LTS_loongarch64.tar.gz
    │   ├── libsophon_0.4.9-LTS_x86_64.tar.gz
    │   ├── LIBSOPHON使用手册.pdf
    │   ├── libsophon_dockerfile
    │   ├── libsophon.MD5
    │   ├── LIBSOPHON_User_Guide.pdf
    │   ├── release_version.txt
    │   ├── sophon-driver_0.4.9-LTS_amd64.deb
    │   ├── sophon-driver_0.4.9-LTS_arm64.deb
    │   ├── sophon-libsophon_0.4.9-LTS_amd64.deb
    │   ├── sophon-libsophon_0.4.9-LTS_arm64.deb
    │   ├── sophon-libsophon-dev_0.4.9-LTS_amd64.deb
    │   └── sophon-libsophon-dev_0.4.9-LTS_arm64.deb
    ├── sophon-demo_20231116_085900
    │   ├── release_version.txt
    │   ├── sophon-demo.MD5
    │   ├── sophon-demo_v0.1.8_dbb4632_20231116
    │   └── sophon-demo_v0.1.8_dbb4632_20231116.tar.gz
    ├── sophon-img_20240116_212937
    │   ├── bsp-debs
    │   ├── bsp_update.tgz
    │   ├── libsophon_soc_0.4.9-LTS_aarch64.tar.gz
    │   ├── release_version.txt
    │   ├── sdcard.tgz
    │   ├── SOPHON BSP开发参考手册.pdf
    │   ├── SOPHON_BSP_Technical_Reference_Manual.pdf
    │   ├── sophon-img.MD5
    │   ├── system.tgz
    │   └── tftp.tgz
    ├── sophon-mw_20240116_152830
    │   ├── MULTIMEDIA常见问题手册.pdf
    │   ├── MULTIMEDIA开发参考手册.pdf
    │   ├── MULTIMEDIA使用手册.pdf
    │   ├── Multimedia FAQ.pdf
    │   ├── Multimedia Technical Reference Manual.pdf
    │   ├── Multimedia User Guide.pdf
    │   ├── release_version.txt
    │   ├── sophon-mw_0.8.0_aarch64.tar.gz
    │   ├── sophon-mw_0.8.0_loongarch64.tar.gz
    │   ├── sophon-mw_0.8.0_x86_64.tar.gz
    │   ├── sophon-mw.MD5
    │   ├── sophon-mw-soc_0.8.0_aarch64.tar.gz
    │   ├── sophon-mw-soc-sophon-ffmpeg_0.8.0_arm64.deb
    │   ├── sophon-mw-soc-sophon-ffmpeg-dev_0.8.0_arm64.deb
    │   ├── sophon-mw-soc-sophon-opencv_0.8.0_arm64.deb
    │   ├── sophon-mw-soc-sophon-opencv-dev_0.8.0_arm64.deb
    │   ├── sophon-mw-soc-sophon-sample_0.8.0_arm64.deb
    │   ├── sophon-mw-sophon-ffmpeg_0.8.0_amd64.deb
    │   ├── sophon-mw-sophon-ffmpeg_0.8.0_amd64.rpm
    │   ├── sophon-mw-sophon-ffmpeg_0.8.0_arm64.deb
    │   ├── sophon-mw-sophon-ffmpeg_0.8.0_arm64.rpm
    │   ├── sophon-mw-sophon-ffmpeg_0.8.0_loongarch64.deb
    │   ├── sophon-mw-sophon-ffmpeg-dev_0.8.0_amd64.deb
    │   ├── sophon-mw-sophon-ffmpeg-dev_0.8.0_amd64.rpm
    │   ├── sophon-mw-sophon-ffmpeg-dev_0.8.0_arm64.deb
    │   ├── sophon-mw-sophon-ffmpeg-dev_0.8.0_arm64.rpm
    │   ├── sophon-mw-sophon-ffmpeg-dev_0.8.0_loongarch64.deb
    │   ├── sophon-mw-sophon-opencv_0.8.0_amd64.deb
    │   ├── sophon-mw-sophon-opencv_0.8.0_arm64.deb
    │   ├── sophon-mw-sophon-opencv_0.8.0_loongarch64.deb
    │   ├── sophon-mw-sophon-opencv-abi0_0.8.0_amd64.rpm
    │   ├── sophon-mw-sophon-opencv-abi0_0.8.0_arm64.rpm
    │   ├── sophon-mw-sophon-opencv-abi0-dev_0.8.0_amd64.rpm
    │   ├── sophon-mw-sophon-opencv-abi0-dev_0.8.0_arm64.rpm
    │   ├── sophon-mw-sophon-opencv-dev_0.8.0_amd64.deb
    │   ├── sophon-mw-sophon-opencv-dev_0.8.0_arm64.deb
    │   ├── sophon-mw-sophon-opencv-dev_0.8.0_loongarch64.deb
    │   ├── sophon-mw-sophon-sample_0.8.0_amd64.deb
    │   ├── sophon-mw-sophon-sample_0.8.0_amd64.rpm
    │   ├── sophon-mw-sophon-sample_0.8.0_arm64.deb
    │   ├── sophon-mw-sophon-sample_0.8.0_arm64.rpm
    │   └── sophon-mw-sophon-sample_0.8.0_loongarch64.deb
    ├── sophon-rpc_20231208_174527
    │   ├── release_version.txt
    │   ├── sophon-rpc_3.2.0-LTS_amd64.deb
    │   ├── sophon-rpc_3.2.0-LTS_amd64.rpm
    │   ├── sophon-rpc_3.2.0-LTS_arm64.deb
    │   ├── sophon-rpc_3.2.0-LTS_arm64.rpm
    │   ├── sophon-rpc_3.2.0-LTS.tar.gz
    │   ├── sophon-rpc使用指南.pdf
    │   └── sophon-rpc.MD5
    ├── sophon-sail_20231116_085400
    │   ├── release_version.txt
    │   ├── sophon-sail_3.7.0.tar.gz
    │   ├── sophon-sail_en.pdf
    │   ├── sophon-sail.MD5
    │   └── sophon-sail_zh.pdf
    ├── sophon-stream_20231116_011200
    │   ├── release_version.txt
    │   ├── sophon-stream.MD5
    │   └── sophon-stream_v0.0.4-rc4_10a8ed8_20231115.tar.gz
    ├── tpu-kernel_20231130_055600
    │   ├── release_version.txt
    │   ├── tpu-kernel-1684x_v3.1.7-520261d8-231130.tar.gz
    │   └── tpu-kernel.MD5
    ├── tpu-mlir_20231116_054500
    │   ├── release_version.txt
    │   ├── tpu-mlir.MD5
    │   └── tpu-mlir_v1.3.140-g3180ff37-20231116.tar.gz
    ├── tpu-nntc_20231130_054100
    │   ├── release_version.txt
    │   ├── tpu-nntc.MD5
    │   └── tpu-nntc_v3.1.9-29fa956b-231130.tar.gz
    └── tpu-perf_v1.2.37
        ├── tpu_perf-1.2.37-py3-none-manylinux2014_aarch64.whl
        ├── tpu_perf-1.2.37-py3-none-manylinux2014_x86_64.whl
        ├── tpu-perf-v1.2.37.tar.gz
        └── tpu-perf-v1.2.37.zip

5. SDK main modules

  • Hardware driver and runtime library LIBSOPHON : Contains libraries such as BMCV, BMRuntime, BMLib, etc., which are used to drive hardware such as VPP and intelligent vision deep learning processor to complete image processing, tensor operations, model reasoning and other operations.
  • Multimedia library SOPHON-MW : SOPHON-OpenCV and SOPHON-FFmpeg that support hardware acceleration of SOPHON devices, support parsing of RTSP streams and GB28181 streams, and encoding and decoding of videos and pictures.
  • Model compilation and quantization toolchain TPU-MLIR : Supports model conversion of framework models such as Caffe, TFLite, and ONNX; supports model quantization: original model -> MLIR Model -> FP32 BModel or original model -> MLIR Model -> cali_table -> INT8 BModel, and provides model_deploy.py quantization script.
  • Model compilation and quantization toolchain TPU-NNTC : supports model conversion of framework models such as Caffe, Tensorflow, Pytorch, MXNet, Darknet, Paddle Paddle, ONNX, etc.; supports model quantization: original model -> FP32 UModel -> INT8 UModel -> INT8 BModel, and provides auto-cali automatic quantization tools.
  • Tensor operation and image processing library BMCV : color space conversion, scale transformation, affine transformation, projection transformation, linear transformation, picture frame, JPEG encoding, BASE64 encoding, NMS, sorting, feature matching.
  • Device management BMLib: Basic interface : device handle management, memory management, data handling, API sending and synchronization, A53 enabling, etc.
  • SAIL, the Suanfeng deep learning processing acceleration library : supports high-level interfaces of Python/C++ and is an encapsulation of underlying library interfaces such as BMRuntime, BMCV, and sophon-mw.
  • Custom operator high-level programming library BMLang : A C++-based high-level programming library for SOPHON intelligent vision deep learning processors. It is decoupled from hardware information and does not require understanding of the hardware architecture. Code is written using tensor data (bmlang::Tensor) and computational operations (bmlang::Operator). Finally, bmlang::compile or bmlang::compile_with_check is used to generate a BModel that can be run by the intelligent vision deep learning processor. In addition, it also supports the use of the arm processor in BM168X to implement operators that are not yet supported by the intelligent vision deep learning processor.
  • Algorithm parallel acceleration programming library TPUKernel : A low-level programming interface based on the low-level atomic operation interface of SOPHON BM1684 and BM1684X, which requires users to be familiar with the device hardware architecture and instruction set.
  • Model performance and accuracy verification tool TPUPerf : can perform performance analysis and accuracy verification on the model.

2. SDK acquisition and installation

Tips

Get the v24.04.01 SDK

Install v24.04.01 SDK

3. More information

Tips

Computing data


Edit this page on GitHub
Last Updated:
Contributors: zsl, zwhuang
Next
Sophon LLM_api_server development