From aad94b26e57a127a5bce51cf941c279c074701be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BB=E5=8C=97=E5=86=B5=E5=BD=92?= <2692032597@qq.com> Date: Thu, 2 Nov 2023 10:50:01 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20InferLLM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thirdparty/InferLLM/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 thirdparty/InferLLM/.keep diff --git a/thirdparty/InferLLM/.keep b/thirdparty/InferLLM/.keep new file mode 100644 index 00000000..e69de29b -- Gitee From f2c5ed2ee713c404339fe29df0dc46f3496b8e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BB=E5=8C=97=E5=86=B5=E5=BD=92?= <2692032597@qq.com> Date: Thu, 2 Nov 2023 10:51:07 +0000 Subject: [PATCH 2/3] =?UTF-8?q?Signed-off-by:=20=E7=A6=BB=E5=8C=97?= =?UTF-8?q?=E5=86=B5=E5=BD=92=20<2692032597@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 离北况归 <2692032597@qq.com> --- thirdparty/InferLLM/HPKBUILD | 60 +++++++++++++++++++++++++++++++++++ thirdparty/InferLLM/OAT.xml | 13 ++++++++ thirdparty/InferLLM/SHA512SUM | 1 + 3 files changed, 74 insertions(+) create mode 100644 thirdparty/InferLLM/HPKBUILD create mode 100644 thirdparty/InferLLM/OAT.xml create mode 100644 thirdparty/InferLLM/SHA512SUM diff --git a/thirdparty/InferLLM/HPKBUILD b/thirdparty/InferLLM/HPKBUILD new file mode 100644 index 00000000..0a6bb4d7 --- /dev/null +++ b/thirdparty/InferLLM/HPKBUILD @@ -0,0 +1,60 @@ +# Copyright (c) 2023, HiHope Community. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: jiajiahao +# Maintainer: jiajiajiao + +pkgname=InferLLM +pkgver=main +pkgrel=0 +pkgdesc="InferLLM is a lightweight LLM model inference framework that mainly references and borrows from the llama.cpp project." +url="https://github.com/MegEngine/InferLLM/tree/main" +archs=("armeabi-v7a" "arm64-v8a") +license=("Apache License") +depends=() +makedepends=() + +source="https://codeload.github.com/MegEngine/$pkgname/zip/refs/heads/$pkgver" + +downloadpackage=true +autounpack=true +builddir=$pkgname-${pkgver} +packagename=$builddir.zip + +prepare() { + mkdir -p $builddir/$ARCH-build +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \ + -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 + make VERBOSE=1 -j4 -C $ARCH-build >> `pwd`/$ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" +} + +cleanbuild() { + rm -rf ${PWD}/$builddir #${PWD}/$packagename +} \ No newline at end of file diff --git a/thirdparty/InferLLM/OAT.xml b/thirdparty/InferLLM/OAT.xml new file mode 100644 index 00000000..3fd79461 --- /dev/null +++ b/thirdparty/InferLLM/OAT.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/InferLLM/SHA512SUM b/thirdparty/InferLLM/SHA512SUM new file mode 100644 index 00000000..7f9a81d1 --- /dev/null +++ b/thirdparty/InferLLM/SHA512SUM @@ -0,0 +1 @@ +487f064a833269285dd3d8990adc464da2fc18d50239d5167e54ba0a72547fa822f3c1f9045cc7f001ac1b2abe3d68b9a4876045e1292d101a441bb960301e2c InferLLM-main.zip -- Gitee From 063acafb832dfc0f87854cd64b3a79926ecb63ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BB=E5=8C=97=E5=86=B5=E5=BD=92?= <2692032597@qq.com> Date: Thu, 2 Nov 2023 10:52:29 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20thir?= =?UTF-8?q?dparty/InferLLM/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thirdparty/InferLLM/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 thirdparty/InferLLM/.keep diff --git a/thirdparty/InferLLM/.keep b/thirdparty/InferLLM/.keep deleted file mode 100644 index e69de29b..00000000 -- Gitee