Giter VIP home page Giter VIP logo

yalexyang / akg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mindspore-ai/akg

0.0 1.0 0.0 7.49 MB

AKG (Auto Kernel Generator) is an optimizer for operators in Deep Learning Networks, which provides the ability to automatically fuse ops with specific patterns.

Home Page: https://gitee.com/mindspore/akg

License: Apache License 2.0

CMake 0.27% Shell 0.18% Python 56.15% C++ 43.40% C 0.01%

akg's Introduction

查看中文

What Is AKG

AKG(Auto Kernel Generator) is an optimizer for operators in Deep Learning Networks. It provides the ability to automatically fuse ops with specific patterns. AKG works with MindSpore-GraphKernel to improve the performance of networks running on different hardware backends.

AKG composes with four basic optimization module, normalization, auto schedule, instruction emit and backend optimization.

  • normalization. In order to solve the limitation in expression ability of polyhedral(which can only process static linear programs), the computation IR needs to be normalized first. The mainly optimization of normalization module includes auto-inline, loop partition, common subexpression elimination and so on.

  • auto schedule. Base on polyhedral technology, the auto schedule module mainly have auto-vectorization, auto-tiling, dependency analysis and memory promotion.

  • instruction emit. The instruction emitting module has the optimization about loop normalization, auto pragma and emit instruction.

  • backend optimization. The backend optimization module consists of double buffer optimization, storage rewrite optimization and inject sync optimization.

Hardware Backends Support

At present, Ascend910 and GPU V100/A100 are supported. More Backends are on the list.

Build

Build With MindSpore

See MindSpore README.md for details.

Build Standalone

We suggest you build and run akg together with MindSpore. And we also provide a way to run case in standalone mode for convenience sake. Refer to MindSpore Installation for more information about compilation dependencies.

bash build.sh -t $target // target can set 'gpu' or 'ascend'

Run Standalone

  1. Set Environment
  • Ascend910
    cd tests
    source ./test_env.sh amd64
    export RUNTIME_MODE='air_cloud'
    export PATH=${PATH}:${YOUR_CCEC_COMPILER_PATH}
    
  • GPU V100/A100
    cd tests
    source ./test_env.sh gpu
    
  1. Run test
  • Ascend910
    cd tests/operators/vector
    pytest -s test_abs_001.py -m "level0" # run level0 testcases
    
  • GPU V100/A100
    cd tests/operators/gpu
    python3 test_all.py -s "op_name" #replace op_name with the operator name which you want to test
    

Contributing

Welcome contributions. See MindSpore Contributor Wiki for more details.

Release Notes

The release notes, see our RELEASE.

License

Apache License 2.0

akg's People

Contributors

mindspore-bot avatar sijiayang avatar ryanwhb avatar laekov avatar zhengzuohe avatar gaoxiong-1 avatar vectorsl avatar yaozhujia 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.