push ACPO to openEuler
This commit is contained in:
parent
e2facd7716
commit
a66539f7b5
33
ACPO.spec
Normal file
33
ACPO.spec
Normal file
@ -0,0 +1,33 @@
|
||||
Name: ACPO
|
||||
Version: 1.0
|
||||
License: Apache License 2.0
|
||||
Release: 1
|
||||
Summary: ACPO model source
|
||||
URL: https://github.com/Huawei-CPLLab/ACPO/
|
||||
Source0: https://github.com/Huawei-CPLLab/ACPO/archive/refs/tags/v1.0.zip
|
||||
BuildArch: noarch
|
||||
|
||||
#build requires
|
||||
Requires: python3-devel
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-pip
|
||||
Requires: python3-wheel
|
||||
|
||||
%description
|
||||
The ACPO framework is designed to easily integrate ML models within a compiler framework
|
||||
and provide useful tools for training and analysis of ML models for use in a compiler.
|
||||
It comes together with examples of different models that were deployed in an LLVM-based compiler.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/%{python3_sitelib}
|
||||
cp -r %{_builddir}/%{name} %{buildroot}/%{python3_sitelib}
|
||||
|
||||
%files
|
||||
/%{python3_sitelib}/%{name}/*
|
||||
|
||||
%changelog
|
||||
* Mon Oct 28 2024 wangziming <wangziming16@huawei.com> - 1.0-1
|
||||
- Package init
|
||||
25
README.md
25
README.md
@ -4,20 +4,28 @@
|
||||
ACPO(AI-Enabled Compiler-Driven Program Optimization) is a novel framework to provide LLVM with simple and comprehensive tools to benefit from employing ML models for different optimization passes.
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
软件依赖python环境
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
1. 软件依赖python环境运行。
|
||||
2. 训练请到ACPO-model目录下pip install -r requirements.txt安装相应包。
|
||||
3. 使能编译器推理模型请到软件根目录下pip install -r requirements.txt安装相应包。
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
1. 模型训练:软件根目录下
|
||||
cd ACPO-model/src
|
||||
运行命令:python3 train.py --configuration(config具体参考src目录下的README.md,可进行多个config配置)
|
||||
参数调整:可通过配置doc/config目录下user_train_config.json或.yaml进行配置,test目录下提供适配样例
|
||||
模型调整:在/src/models.py中调整模型
|
||||
2. LLVM端到端使用ACPO
|
||||
将保存好的模型相关文件保存在models目录中
|
||||
安装LLVM并编译ACPO LLVM侧相关代码
|
||||
在运行推理前设置环境变量:export ACPO_DIR=/your_ACPO_addr
|
||||
以inline model测试为例:
|
||||
AOT(使用预编译好的模型)测试命令:clang -O3 -mllvm -enable-acpo-fi-aot -mllvm -acpo-verbose-fi -lm test.c
|
||||
实时推理测试命令:clang -O3 -mllvm -enable-acpo-fi -mllvm -acpo-verbose-fi -lm test.c
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
@ -26,7 +34,6 @@ ACPO(AI-Enabled Compiler-Driven Program Optimization) is a novel framework to pr
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user