diff --git a/thirdparty/InferLLM/HPKBUILD b/thirdparty/InferLLM/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..0a6bb4d739efad385e0da8527be52fcfe9e44f08 --- /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 0000000000000000000000000000000000000000..3fd79461fb4d2e7b892719e8e8099d378ef10af3 --- /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 0000000000000000000000000000000000000000..7f9a81d117895242a04e877a133ef44d8e705f08 --- /dev/null +++ b/thirdparty/InferLLM/SHA512SUM @@ -0,0 +1 @@ +487f064a833269285dd3d8990adc464da2fc18d50239d5167e54ba0a72547fa822f3c1f9045cc7f001ac1b2abe3d68b9a4876045e1292d101a441bb960301e2c InferLLM-main.zip