Giter Site home page Giter Site logo

cnzjyjp / mlu-ops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cambricon/mlu-ops

0.0 1.0 0.0 10.3 MB

Efficient operation implementation based on the Cambricon Machine Learning Unit (MLU) .

License: MIT License

CMake 0.52% Shell 1.35% C++ 83.68% C 5.41% Python 8.79% Smarty 0.10% Dockerfile 0.14% Makefile 0.01%

mlu-ops's Introduction

Cambricon MLU-OPS

ci

MLU-OPS 提供基于寒武纪人工智能单元(MLU),使用 C 接口或者 Python 接口开发高性能算子的示例代码。 MLU-OPS 旨在通过提供示例代码,供开发者参考使用,可用于开发自定义算子,实现对应模型的计算。

依赖条件

  • 操作系统:
    • 支持 x86_64 下 Ubuntu18.04、Ubuntu20.04、Centos7.6、Centos8.5;
    • 支持 AArch64 下 KylinV10。
  • 寒武纪 MLU SDK:
    • 编译和运行时依赖 CNToolkit v3.1.2 或更高版本。
  • 寒武纪 MLU 驱动:
    • 运行时依赖驱动 v4.20.11 或更高版本。
  • 外部链接库:
    • libxml2-dev、libprotobuf-dev、protobuf-compiler、llvm-6.0-dev
  • Python环境:
    • 依赖Python-3.8.0版本。

MLU-OPS 依赖环境准备

  • 获取 MLU-OPS 代码

    git clone https://github.com/Cambricon/mlu-ops.git
  • 准备 CNToolkit 环境

    sudo apt-get install ./cntoolkit-x.x.x_ubuntuxx.xx_amd64.deb
    sudo apt-get update
    sudo apt-get install cncc cnas cnbin cndrv cnrt cnrtc
  • 准备 Python-3.8.0 环境

    wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
    tar -xvf Python-3.8.0.tgz
    cd Python-3.8.0
    make -j24 && make install
  • 准备 BANGPy 环境

    获取 BANGPy 最新版发布包:(https://cair.cambricon.com/)

    pip3.8 install bangpy-x.x.x-py3-none-any.whl
  • 准备链接库环境

    sudo apt-get update
    sudo apt-get install protobuf-compiler libxml2-dev libprotobuf-dev llvm-6.0-dev

编译和运行测试用例

当前 C 接口(BANGC)和 Python 接口(BANGPy)开发编译和测试分开,后续会将两种接口开发编译、测试统一到一起。

新算子开发流程

详情可以参考文档 BANGC-OPS 算子开发流程.mdBANGPy-OPS 算子开发流程.md 以及 docs 目录下的其它补充说明, 同时也需要参考 C 接口说明文档README.md 和 Python 接口说明文档README.md

获取开发手册

查看最新版 BANGPy 开发手册(https://developer.cambricon.com/index/document/index/classid/3.html),获取安装说明、教程、示例。

目录文件结构

目录/文件 描述
bangc-ops C 接口算子开发目录
bangpy-ops Python 接口算子开发目录
docker 存放docker打包脚本,提供CI构建环境。
docs 算子开发、测试、精度验收的说明文档。

mlu-ops's People

Contributors

cnzjyjp avatar danieeelliu avatar tudejiang79 avatar mahxn0 avatar wsqrichards1 avatar zhanglearning avatar defei-coder avatar guzhonghao avatar littlereal avatar zhangyicole avatar petrelyy avatar graceguanh avatar aiyoungcino avatar betterdongw avatar withfall avatar shouyangdong avatar ling08 avatar artintai avatar farwhite avatar zhangxinyang1 avatar weijie-itsum avatar lihui-ngpf avatar shiiiivering avatar zhsj avatar uniquesquirrel avatar zcykth avatar pingmu123 avatar zshaopeng avatar sunshine-kk avatar shin-wang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.