-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d06597d
commit 6fa1d2e
Showing
10 changed files
with
212 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: linux-cpu | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/linux-cpu.yml' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/linux-cpu.yml' | ||
|
||
concurrency: | ||
group: linux-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux_buil_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: ./script/linux_build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: macos-cpu | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/macos-cpu.yml' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/macos-cpu.yml' | ||
|
||
concurrency: | ||
group: macos-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
macos_buil_test: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: ./script/macos_build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: windows-cpu | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/windows-cpu.yml' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- 'src/**' | ||
- '.github/workflows/windows-cpu.yml' | ||
|
||
concurrency: | ||
group: windows-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
windows_build_test: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: build | ||
run: powershell .\script\windows_build.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 1. clone MNN | ||
git clone https://github.com/alibaba/MNN.git -b 2.6.3 --depth=1 | ||
|
||
# 2. build MNN | ||
cd MNN/project/android | ||
mkdir build | ||
cd build | ||
../build_64.sh | ||
cd ../../../.. | ||
|
||
# 3. copy headers and libs | ||
cp -r MNN/include/MNN include | ||
cp MNN/project/android/build/libMNN.so MNN/project/android/build/libMNN_Express.so libs | ||
|
||
# 4. build mnn-llm android | ||
mkdir android_build | ||
cd android_build | ||
cmake .. \ | ||
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \ | ||
-DANDROID_STL=c++_static \ | ||
-DANDROID_ABI="arm64-v8a" \ | ||
-DANDROID_NATIVE_API_LEVEL=android-21 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_FOR_ANDROID=ON | ||
make -j4 | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
model=$1 | ||
mkdir $model | ||
cd $model | ||
# download models | ||
wget -c https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/embedding.mnn | ||
wget -c https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/lm.mnn | ||
for i in `seq 0 27` | ||
do | ||
wget -c https://github.com/wangzhaode/mnn-llm/releases/download/$model-mnn/block_$i.mnn | ||
done | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 1. clone MNN | ||
git clone https://github.com/alibaba/MNN.git -b 2.6.3 --depth=1 | ||
|
||
# 2. build MNN | ||
cd MNN | ||
mkdir build | ||
cd build | ||
cmake -DMNN_LOW_MEMORY=ON .. | ||
make -j4 | ||
cd ../.. | ||
|
||
# 3. copy headers and libs | ||
cp -r MNN/include/MNN include | ||
cp MNN/build/libMNN.so MNN/build/express/libMNN_Express.so libs | ||
|
||
# 4. build mnn-llm | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j4 | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 1. clone MNN | ||
git clone https://github.com/alibaba/MNN.git -b 2.6.3 --depth=1 | ||
|
||
# 2. build MNN | ||
cd MNN | ||
mkdir build | ||
cd build | ||
cmake -DMNN_LOW_MEMORY=ON .. | ||
make -j4 | ||
cd ../.. | ||
|
||
# 3. copy headers and libs | ||
cp -r MNN/include/MNN include | ||
cp MNN/build/libMNN.dylib MNN/build/express/libMNN_Express.dylib libs | ||
|
||
# 4. build mnn-llm | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make -j4 | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 1. clone MNN | ||
git clone https://github.com/alibaba/MNN.git -b 2.6.3 --depth=1 | ||
|
||
# 2. build MNN | ||
cd MNN | ||
mkdir build | ||
cd build | ||
# cmake -DMNN_LOW_MEMORY=ON .. | ||
cmake .. | ||
cmake --build . -j 4 | ||
cd ../.. | ||
|
||
# 3. copy headers and libs | ||
cp -r MNN/include/MNN include | ||
mv MNN/build/libMNN.lib libs | ||
|
||
# 4. download pthread | ||
wget -Uri https://gigenet.dl.sourceforge.net/project/pthreads4w/pthreads-w32-2-9-1-release.zip -OutFile "pthreads.zip" | ||
Expand-Archive .\pthreads.zip | ||
mv .\pthreads\Pre-built.2\lib\x64\pthreadVC2.lib libs | ||
cp .\pthreads\Pre-built.2\include\*.h .\include\ | ||
|
||
# 5. build mnn-llm | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cmake --build . -j 4 | ||
cd .. |