Update AI4Compiler Framework to Version 1.0.3.
New features: 1. Update AI4Compiler inference engine. 2. Support multi-grained compiler tuning grounded in Autotuner. 3. Add templates for compiler optimization plugins.
This commit is contained in:
parent
1a8b8da626
commit
f6bac70b6f
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
50
AI4C.spec
50
AI4C.spec
@ -5,16 +5,16 @@
|
||||
%global build_dir_frm %{build_dir}/aiframe/build
|
||||
%global build_libdir %{build_dir_frm}/%{_lib}
|
||||
%global build_includedir %{build_dir_frm}/include
|
||||
%global build_dir_model %{build_libdir}/%{name}
|
||||
|
||||
%global install_libdir %{buildroot}%{_libdir}
|
||||
%global install_includedir %{buildroot}%{_includedir}
|
||||
%global install_dir_model %{install_libdir}/%{name}
|
||||
|
||||
%global max_jobs 16
|
||||
|
||||
Summary: %{name} is a framework which enables compilers compilers to integrate ML-driven compiler optimization.
|
||||
Name: AI4C
|
||||
Version: 0.2.0
|
||||
Version: 1.0.3
|
||||
Release: 1
|
||||
# Package onnxruntime and SafeInt have MIT License.
|
||||
# Package onnx has Apache License 2.0.
|
||||
@ -22,9 +22,6 @@ License: MIT and ASL 2.0 and Boost and BSD
|
||||
URL: https://gitee.com/openeuler/AI4C
|
||||
Source0: %{pkg_version}.tar.gz
|
||||
|
||||
Patch1: 0001-add-interface-and-model-for-Auto-LTO.patch
|
||||
Patch2: 0002-update-auto-lto-model.patch
|
||||
|
||||
BuildRequires: cmake >= 3.13
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
@ -36,9 +33,13 @@ BuildRequires: python3-devel
|
||||
BuildRequires: python3-numpy
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-wheel
|
||||
BuildRequires: openssl
|
||||
BuildRequires: openssl-devel
|
||||
|
||||
BuildRequires: yaml-cpp
|
||||
BuildRequires: yaml-cpp-devel
|
||||
BuildRequires: gcc-plugin-devel
|
||||
BuildRequires: libstdc++-static
|
||||
|
||||
%description
|
||||
%{name} is a framework which enables compilers compilers to integrate ML-driven compiler optimization.
|
||||
@ -49,12 +50,6 @@ tar -xzf %{SOURCE0} -C .
|
||||
%autosetup -S git -n %{pkg_version}
|
||||
|
||||
%build
|
||||
# Construct dependency package `cmake`
|
||||
cd %{build_dir_dep}/cmake
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=./install
|
||||
make install -j %{max_jobs}
|
||||
|
||||
# Broken test in aarch64 architecture.
|
||||
cd %{build_dir_dep}/onnxruntime
|
||||
%ifarch aarch64
|
||||
@ -64,7 +59,7 @@ rm -v onnxruntime/test/optimizer/nhwc_transformer_test.cc
|
||||
# Construct dependency package `onnxruntime`.
|
||||
mkdir -p %{build_libdir}
|
||||
mkdir -p %{build_includedir}
|
||||
%{build_dir_dep}/cmake/build/install/bin/cmake \
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=%{build_dir_frm} \
|
||||
-DCMAKE_INSTALL_LIBDIR=%{build_libdir} \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=%{build_includedir} \
|
||||
@ -82,29 +77,38 @@ mkdir -p %{build_includedir}
|
||||
-S cmake
|
||||
make -j %{max_jobs} && make install
|
||||
|
||||
# Construct AI4C library `libONNXRunner.so`.
|
||||
cd %{build_dir_frm}
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=%{build_dir_frm} \
|
||||
|
||||
pushd %{build_dir}/python
|
||||
%{__python3} setup.py bdist_wheel \
|
||||
-Donnxruntime_ROOTDIR=%{build_dir_frm} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
../
|
||||
make -j %{max_jobs} && make install
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
%install
|
||||
install -d %{install_includedir}
|
||||
install %{build_includedir}/onnxruntime/* -t %{install_includedir}
|
||||
install -d %{install_dir_model}
|
||||
install %{build_dir_model}/* -t %{install_dir_model}
|
||||
install %{build_dir}/models/* -t %{install_dir_model}
|
||||
install %{build_libdir}/libonnxruntime.so* -t %{install_libdir}
|
||||
install %{build_libdir}/libONNXRunner.so -t %{install_libdir}
|
||||
pushd %{install_libdir}
|
||||
ln -sf libonnxruntime.so.1.* libonnxruntime.so
|
||||
popd
|
||||
|
||||
pushd %{build_dir}/python
|
||||
%py3_install
|
||||
|
||||
%files
|
||||
%attr(0755,root,root) %{_libdir}/*
|
||||
%{_includedir}/*
|
||||
%{_libdir}/*
|
||||
/usr/bin/ai4c-autotune
|
||||
/usr/bin/ai4c-g++
|
||||
/usr/bin/ai4c-gcc
|
||||
/usr/bin/ai4c-option-tune
|
||||
/usr/bin/ai4c-tune
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Nov 22 2024 Feiyang Liu <liufeiyang6@huawei.com> - 1.0.3-1
|
||||
- Update AI4C from v0.2.0 to v1.0.3.
|
||||
|
||||
* Mon Nov 25 2024 Zhenyu Zhao <zhaozhenyu17@huawei.com> - 0.2.0-1
|
||||
- Sync patch from 22.03 SP4.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user