You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.6 kB

5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. - [What Is AKG?](#what-is-akg)
  2. - [Hardware Backends Support](#hardware-backends-support)
  3. - [Build](#build)
  4. - [Build With MindSpore](#build-with-mindspore)
  5. - [Build Standalone](#build-standalone)
  6. - [Run](#run)
  7. - [Contributing](#contributing)
  8. - [Release Notes](#release-notes)
  9. - [License](#license)
  10. [查看中文](./README_CN.md)
  11. ## What Is AKG
  12. 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.
  13. AKG composes with three basic optimization module, normalization, auto schedule and backend optimization.
  14. - **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 fusing, common subexpression elimination and so on.
  15. - **auto schedule.** Base on polyhedral technology, the auto schedule module mainly have auto-vectorization, auto-tiling, thread/block mapping, dependency analysis and memory promotion.
  16. - **backend optimization.** The backend optimization module mainly consists of TensorCore acceleration, double buffer optimization, storage flatten optimization and inject sync optimization.
  17. <img src="docs/akg-design.png" style="zoom:80%" div align=center/>
  18. ## Hardware Backends Support
  19. At present, `GPU V100/A100` are supported. More Backends are on the list.
  20. ## Build
  21. ### Build With MindSpore
  22. See [MindSpore README.md](https://gitee.com/mindspore/mindspore/blob/master/README.md) for details.
  23. ### Build Standalone
  24. 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.
  25. Refer to [MindSpore Installation](https://www.mindspore.cn/install/en) for more information about compilation dependencies.
  26. ```
  27. bash build.sh -e $target // target can set 'gpu'
  28. ```
  29. ## Run Standalone
  30. 1. Set Environment
  31. - GPU V100/A100
  32. ```
  33. cd tests
  34. source ./test_env.sh gpu
  35. ```
  36. 2. Run test
  37. - GPU V100/A100
  38. ```
  39. cd tests/operators/gpu
  40. python3 test_all.py -s "op_name" #replace op_name with the operator name which you want to test
  41. ```
  42. ## Contributing
  43. Welcome contributions. See [MindSpore Contributor Wiki](https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md) for
  44. more details.
  45. ## Release Notes
  46. The release notes, see our [RELEASE](RELEASE.md).
  47. ## License
  48. [Apache License 2.0](LICENSE)