Skip to content

Commit 1ad5a12

Browse files
committed
disabled llava for adreno cpu
1 parent 5b71d20 commit 1ad5a12

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

examples/llava/clip.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,8 @@ static ggml_cgraph * clip_image_build_graph(clip_ctx * ctx, const clip_image_f32
11101110

11111111
// read and create ggml_context containing the tensors and their data
11121112
struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {
1113+
throw new std::runtime_error("Not implemented");
1114+
11131115
struct ggml_context * meta = NULL;
11141116

11151117
struct gguf_init_params params = {
@@ -2443,6 +2445,8 @@ bool clip_image_encode(struct clip_ctx * ctx, const int n_threads, clip_image_f3
24432445
}
24442446

24452447
bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_image_f32_batch * imgs, float * vec) {
2448+
throw new std::runtime_error("Not implemented");
2449+
24462450
if (!ctx->has_vision_encoder) {
24472451
LOG_ERR("This gguf file seems to have no vision encoder\n");
24482452
return false;

examples/llava/llava.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ static struct clip_image_grid_shape get_anyres_image_grid_shape(const std::pair<
101101

102102
// Take the image segments in a grid configuration and return the embeddings and the number of embeddings into preallocated memory (image_embd_out)
103103
static bool clip_llava_handle_patches(clip_ctx * ctx_clip, std::vector<float *> & image_embd_v, struct clip_image_grid_shape grid_shape, float * image_embd_out, int * n_img_pos_out) {
104+
throw new std::runtime_error("Not implemented");
105+
104106
struct {
105107
struct ggml_context * ctx;
106108
} model;

ggml/src/ggml-blas/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ endif()
55
# set(BLA_SIZEOF_INTEGER 8)
66
#endif()
77

8-
if(${GGML_BLAS_VENDOR} MATCHES "LocalOpenBLAS")
8+
if(ANDROID AND ${GGML_BLAS_VENDOR} MATCHES "Generic")
99
message(STATUS "Using local BLAS, Includes: ${BLAS_INCLUDE_DIRS}")
1010

1111
ggml_add_backend_library(ggml-blas

ggml/src/ggml-opencl/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
find_package(OpenCL REQUIRED)
2-
find_package(Python3 REQUIRED)
2+
# find_package(Python3 REQUIRED)
3+
set(Python3_EXECUTABLE "C:/Python311/python.exe" CACHE STRING "Python executable" FORCE)
34

45
set(TARGET_NAME ggml-opencl)
56

ggml/src/ggml-opencl/ggml-opencl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <vector>
2626
#include <string>
2727
#include <cmath>
28+
#include <dlfcn.h>
2829

2930
#undef MIN
3031
#undef MAX
@@ -309,7 +310,8 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) {
309310
struct cl_device * default_device = NULL;
310311

311312
cl_platform_id platform_ids[NPLAT];
312-
if (clGetPlatformIDs(NPLAT, platform_ids, &n_platforms) != CL_SUCCESS) {
313+
auto clGetPlatformIDResult = clGetPlatformIDs(NPLAT, platform_ids, &n_platforms);
314+
if (clGetPlatformIDResult != CL_SUCCESS) {
313315
GGML_LOG_ERROR("ggml_opencl: plaform IDs not available.\n");
314316
return backend_ctx;
315317
}

0 commit comments

Comments
 (0)