Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Zichao ef62c7097e | 6 days ago | |
---|---|---|
.. | ||
adt | 1 month ago | |
api | 2 weeks ago | |
ast_gen_ius | 2 weeks ago | |
auto_schedule | 2 weeks ago | |
backends | 2 weeks ago | |
common | 2 weeks ago | |
frontend | 2 weeks ago | |
hlir | 6 days ago | |
ir | 1 week ago | |
lang | 1 week ago | |
operator_fusion | 1 week ago | |
optim | 1 week ago | |
poly | 1 month ago | |
pybind | 2 weeks ago | |
runtime | 2 weeks ago | |
utils | 1 month ago | |
CMakeLists.txt | 2 weeks ago | |
README.md | 1 month ago | |
cinn.h | 6 months ago | |
gtest_main.cc | 3 months ago |
___ ___ ___
/\__\ /\ \ /\ \
/:/ / ___ \:\ \ \:\ \
/:/ / /\__\ \:\ \ \:\ \
/:/ / ___ /:/__/ _____\:\ \ _____\:\ \
/:/__/ /\__\/::\ \ /::::::::\__\/::::::::\__\
\:\ \ /:/ /\/\:\ \__\:\~~\~~\/__/\:\~~\~~\/__/
\:\ /:/ / \:\/\__\\:\ \ \:\ \
\:\/:/ / \::/ / \:\ \ \:\ \
\::/ / /:/ / \:\__\ \:\__\
\/__/ \/__/ \/__/ \/__/
The project CINN is a machine learning compiler and executor for multiple hardware backends.
It is designed to provide multiple layers of APIs to make tensor computation easier to define, faster to execute, and more convenient to extend with hardware backends.
Currently, it targets x86 CPUs and Nvidia GPUs.
This project is under active development.
The CINN lowers a traditional DNN model into a two-level intermediate representation(IR), the high-level IR(HLIR) and CINN IR.
The HLIR helps to define some domain-specific computation and perform some overall optimization on the IR-graph;
the CINN IR helps to represent some computation semantic and finally lower to a hardware backend.
Both levels of IR have the similar SSA graph, analysis and optimization facilities.
The schedule transform is applied on the CINN IR to do optimizations.
For more details, you can refer to:
https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/cinn
Clone PaddlePaddle first.
git clone https://github.com/PaddlePaddle/Paddle.git
cd Paddle
mkdir build
cd build
Build paddle with cinn:
cmake .. -DWITH_CINN=ON -DWITH_GPU=ON
And then
make -j
Install paddle with cinn:
pip install python/dist/paddlepaddle_gpu-xxx.whl
Install cinn only:
pip install python/dist/cinn_gpu-xxx.whl
Then you can import paddle in the python environment and check if a paddle version with CINN is installed.
import paddle
paddle.is_compiled_with_cinn()
There are two levels of APIs in CINN, the higher level is HLIR and the lower level is CINN IR, both contain some concepts.
In HLIR
frontend::Program
, the program helps to define a machine learning computation,hlir::framework::Tensor
, multi-dimensional arrays helps to manage a memory buffer.hlir::framework::Program
, the final executable program in runtime. It holds many basic executable elements.hlir::framework::Graph
, the graph that represents the structure of a model. Each node in the graph represents an operator (conv2d, relu, mul, etc.).hlir::framework::GraphCompiler
, the compiler that transforms the graph representation(hlir::framework::Graph) of a model into an executable program(hlir::framework::Program).In CINN IR
Compute
, the method to define a computation,Lower
, the method to lower a computation to the corresponding IR,LoweredFunc
, the function defined in CINN IR,Var
, a scalar variable,Expr
, an expression represents any CINN IR node(no specified Statement node),CINN is licensed under the Apache 2.0 license.
CINN learned a lot from the following projects:
PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
https://www.paddlepaddle.org.cn/
C++ Python Cuda Text Shell other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》