Skip to content

Commit f4ee239

Browse files
committed
ggml : remove OpenCL (#0)
1 parent 49c77e6 commit f4ee239

File tree

7 files changed

+0
-2416
lines changed

7 files changed

+0
-2416
lines changed

README.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,6 @@ cmake -DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.1/bin/nvcc ..
128128
cmake -DCMAKE_C_COMPILER="$(hipconfig -l)/clang" -DCMAKE_CXX_COMPILER="$(hipconfig -l)/clang++" -DGGML_HIPBLAS=ON
129129
```
130130

131-
## Using clBLAST
132-
133-
```bash
134-
cmake -DGGML_CLBLAST=ON ..
135-
```
136131
## Compiling for Android
137132

138133
Download and unzip the NDK from this download [page](https://developer.android.com/ndk/downloads). Set the NDK_ROOT_PATH environment variable or provide the absolute path to the CMAKE_ANDROID_NDK in the command below.
@@ -170,64 +165,6 @@ export LD_LIBRARY_PATH=/data/local/tmp
170165
./bin/gpt-2-backend -m models/ggml-model.bin -p "this is an example"
171166
```
172167

173-
### CLBlast for Android
174-
175-
Build CLBlast.
176-
177-
```bash
178-
# In CLBlast/build
179-
$ANDROID_SDK_PATH/cmake/3.22.1/bin/cmake .. \
180-
-DCMAKE_SYSTEM_NAME=Android \
181-
-DCMAKE_SYSTEM_VERSION=33 \
182-
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
183-
-DCMAKE_ANDROID_NDK=$ANDROID_NDK_PATH \
184-
-DCMAKE_ANDROID_STL_TYPE=c++_static \
185-
-DOPENCL_ROOT=$(readlink -f ../../OpenCL-Headers) \
186-
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
187-
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH
188-
189-
# Build libclblast.so
190-
make -j4
191-
```
192-
193-
Pull `libGLES_mali.so` to `libOpenCL.so`.
194-
195-
```bash
196-
# In ggml project root.
197-
mkdir arm64-v8a
198-
adb pull /system/vendor/lib64/egl/libGLES_mali.so arm64-v8a/libOpenCL.so
199-
```
200-
201-
Build ggml with CLBlast.
202-
203-
```bash
204-
# In ggml/build
205-
cd build
206-
$ANDROID_SDK_PATH/cmake/3.22.1/bin/cmake .. \
207-
-DGGML_CLBLAST=ON \
208-
-DCMAKE_SYSTEM_NAME=Android \
209-
-DCMAKE_SYSTEM_VERSION=33 \
210-
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
211-
-DCMAKE_ANDROID_NDK=$ANDROID_NDK_PATH \
212-
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
213-
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
214-
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
215-
-DCLBLAST_HOME=$(readlink -f ../../CLBlast) \
216-
-DOPENCL_LIB=$(readlink -f ../arm64-v8a/libOpenCL.so)
217-
218-
# Run make, adb push, etc.
219-
```
220-
221-
Then in `adb shell`...
222-
223-
```bash
224-
cd /data/local/tmp
225-
export LD_LIBRARY_PATH=/system/vendor/lib64/egl:/data/local/tmp
226-
./bin/gpt-2-backend -m models/ggml-model.bin -n 64 -p "Pepperoni pizza"
227-
```
228-
229-
OpenCL does not have the same level of support in `ggml-backend` as CUDA or Metal. In the `gpt-2-backend` example, OpenCL will only be used for the matrix multiplications when evaluating large prompts.
230-
231168
## Resources
232169

233170
- [GGML - Large Language Models for Everyone](https://github.com/rustformers/llm/blob/main/crates/ggml/README.md): a description of the GGML format provided by the maintainers of the `llm` Rust crate, which provides Rust bindings for GGML

examples/gpt-2/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ if (GGML_CUBLAS)
3939
add_compile_definitions(GGML_USE_CUBLAS)
4040
endif()
4141

42-
if (GGML_CLBLAST)
43-
add_compile_definitions(GGML_USE_CLBLAST)
44-
endif()
45-
4642
if (GGML_METAL)
4743
add_compile_definitions(GGML_USE_METAL)
4844
endif()

examples/magika/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ if (GGML_CUDA)
1212
add_compile_definitions(GGML_USE_CUDA)
1313
endif()
1414

15-
if (GGML_CLBLAST)
16-
add_compile_definitions(GGML_USE_CLBLAST)
17-
endif()
18-
1915
if (GGML_METAL)
2016
add_compile_definitions(GGML_USE_METAL)
2117
endif()

scripts/sync-llama.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ cp -rpv ../llama.cpp/ggml-kompute.h src/ggml-kompute.h
1414
cp -rpv ../llama.cpp/ggml-metal.h src/ggml-metal.h
1515
cp -rpv ../llama.cpp/ggml-metal.m src/ggml-metal.m
1616
cp -rpv ../llama.cpp/ggml-metal.metal src/ggml-metal.metal
17-
cp -rpv ../llama.cpp/ggml-opencl.cpp src/ggml-opencl.cpp
18-
cp -rpv ../llama.cpp/ggml-opencl.h src/ggml-opencl.h
1917
cp -rpv ../llama.cpp/ggml-quants.c src/ggml-quants.c
2018
cp -rpv ../llama.cpp/ggml-quants.h src/ggml-quants.h
2119
cp -rpv ../llama.cpp/ggml-rpc.cpp src/ggml-rpc.cpp

scripts/sync-whisper.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ cp -rpv ../whisper.cpp/ggml-kompute.h src/ggml-kompute.h
1414
cp -rpv ../whisper.cpp/ggml-metal.h src/ggml-metal.h
1515
cp -rpv ../whisper.cpp/ggml-metal.m src/ggml-metal.m
1616
cp -rpv ../whisper.cpp/ggml-metal.metal src/ggml-metal.metal
17-
cp -rpv ../whisper.cpp/ggml-opencl.cpp src/ggml-opencl.cpp
18-
cp -rpv ../whisper.cpp/ggml-opencl.h src/ggml-opencl.h
1917
cp -rpv ../whisper.cpp/ggml-quants.c src/ggml-quants.c
2018
cp -rpv ../whisper.cpp/ggml-quants.h src/ggml-quants.h
2119
cp -rpv ../whisper.cpp/ggml-rpc.cpp src/ggml-rpc.cpp

0 commit comments

Comments
 (0)