summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-08-18 09:41:28 +0000
committerCoprDistGit <infra@openeuler.org>2025-08-18 09:41:28 +0000
commitd93a9b4610b60112b64caa0f699b7e8a5ca370f9 (patch)
tree1c479c86ae13192c818b22c7b2f7ceaea446c78d
parentb2fd102e20240d3c2e3906bcc658defb155a0661 (diff)
automatic import of ANNCopeneuler22.03_LTS_SP4
-rw-r--r--.gitignore1
-rw-r--r--ANNC.spec26
-rw-r--r--sources2
3 files changed, 24 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index b2340ff..cb59680 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/ANNC-v0.0.1.tar.gz
/annc_external.tar.gz.aa
/annc_external.tar.gz.ab
+/ANNC-v0.0.2.tar.gz
diff --git a/ANNC.spec b/ANNC.spec
index 36ef014..fca393d 100644
--- a/ANNC.spec
+++ b/ANNC.spec
@@ -11,7 +11,7 @@
Summary: %{name} is an AI compiler designed to optimize and compile ML model into high-performance executable code that can be executed on various targets.
Name: ANNC
-Version: 0.0.1
+Version: 0.0.2
Release: 1
# Package onnxruntime and SafeInt have MIT License.
# Package onnx has Apache License 2.0.
@@ -52,13 +52,29 @@ tar -xzf annc_external.tar.gz -C .
%autosetup -S git -n %{pkg_version}
%build
+export ANNC=%{build_dir}
+cd %{build_dir}/annc/service/cpu/xla/libs
+bash xnnpack.sh
-cd %{build_dir}
+export XNNPACK_BASE="$ANNC/annc/service/cpu/xla/libs"
+export XNNPACK_DIR="$XNNPACK_BASE/XNNPACK"
+
+CPLUS_INCLUDE_PATH+="$ANNC/annc/service/cpu/xla:"
+CPLUS_INCLUDE_PATH+="$ANNC/annc/service/:"
+CPLUS_INCLUDE_PATH+="$XNNPACK_DIR/:"
+CPLUS_INCLUDE_PATH+="$XNNPACK_DIR/include/:"
+CPLUS_INCLUDE_PATH+="$XNNPACK_DIR/src/:"
+CPLUS_INCLUDE_PATH+="$XNNPACK_DIR/build/pthreadpool-source/include/:"
+export CPLUS_INCLUDE_PATH
+
+export LD_LIBRARY_PATH=$XNNPACK_DIR:$LD_LIBRARY_PATH
run_bazel_build() {
bazel --output_user_root=./output \
- build -c opt --copt="-DANNC_ENABLED_GRAPH_OPT" \
- --copt="-DANNC_ENABLED_OPENBLAS" \
+ build -c opt \
+ --verbose_failures \
+ --action_env="baila=548" \
+ --define tflite_with_xnnpack=false \
--copt="-g" \
--copt="-DNDBUG" \
annc/service/cpu:libannc.so
@@ -76,6 +92,7 @@ fix_action() {
run_bazel_build
}
+cd %{build_dir}
if run_bazel_build; then
echo "Build succeeded."
else
@@ -94,6 +111,7 @@ install %{build_dir}/python/tensorflow/kernels/* -t %{install_includedir}
install -d %{install_libdir}
output_path=$(find %{build_dir} -type f -name "libannc.so")
install ${output_path} -t %{install_libdir}
+install %{build_dir}/annc/service/cpu/xla/libs/XNNPACK/build/*.so -t %{install_libdir}
pushd %{build_dir}/python
%py3_install
diff --git a/sources b/sources
index ff0c5da..38f805f 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-ab91a5dc204e17656a63f9b9b3c94728 ANNC-v0.0.1.tar.gz
+871ddedbfbb9aa75c2db497584667f61 ANNC-v0.0.2.tar.gz
a3f0ec5120fa9b65af527332299c9d46 annc_external.tar.gz.aa
f548d6ba0ad0163c0aa3df33250e97c6 annc_external.tar.gz.ab