mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-08 04:05:20 +00:00
fix ggml-metal.m
build constraints
This commit is contained in:
parent
bb795faa6c
commit
0873d28b16
@ -1,4 +1,4 @@
|
|||||||
// go:build darwin arm64
|
// go:build darwin && arm64
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* llama.cpp - git 059031b8c40e1f4ba60586842c5b1ed3ddf61842
|
* llama.cpp - git 059031b8c40e1f4ba60586842c5b1ed3ddf61842
|
||||||
|
@ -77,7 +77,7 @@ for IN in $dst_dir/*.{c,h,cpp,m,metal,cu}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# ggml-metal
|
# ggml-metal
|
||||||
sed -i '' '1s;^;// go:build darwin arm64\n\n;' $dst_dir/ggml-metal.m
|
sed -i '' '1s;^;// go:build darwin && arm64\n\n;' $dst_dir/ggml-metal.m
|
||||||
sed -e '/#include "ggml-common.h"/r ggml-common.h' -e '/#include "ggml-common.h"/d' < $dst_dir/ggml-metal.metal > temp.metal
|
sed -e '/#include "ggml-common.h"/r ggml-common.h' -e '/#include "ggml-common.h"/d' < $dst_dir/ggml-metal.metal > temp.metal
|
||||||
TEMP_ASSEMBLY=$(mktemp)
|
TEMP_ASSEMBLY=$(mktemp)
|
||||||
echo ".section __DATA, __ggml_metallib" > $TEMP_ASSEMBLY
|
echo ".section __DATA, __ggml_metallib" > $TEMP_ASSEMBLY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user